dbconfig

package
v0.0.0-...-3444db6 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const TableName = "db"

Variables

This section is empty.

Functions

func Delete

func Delete(id int, tx *sql.Tx) error

func GetLatestIDs

func GetLatestIDs(dbno, limit int, dbconn *sqlite3.SQLite) ([]int, error)

func GetOldestIDs

func GetOldestIDs(dbno, limit int, dbconn *sqlite3.SQLite) ([]int, error)

func LoadConfig

func LoadConfig(dbconn *sqlite3.SQLite) error

Types

type DBConfig

type DBConfig struct {
	ID           int
	UUID         string
	DBNo         int
	DBByteLength int
	Name         string
	Comment      string
	Created      time.Time
	Saved        time.Time
	Backup       time.Time
	DBData       []byte
}

func NewDB

func NewDB() (DBConfig, error)

func (*DBConfig) LoadFromDB

func (dc *DBConfig) LoadFromDB(id int, withdata bool, dbconn *sqlite3.SQLite) (bool, error)

func (*DBConfig) SaveToDB

func (dc *DBConfig) SaveToDB(tx *sql.Tx) error

Jump to

Keyboard shortcuts

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