-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
:exec only checks the error
:execresult returns the full sql.Result
:execrows returns the sql.Result.RowsAffected() (int64, error)
We just need one more return type to support the full interface:
:execlastinsertid would just be a matter of calling .LastInsertId() rather than .RowsAffected() on the sql.Result.
This will avoid sql.Result database information leaking across the boundary of the pkg.Querier interface. It's not good for the service code to be handling DB specific method calls. This is a MySQL/SQLite issue as Postgres uses RETURNING so you can use :one instead.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request