types

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: AGPL-3.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 ErrNoResult

type ErrNoResult struct {
	Msg string
}

func (ErrNoResult) Error

func (e ErrNoResult) Error() string

type ErrReference

type ErrReference struct {
	Msg   string
	Cause error
}

func (ErrReference) Error

func (e ErrReference) Error() string

type Filter

type Filter struct {
	Where string
	Args  []any
	Limit int
}

Filter is used to dynamically modify queries.

func NewFilter

func NewFilter(where string, args []any) *Filter

func (*Filter) And

func (f1 *Filter) And(f2 *Filter) *Filter

func (*Filter) Or

func (f1 *Filter) Or(f2 *Filter) *Filter

type Querier

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

Querier exposes only methods for running SQL queries, and some helper functions.

Jump to

Keyboard shortcuts

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