sqlw

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 21, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatabaseWrapper

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

func NewDatabaseWrapper

func NewDatabaseWrapper(db *sql.DB) *DatabaseWrapper

func (*DatabaseWrapper) Begin

func (*DatabaseWrapper) DB

func (w *DatabaseWrapper) DB() *sql.DB

func (*DatabaseWrapper) ExecContext

func (w *DatabaseWrapper) ExecContext(ctx context.Context, query string, args ...any) (velum.Result, error)

func (*DatabaseWrapper) InTx

func (w *DatabaseWrapper) InTx(ctx context.Context, fn func(tx velum.Transaction) error) error

func (*DatabaseWrapper) IsNotFound added in v0.0.2

func (w *DatabaseWrapper) IsNotFound(err error) bool

func (*DatabaseWrapper) QueryContext

func (w *DatabaseWrapper) QueryContext(ctx context.Context, sql string, args ...any) (velum.Rows, error)

func (*DatabaseWrapper) QueryRowContext

func (w *DatabaseWrapper) QueryRowContext(ctx context.Context, sql string, args ...any) velum.Row

type ResultWrapper

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

func (*ResultWrapper) RowsAffected

func (r *ResultWrapper) RowsAffected() (int64, error)

type RowWrapper

type RowWrapper struct {
	sql.Row
}

func (*RowWrapper) Err

func (rw *RowWrapper) Err() error

type RowsWrapper

type RowsWrapper struct {
	sql.Rows
}

func (*RowsWrapper) Close

func (rw *RowsWrapper) Close() error

type TransactionWrapper

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

func (*TransactionWrapper) Commit

func (tx *TransactionWrapper) Commit(ctx context.Context) error

func (*TransactionWrapper) ExecContext

func (tw *TransactionWrapper) ExecContext(ctx context.Context, sql string, args ...any) (velum.Result, error)

func (*TransactionWrapper) QueryContext

func (tw *TransactionWrapper) QueryContext(ctx context.Context, sql string, args ...any) (velum.Rows, error)

func (*TransactionWrapper) QueryRowContext

func (tw *TransactionWrapper) QueryRowContext(ctx context.Context, sql string, args ...any) velum.Row

func (*TransactionWrapper) Rollback

func (tx *TransactionWrapper) Rollback(ctx context.Context) error

Jump to

Keyboard shortcuts

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