store

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type QueryInterceptor

type QueryInterceptor interface {
	QueryRowContext(ctx context.Context, query string, args ...any) *sql.Row
	QueryContext(ctx context.Context, query string, args ...any) (*sql.Rows, error)
	ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error)
}

QueryInterceptor provides database query methods with transaction awareness. Implementations route queries through an active transaction if present in context.

NOTE: DuckDB durability is handled by the WAL — it replays on startup. Explicit checkpointing is only needed before file-level operations (close, clone) and is available via Store2.Checkpoint().

func NewQueryInterceptor

func NewQueryInterceptor(db *sql.DB) QueryInterceptor

type Transactor

type Transactor interface {
	WithTx(ctx context.Context, fn func(ctx context.Context) error) error
}

Transactor provides transaction management.

func NewTransactor

func NewTransactor(db *sql.DB) Transactor

Jump to

Keyboard shortcuts

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