sqlite

package
v0.0.0-...-3c05be1 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoRows = sql.ErrNoRows
)

Functions

This section is empty.

Types

type DB

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

func NewDB

func NewDB(path string) (*DB, error)

func (*DB) Delete

func (d *DB) Delete(command string, in interface{}) error

Delete should be used for deletes

func (*DB) Get

func (d *DB) Get(query string, in map[string]interface{}, out interface{}) error

Get gets a single entry from the database in the format of out interface

func (*DB) Insert

func (d *DB) Insert(command string, in interface{}) (int64, error)

Insert should be used for inserts

func (*DB) Select

func (d *DB) Select(query string, in map[string]interface{}, out interface{}) error

Select gets multiple entries from the database in the format of out interface (use a slice [])

Jump to

Keyboard shortcuts

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