storage

package
v0.60.8 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBunStorageAdapter

func NewBunStorageAdapter(db BunExecutor) interfaces.StorageProvider

func NewNoOpProvider

func NewNoOpProvider() interfaces.StorageProvider

Types

type BunExecutor

type BunExecutor interface {
	ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error)
	QueryContext(ctx context.Context, query string, args ...any) (*sql.Rows, error)
	BeginTx(ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error)
}

type BunStorageAdapter

type BunStorageAdapter struct {
	// contains filtered or unexported fields
}

func (*BunStorageAdapter) Exec

func (a *BunStorageAdapter) Exec(ctx context.Context, query string, args ...any) (interfaces.Result, error)

func (*BunStorageAdapter) Query

func (a *BunStorageAdapter) Query(ctx context.Context, query string, args ...any) (interfaces.Rows, error)

func (*BunStorageAdapter) Transaction

func (a *BunStorageAdapter) Transaction(ctx context.Context, fn func(tx interfaces.Transaction) error) error

type NoOpProvider

type NoOpProvider struct{}

func (*NoOpProvider) Exec

func (*NoOpProvider) Query

func (*NoOpProvider) Transaction

func (*NoOpProvider) Transaction(_ context.Context, fn func(tx interfaces.Transaction) error) error

Jump to

Keyboard shortcuts

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