db

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2022 License: MIT Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	// sqlite db connection instance
	Db *sql.DB
	// contains filtered or unexported fields
}

func NewDB

func NewDB(profile *profile.Profile) *DB

NewDB returns a new instance of DB associated with the given datasource name.

func (*DB) FindMigrationHistory added in v0.4.0

func (db *DB) FindMigrationHistory(ctx context.Context, find *MigrationHistoryFind) (*MigrationHistory, error)

func (*DB) Open

func (db *DB) Open(ctx context.Context) (err error)

func (*DB) UpsertMigrationHistory added in v0.4.0

func (db *DB) UpsertMigrationHistory(ctx context.Context, upsert *MigrationHistoryUpsert) (*MigrationHistory, error)

type MigrationHistory

type MigrationHistory struct {
	Version   string
	CreatedTs int64
}

type MigrationHistoryFind added in v0.2.0

type MigrationHistoryFind struct {
	Version *string
}

type MigrationHistoryUpsert added in v0.2.0

type MigrationHistoryUpsert struct {
	Version string
}

type Table

type Table struct {
	Name string
	SQL  string
}

Jump to

Keyboard shortcuts

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