sqlite

package module
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2022 License: BSD-3-Clause Imports: 5 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)

func HasTableWithSQLDB added in v0.2.0

func HasTableWithSQLDB(ctx context.Context, db *sql.DB, table_name 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
cmd

Jump to

Keyboard shortcuts

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