Documentation
¶
Index ¶
- func Exec(ctx context.Context, db *sqlx.DB, sql string) error
- func QueryAndProcessMany[T any](ctx context.Context, conn *sqlx.DB, sql string, ...) error
- func QueryMany[T any](ctx context.Context, conn *sqlx.DB, sql string, opts ...exec.QueryManyOpt[T]) ([]*T, error)
- func QueryMaps(ctx context.Context, conn *sqlx.DB, sql string) ([]exec.QueryMapResult, error)
- type Querier_Opts
- type StdSqlExecutor
- type StdSqlQuerier
- func (s StdSqlQuerier[T]) Close() error
- func (s StdSqlQuerier[T]) Exec(ctx context.Context, sql string) error
- func (s StdSqlQuerier[T]) QueryAndProcessMany(ctx context.Context, sql string, ...) error
- func (s StdSqlQuerier[T]) QueryMany(ctx context.Context, sql string, opts ...exec.QueryManyOpt[T]) ([]*T, error)
- func (s StdSqlQuerier[T]) QueryMaps(ctx context.Context, sql string) ([]exec.QueryMapResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func QueryAndProcessMany ¶
Types ¶
type Querier_Opts ¶ added in v0.2.5
type Querier_Opts[T any] func(querier *StdSqlQuerier[T])
func Querier_WithSshTunnelDialer ¶ added in v0.2.5
func Querier_WithSshTunnelDialer[T any](sshTunnelDialer *sshtunnel.SshTunnelDialer) Querier_Opts[T]
type StdSqlExecutor ¶
type StdSqlQuerier ¶
type StdSqlQuerier[T any] struct { // contains filtered or unexported fields }
func NewQuerier ¶
func NewQuerier[T any](conn *sqlx.DB, opts ...Querier_Opts[T]) *StdSqlQuerier[T]
func (StdSqlQuerier[T]) Close ¶
func (s StdSqlQuerier[T]) Close() error
func (StdSqlQuerier[T]) Exec ¶
func (s StdSqlQuerier[T]) Exec(ctx context.Context, sql string) error
func (StdSqlQuerier[T]) QueryAndProcessMany ¶
func (s StdSqlQuerier[T]) QueryAndProcessMany( ctx context.Context, sql string, handler func(ctx context.Context, batch []*T) error, opts ...exec.QueryManyOpt[T], ) error
func (StdSqlQuerier[T]) QueryMany ¶
func (s StdSqlQuerier[T]) QueryMany(ctx context.Context, sql string, opts ...exec.QueryManyOpt[T]) ([]*T, error)
func (StdSqlQuerier[T]) QueryMaps ¶
func (s StdSqlQuerier[T]) QueryMaps(ctx context.Context, sql string) ([]exec.QueryMapResult, error)
Click to show internal directories.
Click to hide internal directories.