sqlite

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2026 License: Apache-2.0 Imports: 18 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 Drop added in v0.6.3

func Drop(ctx context.Context, id string) (string, error)

func IdFromDSN added in v0.6.3

func IdFromDSN(dsn string) string

func Load added in v0.1.0

func Load(ctx context.Context, dsn 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