db

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BackupSQLiteDB

func BackupSQLiteDB(srcDB *sqlx.DB, backupPath string) error

func BackupSQLiteDBFromEnv

func BackupSQLiteDBFromEnv(srcDB *sqlx.DB) error

func NewDB

func NewDB(databaseDriver, sqliteDbPath, sqliteDbBusyTimeout, postgresURL string) (*sqlx.DB, error)

NewDB creates a new database connection based on the provided parameters. It returns a pointer to sqlx.DB and an error if any occurs during the connection process.

func NewDBFromEnv

func NewDBFromEnv() (*sqlx.DB, error)

NewDBFromEnv creates a new database connection based on the environment variables defined in the env package. It returns a pointer to sqlx.DB and an error if any occurs during the connection process.

func NewPostgreSQLDB

func NewPostgreSQLDB(url string) (*sqlx.DB, error)

NewPostgreSQLDB creates a new PostgreSQL database connection using the provided URL. It returns a pointer to sqlx.DB and an error if any occurs during the connection process.

func NewPostgreSQLDBFromEnv

func NewPostgreSQLDBFromEnv() (*sqlx.DB, error)

NewDBFromEnv creates a new database connection based on the environment variables defined in the env package. It returns a pointer to sqlx.DB and an error if any occurs during the connection process.

func NewSQLiteDB

func NewSQLiteDB(path, busyTimeout string) (*sqlx.DB, error)

NewSQLiteDB creates a new SQLite database connection using the provided path and busy timeout. It returns a pointer to sqlx.DB and an error if any occurs during the connection process.

func NewSQLiteDBFromEnv

func NewSQLiteDBFromEnv() (*sqlx.DB, error)

NewSQLiteDBFromEnv creates a new SQLite database connection using the environment variables defined in the env package. It returns a pointer to sqlx.DB and an error if any occurs during the connection process.

Types

This section is empty.

Jump to

Keyboard shortcuts

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