sqlite

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2021 License: BSD-3-Clause Imports: 4 Imported by: 18

README

go-sqlite

Go package for working with mattn/go-sqlite3 databases.

See also

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTableIfNecessary

func CreateTableIfNecessary(ctx context.Context, db Database, t Table) error

func HasTable

func HasTable(ctx context.Context, db Database, table string) (bool, error)

Types

type Database

type Database interface {
	Conn() (*sql.DB, error)
	DSN() string
	Close() error
	Lock() error
	Unlock() error
}

type ResultRow

type ResultRow interface {
	Row() interface{}
}

type ResultSet

type ResultSet interface {
	Scan(dest ...interface{}) error
}

type ResultSetFunc

type ResultSetFunc func(row ResultSet) (ResultRow, error)

type Table

type Table interface {
	Name() string
	Schema() string
	InitializeTable(context.Context, Database) error
	IndexRecord(context.Context, Database, interface{}) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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