Documentation
¶
Index ¶
- func BackupSQLiteDB(srcDB *sqlx.DB, backupPath string) error
- func BackupSQLiteDBFromEnv(srcDB *sqlx.DB) error
- func NewDB(databaseDriver, sqliteDbPath, sqliteDbBusyTimeout, postgresURL string) (*sqlx.DB, error)
- func NewDBFromEnv() (*sqlx.DB, error)
- func NewPostgreSQLDB(url string) (*sqlx.DB, error)
- func NewPostgreSQLDBFromEnv() (*sqlx.DB, error)
- func NewSQLiteDB(path, busyTimeout string) (*sqlx.DB, error)
- func NewSQLiteDBFromEnv() (*sqlx.DB, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BackupSQLiteDBFromEnv ¶
func NewDB ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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.