db

package
v0.0.0-...-3ca17b7 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MigrationsFS embed.FS

Functions

func GetFile

func GetFile(fileName string) (string, error)

GetFile function returns filePath of created in temp directory file

func MigrateSchema

func MigrateSchema(
	filePath string,
	migrationsFs embed.FS,
	migrationTable string,
	nSteps *int,
) error

MigrateSchema performs migrations on the database

filePath_ is the path to the database file
migrationsFs is the filesystem containing the migrations
migrationTable is the name of the table to store migration information, by default it is "migrations"
nSteps is the number of steps to migrate, if nil, all migrations will be applied

func NewSqlite

func NewSqlite(filePath string) (*sql.DB, error)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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