Documentation ¶
Index ¶
- func ArrayContains(column string, elements ...any) squirrel.Sqlizer
- type Builder
- func (b Builder) BeginTransaction(ctx context.Context, opts ...transaction_context.TxOptions) (transaction_context.TransactionContext, error)
- func (b Builder) Builder() squirrel.StatementBuilderType
- func (b Builder) Close() error
- func (b Builder) DB() *sql.DB
- func (b Builder) ExecuteInTransactionWithCommit(ctx context.Context, txOpts *sql.TxOptions, ...) error
- func (b Builder) ExecuteInTransactionalContext(ctx transaction_context.TransactionContext, ...) error
- func (b Builder) ExecuteWithCommit(ctx context.Context, ...) error
- type CaseBuilder
- type CaseRawBuilder
- type DeleteBuilder
- type DeleteRawBuilder
- type InsertBuilder
- type InsertRawBuilder
- type Option
- func WithCertsWatcherPlugin(dsn string, logger log.Logger) Option
- func WithDBMaxIdleConnections(n int) Option
- func WithDBMaxIdleTime(d time.Duration) Option
- func WithDBMaxLifetime(d time.Duration) Option
- func WithDBMaxOpenConnections(n int) Option
- func WithLoger(logger log.Logger) Option
- func WithMeter(meter metric.Meter) Option
- func WithPlugin(plugin func(*Builder)) Option
- func WithStatementBuilderPlaceholderFormat(f squirrel.PlaceholderFormat) Option
- func WithStatsLoggerPlugin(logger log.Logger, d ...time.Duration) Option
- func WithTracer(tracer tracing.Tracer) Option
- type Options
- type SelectBuilder
- type SelectRawBuilder
- type StatementBuilder
- type TransactionContext
- type UpdateBuilder
- type UpdateRawBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func (Builder) BeginTransaction ¶
func (b Builder) BeginTransaction( ctx context.Context, opts ...transaction_context.TxOptions, ) (transaction_context.TransactionContext, error)
func (Builder) Builder ¶
func (b Builder) Builder() squirrel.StatementBuilderType
func (Builder) ExecuteInTransactionWithCommit ¶
func (Builder) ExecuteInTransactionalContext ¶
func (b Builder) ExecuteInTransactionalContext( ctx transaction_context.TransactionContext, txFunction func(context.Context, StatementBuilder) error, ) error
func (Builder) ExecuteWithCommit ¶
func (b Builder) ExecuteWithCommit( ctx context.Context, transactionFunction func(transaction_context.TransactionContext) error, opts ...transaction_context.TxOptions, ) error
type CaseBuilder ¶
type CaseBuilder func(squirrel.CaseBuilder) squirrel.CaseBuilder
type CaseRawBuilder ¶
type CaseRawBuilder func(squirrel.StatementBuilderType) squirrel.CaseBuilder
type DeleteBuilder ¶
type DeleteBuilder func(squirrel.DeleteBuilder) squirrel.DeleteBuilder
type DeleteRawBuilder ¶
type DeleteRawBuilder func(squirrel.StatementBuilderType) squirrel.DeleteBuilder
type InsertBuilder ¶
type InsertBuilder func(squirrel.InsertBuilder) squirrel.InsertBuilder
type InsertRawBuilder ¶
type InsertRawBuilder func(squirrel.StatementBuilderType) squirrel.InsertBuilder
type Option ¶
type Option func(*Builder)
func WithDBMaxIdleTime ¶
func WithDBMaxLifetime ¶
func WithPlugin ¶
func WithStatementBuilderPlaceholderFormat ¶
func WithStatementBuilderPlaceholderFormat(f squirrel.PlaceholderFormat) Option
func WithStatsLoggerPlugin ¶
func WithTracer ¶
type SelectBuilder ¶
type SelectBuilder func(squirrel.SelectBuilder) squirrel.SelectBuilder
type SelectRawBuilder ¶
type SelectRawBuilder func(squirrel.StatementBuilderType) squirrel.SelectBuilder
type StatementBuilder ¶
type StatementBuilder interface { Select(columns ...string) squirrel.SelectBuilder Insert(into string) squirrel.InsertBuilder Update(table string) squirrel.UpdateBuilder Delete(from string) squirrel.DeleteBuilder }
type TransactionContext ¶
func IsTransactionContext ¶
func IsTransactionContext(ctx context.Context) (TransactionContext, bool)
func (TransactionContext) Commit ¶
func (t TransactionContext) Commit() error
func (TransactionContext) Rollback ¶
func (t TransactionContext) Rollback() error
func (TransactionContext) Span ¶
func (t TransactionContext) Span() trace.Span
func (TransactionContext) StatementBuilder ¶
func (t TransactionContext) StatementBuilder() StatementBuilder
func (TransactionContext) Tx ¶
func (t TransactionContext) Tx() *sql.Tx
type UpdateBuilder ¶
type UpdateBuilder func(squirrel.UpdateBuilder) squirrel.UpdateBuilder
type UpdateRawBuilder ¶
type UpdateRawBuilder func(squirrel.StatementBuilderType) squirrel.UpdateBuilder
Click to show internal directories.
Click to hide internal directories.