Documentation
¶
Index ¶
- Constants
- func CloseConnect(db *sqlx.DB) error
- func ConfigureLog(level slog.Leveler)
- func GetTransaction(ctx context.Context) (*sqlx.Tx, bool)
- func PrepareKeyArguments(args ...any) ([]string, []any)
- func StartTransaction(ctx context.Context, db *sqlx.DB) (context.Context, *sqlx.Tx, error)
- func ToBig(value any) (*big.Int, error)
- func ToUint64(value interface{}) (uint64, error)
- type DBExecutor
- type DBExecutorInterface
- type DBTransactor
- type DbFactory
- type StdoutLogConsumer
- type ToHex
Constants ¶
View Source
const DbImage = "postgres:17.4-alpine"
View Source
const DbName = "rollups"
View Source
const DbPassword = "password"
View Source
const DbUser = "postgres"
View Source
const DefaultTimeout time.Duration = 5 * time.Minute
View Source
const OpenEpoch = 19
View Source
const Schema = "" /* 143-byte string literal not displayed */
View Source
const TimeoutInSeconds = 10
Variables ¶
This section is empty.
Functions ¶
func CloseConnect ¶ added in v0.0.2
func ConfigureLog ¶
func PrepareKeyArguments ¶ added in v0.0.2
func StartTransaction ¶ added in v0.0.2
Types ¶
type DBExecutor ¶ added in v0.0.2
type DBExecutor struct {
// contains filtered or unexported fields
}
func (*DBExecutor) ExecContext ¶ added in v0.0.2
func (d *DBExecutor) ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error)
ExecContext implements sqlx.ExecerContext.
func (*DBExecutor) PrepareNamedContext ¶ added in v0.0.2
func (d *DBExecutor) PrepareNamedContext(ctx context.Context, query string) (*sqlx.NamedStmt, error)
PrepareNamedContext implements DBExecutorInterface.
type DBExecutorInterface ¶ added in v0.0.2
type DBExecutorInterface interface {
sqlx.ExecerContext
PrepareNamedContext(ctx context.Context, query string) (*sqlx.NamedStmt, error)
}
func NewDBExecutor ¶ added in v0.0.2
func NewDBExecutor(db *sqlx.DB) DBExecutorInterface
type DBTransactor ¶ added in v0.0.2
type DbFactory ¶
func NewDbFactory ¶
func NewDbFactory() *DbFactory
type StdoutLogConsumer ¶
type StdoutLogConsumer struct{}
StdoutLogConsumer is a LogConsumer that prints the log to stdout
func (*StdoutLogConsumer) Accept ¶
func (lc *StdoutLogConsumer) Accept(l testcontainers.Log)
Accept prints the log to stdout
Click to show internal directories.
Click to hide internal directories.