storage

package
v0.0.0-...-6b3fda4 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ColValLengthError = errors.New("the columns and values slices must be of the same size")

Functions

func Init

func Init(path string, sq *Sqlite, prepareFunc DatabasePrepareFunc) error

Types

type DatabasePrepareFunc

type DatabasePrepareFunc func(db *sql.DB) error

type InitFunc

type InitFunc func(path string, sq *Sqlite, prepareFunc DatabasePrepareFunc) error

type Sqlite

type Sqlite struct {
	// contains filtered or unexported fields
}

func (*Sqlite) ArbitraryExec

func (sq *Sqlite) ArbitraryExec(statement string) error

func (*Sqlite) Close

func (sq *Sqlite) Close() error

func (*Sqlite) Delete

func (sq *Sqlite) Delete(tableName string, keyColumn string, keyValue string) error

func (*Sqlite) Insert

func (sq *Sqlite) Insert(tableName string, columns, values []string) error

func (*Sqlite) Query

func (sq *Sqlite) Query(query string) (*sql.Rows, error)

Query takes in a query and returns the resulting rows

func (*Sqlite) Update

func (sq *Sqlite) Update(tableName, keyColumn, keyValue string, columns, values []string) error

Jump to

Keyboard shortcuts

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