Documentation ¶
Index ¶
- Variables
- type Executor
- func (e *Executor) Exec(ctx context.Context, query string, params []table.ParameterOption) (table.Transaction, result.Result, error)
- func (e *Executor) ExecX(ctx context.Context, query yqb.YdbSqlizer) (table.Transaction, result.Result, error)
- func (e *Executor) Get(ctx context.Context, dst any, query string, params []table.ParameterOption) (table.Transaction, error)
- func (e *Executor) GetX(ctx context.Context, dst any, query yqb.YdbSqlizer) (table.Transaction, error)
- func (e *Executor) Select(ctx context.Context, dst any, query string, params []table.ParameterOption) (table.Transaction, error)
- func (e *Executor) SelectX(ctx context.Context, dst any, query yqb.YdbSqlizer) (table.Transaction, error)
- func (e *Executor) WithTxControl(txc *table.TransactionControl) *Executor
- type SqlizedExecer
- type SqlizedGetter
- type SqlizedSelector
Constants ¶
This section is empty.
Variables ¶
View Source
var ScanDefaultAPI = yscan.DefaultAPI
ScanDefaultAPI is the default instance of API with all configuration settings set to default.
Functions ¶
This section is empty.
Types ¶
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
Executor runner query
func UseSession ¶
func UseSession(runner yscan.SessionQuerier) *Executor
UseSession run query via session
func UseTransaction ¶
func UseTransaction(runner yscan.TransactionQuerier) *Executor
UseTransaction run query via transaction
func (*Executor) Exec ¶
func (e *Executor) Exec(ctx context.Context, query string, params []table.ParameterOption) (table.Transaction, result.Result, error)
Exec accepting SQL string and parameters
func (*Executor) ExecX ¶
func (e *Executor) ExecX(ctx context.Context, query yqb.YdbSqlizer) (table.Transaction, result.Result, error)
ExecX select accepting SQL builder
func (*Executor) Get ¶
func (e *Executor) Get(ctx context.Context, dst any, query string, params []table.ParameterOption) (table.Transaction, error)
Get accepting SQL string and parameters
func (*Executor) GetX ¶
func (e *Executor) GetX(ctx context.Context, dst any, query yqb.YdbSqlizer) (table.Transaction, error)
GetX select accepting SQL builder
func (*Executor) Select ¶
func (e *Executor) Select(ctx context.Context, dst any, query string, params []table.ParameterOption) (table.Transaction, error)
Select accepting SQL string and parameters
func (*Executor) SelectX ¶
func (e *Executor) SelectX(ctx context.Context, dst any, query yqb.YdbSqlizer) (table.Transaction, error)
SelectX select accepting SQL builder
func (*Executor) WithTxControl ¶
func (e *Executor) WithTxControl(txc *table.TransactionControl) *Executor
WithTxControl set table.TransactionControl
type SqlizedExecer ¶
type SqlizedExecer interface { Exec(ctx context.Context, query string, params []table.ParameterOption) (table.Transaction, result.Result, error) ExecX(ctx context.Context, query yqb.YdbSqlizer) (table.Transaction, result.Result, error) }
SqlizedExecer exec query use qb.YdbSqlizer
type SqlizedGetter ¶
type SqlizedGetter interface { Get(ctx context.Context, dst any, query string, params []table.ParameterOption) (table.Transaction, error) GetX(ctx context.Context, dst any, query yqb.YdbSqlizer) (table.Transaction, error) }
SqlizedGetter get query use qb.YdbSqlizer
type SqlizedSelector ¶
type SqlizedSelector interface { Select(ctx context.Context, dst any, query string, params []table.ParameterOption) (table.Transaction, error) SelectX(ctx context.Context, dst any, query yqb.YdbSqlizer) (table.Transaction, error) }
SqlizedSelector select query use qb.YdbSqlizer
Click to show internal directories.
Click to hide internal directories.