yqe

package
v0.0.0-...-7a30d57 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

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

Exec accepting SQL string and parameters

func (*Executor) ExecX

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL