database

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(config Config) (*sqlx.DB, error)

Open connections to sqlite database with passed config.

Types

type Config

type Config struct {
	// DBName of the database.
	DBName string
	// DBDir where the database is stored.
	DBDir string
}

Config for sqlite database.

func (Config) DBFilename

func (c Config) DBFilename() string

DBFilename of sqlite database instance.

It has a '.db' extension.

func (Config) DbPath

func (c Config) DbPath() string

DbPath to sqlite database instance.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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