document what the int returned by Exec represents

jimlambrt-session-basics
Jim Lambert 6 years ago
parent ce033f87df
commit 8de63f82cf

@ -103,8 +103,9 @@ type Writer interface {
// DB returns the sql.DB
DB() (*sql.DB, error)
// Exec will execute the sql with the values as parameters. No options are
// currently supported
// Exec will execute the sql with the values as parameters. The int returned
// is the number of rows affected by the sql. No options are currently
// supported.
Exec(sql string, values []interface{}, opt ...Option) (int, error)
// GetTicket returns an oplog ticket for the aggregate root of "i" which can
@ -191,8 +192,9 @@ func (rw *Db) DB() (*sql.DB, error) {
return rw.underlying.DB(), nil
}
// Exec will execute the sql with the values as parameters. No options are
// currently supported.
// Exec will execute the sql with the values as parameters. The int returned
// is the number of rows affected by the sql. No options are currently
// supported.
func (rw *Db) Exec(sql string, values []interface{}, opt ...Option) (int, error) {
if sql == "" {
return NoRowsAffected, fmt.Errorf("missing sql: %w", ErrInvalidParameter)

Loading…
Cancel
Save