Documentation ¶
Overview ¶
This example shows how to utilize the DirectExecer interface to receive both the driver.Rows and driver.Result of a SQL query.
go-ase offers two methods on go-ase connections - GenericExec and DirectExec. They are functionally identical as DirectExec is a wrapper around GenericExec and takes interface{}s als values for the placeholders within an SQL statement, rather than driver.Values.
E.g.:
if rows, result, err := conn.GenericExec(ctx, "select * from table where a = ?", driver.Value{5}); err != nil { return err } if rows, result, err := conn.DirectExec(ctx, "select * from table where a = ?", 5); err != nil { return err }
These methods are primarily useful when using stored procedures which may return both rows and the number of affected rows.
Click to show internal directories.
Click to hide internal directories.