Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/ibmdb/go_ibm_db
Browse files Browse the repository at this point in the history
  • Loading branch information
akhilravuri1 committed Mar 17, 2021
2 parents bbad27a + 684fd6d commit 2c43371
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,12 @@ func (c *Conn) Close() error {
return releaseHandle(h)
}

//Query method executes the stament with out prepare
//Query method executes the statement with out prepare if no args provided, and a driver.ErrSkip otherwise (handled by sql.go to execute usual preparedStmt)
func (c *Conn) Query(query string, args []driver.Value) (driver.Rows, error) {
if len(args) > 0 {
// Not implemented for queries with parameters
return nil, driver.ErrSkip
}
var out api.SQLHANDLE
var os *ODBCStmt
ret := api.SQLAllocHandle(api.SQL_HANDLE_STMT, api.SQLHANDLE(c.h), &out)
Expand Down Expand Up @@ -77,4 +81,4 @@ func (c *Conn) Query(query string, args []driver.Value) (driver.Rows, error) {
return nil, err
}
return &Rows{os: os}, nil
}
}

0 comments on commit 2c43371

Please sign in to comment.