|
|
|
|
@ -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)
|
|
|
|
|
|