sql

package
v0.4.26 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2025 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor interface {
	ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error)
}

type Null added in v0.4.23

type Null[T any] struct {
	sql.Null[T]
}

func NewNull added in v0.4.23

func NewNull[T any](inp *T) Null[T]

func (Null[T]) MarshalJSON added in v0.4.23

func (nt Null[T]) MarshalJSON() ([]byte, error)

func (*Null[T]) UnmarshalJSON added in v0.4.23

func (nt *Null[T]) UnmarshalJSON(data []byte) error

type Preparation

type Preparation interface {
	PrepareContext(ctx context.Context, query string) (*sql.Stmt, error)
}

type Querier

type Querier interface {
	PingContext(ctx context.Context) error
	QueryContext(ctx context.Context, query string, args ...any) (*sql.Rows, error)
	QueryRowContext(ctx context.Context, query string, args ...any) *sql.Row
	BeginTx(ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error)
}

type Tx

type Tx interface {
	Querier
	Executor
	Commit() error
	Rollback() error
}

Jump to

Keyboard shortcuts

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