db

package
v0.0.0-...-21113ad Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(readOnly bool, databaseLocation string) *sql.DB

func GetDatabaseFullPath

func GetDatabaseFullPath(databaseLocation string) string

func Init

func Init(databaseLocation string) *sql.DB

Types

type DB

type DB interface {
	Exec(string, ...interface{}) (sql.Result, error)
	Prepare(string) (*sql.Stmt, error)
}

type Migrations

type Migrations struct {
	// contains filtered or unexported fields
}

func New

func New(db DB) *Migrations

New creates a new instance of Migrations struct

func (*Migrations) Migrate

func (m *Migrations) Migrate()

Migrate migrates the database using the migration scripts provided

Jump to

Keyboard shortcuts

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