data

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package data implements low-level database functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInt

func GetInt(db *sqlx.DB, code string, args ...any) (int, error)

GetInt returns an integer from the first row of a database query.

func GetString

func GetString(db *sqlx.DB, code string, args ...any) (string, error)

GetString returns a string from the first row of a database query.

func GetTime

func GetTime(db *sqlx.DB, code string, args ...any) (time.Time, error)

GetTime returns a Time object from an integer in the first row of a database query.

func Open

func Open(path, pragma, schema string) (*sqlx.DB, error)

Open returns an open database connection, executes pragma and initialises the database if it does not contain any schema.

Types

This section is empty.

Jump to

Keyboard shortcuts

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