sqliteha

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2025 License: MIT Imports: 13 Imported by: 1

README

go-sqlite-ha

SQLite database/sql go driver with replication

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Backup

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

func NewConnector

func NewConnector(name string, opts ...ha.Option) (*ha.Connector, error)

Types

type Conn

type Conn struct {
	SQLiteConn
	// contains filtered or unexported fields
}

func (*Conn) Exec

func (c *Conn) Exec(query string, args []driver.Value) (driver.Result, error)

func (*Conn) ExecContext

func (c *Conn) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error)

type ConnHooksRegister

type ConnHooksRegister interface {
	RegisterPreUpdateHook(sqlite.PreUpdateHookFn)
	RegisterCommitHook(sqlite.CommitHookFn)
	RegisterRollbackHook(sqlite.RollbackHookFn)
}

type Driver

type Driver struct {
	ConnectionHook sqlite.ConnectionHookFn
	Options        []ha.Option
	// contains filtered or unexported fields
}

func (*Driver) Open

func (d *Driver) Open(name string) (driver.Conn, error)

func (*Driver) OpenConnector

func (d *Driver) OpenConnector(name string) (driver.Connector, error)

type SQLiteConn

type SQLiteConn interface {
	driver.Conn
	sqlite.ExecQuerierContext
	NewBackup(string) (*sqlite.Backup, error)
}

Directories

Path Synopsis
_examples
node1 command
node2 command

Jump to

Keyboard shortcuts

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