internal/protocol/session.go
func (s *Session) ExecDirect(query string) (driver.Result, error) {
	s.mu.Lock()
	defer s.mu.Unlock()

	if err := s.writeRequest(mtExecuteDirect, !s.conn.inTx, command(query)); err != nil {
		return nil, err
	}

	if err := s.readReply(nil); err != nil {
		return nil, err
	}

	if s.sh.functionCode == fcDDL {
		return driver.ResultNoRows, nil
	}
	return driver.RowsAffected(s.rowsAffected.total()), nil
}
func (s *Session) ExecDirect(query string) (driver.Result, error) {
	s.mu.Lock()
	defer s.mu.Unlock()

	if err := s.writeRequest(mtExecuteDirect, !s.conn.inTx, command(query)); err != nil {
		return nil, err
	}

	if err := s.readReply(nil); err != nil {
		return nil, err
	}

	if s.sh.functionCode == fcDDL {
		return driver.ResultNoRows, nil
	}
	return driver.RowsAffected(s.rowsAffected.total()), nil
}
func ( s * Session ) ExecDirect ( query string ) ( driver . Result , error ) { s . mu . Lock ( ) defer s . mu . Unlock ( ) if err := s . writeRequest ( mtExecuteDirect , ! s . conn . inTx , command ( query ) ) ; err != nil { return nil , err } if err := s . readReply ( nil ) ; err != nil { return nil , err } if s . sh . functionCode == fcDDL { return driver . ResultNoRows , nil } return driver . RowsAffected ( s . rowsAffected . total ( ) ) , nil }
// ExecDirect executes a sql statement without statement parameters.
ExecDirect executes a sql statement without statement parameters .