db

package
v0.0.0-...-66119a7 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Connection *sql.DB

Connection is a sql connection.

Functions

func Close

func Close()

Close closes the connection.

func Rollback

func Rollback(tx *sql.Tx, err error) error

Rollback rolls back a database transaction. It always returns an error.

func Start

func Start() error

Start opens a connection a sqlite3 database. It will create a new database if the db file does not exist.

func Validate

func Validate(s interface{}) error

Validate validates a struct. Should be used to check values before insertion.

Types

This section is empty.

Jump to

Keyboard shortcuts

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