sqlite

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Backup added in v0.0.7

func Backup(ctx context.Context, db *sql.DB, w io.Writer) error

func Connector added in v0.1.0

func Connector(id string) (*ha.Connector, error)

func DB added in v0.1.0

func DB(id string) (*sql.DB, error)

func Databases added in v0.1.0

func Databases() []string

func Load added in v0.1.0

func Load(dsnList []string, memDB bool, fromLatestSnapshot bool, deliverPolicy string, maxConns int, opts ...ha.Option) error

Types

type Request

type Request struct {
	Sql    string         `json:"sql"`
	Params map[string]any `json:"params"`
}

type Response

type Response struct {
	Columns      []string `json:"columns"`
	Rows         [][]any  `json:"rows"`
	RowsAffected int64    `json:"-"`
	NoReturning  bool     `json:"-"`
}

func Exec

func Exec(ctx context.Context, eq execerQuerier, stmt *ha.Statement, params map[string]any) (*Response, error)

func Transaction

func Transaction(ctx context.Context, db *sql.DB, queries []Request) ([]*Response, error)

Jump to

Keyboard shortcuts

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