Documentation
¶
Index ¶
- Variables
- type DB
- type Executor
- type Plugins
- type Querier
- type Result
- type Scanner
- type Stmt
- func (s *Stmt) CallContext(name string, ctx context.Context, ...) error
- func (s *Stmt) ExecContext(name string, ctx context.Context, call func(q Executor)) error
- func (s *Stmt) Ping() error
- func (s *Stmt) QueryContext(name string, ctx context.Context, call func(q Querier)) error
- func (s *Stmt) TransactionContext(name string, ctx context.Context, call func(v Tx)) error
- func (s *Stmt) TxContext(name string, ctx context.Context, ...) error
- type Tx
Constants ¶
This section is empty.
Variables ¶
View Source
var (
//ErrInvalidModelPool if sync pool has invalid model type
ErrInvalidModelPool = errors.New("invalid internal model pool")
)
Functions ¶
This section is empty.
Types ¶
type Executor ¶ added in v1.1.0
type Executor interface { SQL(query string, args ...interface{}) Params(args ...interface{}) Bind(call func(result Result) error) }
Executor interface for generate execute query
type Plugins ¶
type Plugins struct { Logger logger.Logger Metrics plugins.MetricGetter }
Plugins storage
type Querier ¶ added in v1.1.0
type Querier interface { SQL(query string, args ...interface{}) Bind(call func(bind Scanner) error) }
Querier interface for generate query
type Scanner ¶ added in v1.1.0
type Scanner interface {
Scan(args ...interface{}) error
}
Scanner interface for bind data
type Stmt ¶
type Stmt struct {
// contains filtered or unexported fields
}
Stmt statement model
func (*Stmt) CallContext ¶ added in v1.1.0
func (s *Stmt) CallContext(name string, ctx context.Context, callFunc func(context.Context, *sql.DB) error) error
CallContext basic query execution
func (*Stmt) ExecContext ¶ added in v1.1.0
ExecContext ...
func (*Stmt) QueryContext ¶ added in v1.1.0
QueryContext ...
func (*Stmt) TransactionContext ¶ added in v1.1.0
Source Files
¶
Click to show internal directories.
Click to hide internal directories.