shad-go/lectures/07-sql/sqlx/ext.go

15 lines
491 B
Go
Raw Normal View History

2020-04-08 19:20:23 +00:00
type QueryerContext interface {
QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
QueryxContext(ctx context.Context, query string, args ...interface{}) (*Rows, error)
QueryRowxContext(ctx context.Context, query string, args ...interface{}) *Row
}
type ExecerContext interface {
ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
}
type ExtContext interface {
QueryerContext
ExecerContext
}