sqlite3db

package
v0.0.0-...-7f4244c Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2023 License: Unlicense Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

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

DB represents a JSON datastore backend

func NewSQLDB

func NewSQLDB(filepath string) *DB

NewSQLDB creates a new DB object

func (*DB) AddValue

func (db *DB) AddValue(cat string, value string) error

AddValue adds a value to a category and returns an error

func (*DB) GetValue

func (db *DB) GetValue(cat string) string

GetValue retrieves a random value from a category

func (*DB) GetValues

func (db *DB) GetValues(cats []string) map[string][]string

GetValues retrieves a list of values from a category

Jump to

Keyboard shortcuts

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