database

package
v0.0.0-...-a8dead8 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	File            string `yaml:"file" json:"file" env:"DB_FILE" env-default:"gommentary.db"`
	MigrationsDir   string `yaml:"migrationsDir" json:"migrationsDir" env:"DB_MIGRATIONS_DIR" env-default:"./sql/migrations"`
	MigrationsTable string `yaml:"migrationTable" json:"migrationTable" env:"MIGRATION_TABLE" env-default:"schema_migrations"`
}

type Sqlite

type Sqlite struct {
	Queries *queries.Queries
	// contains filtered or unexported fields
}

func NewDatabase

func NewDatabase(config Config) (*Sqlite, error)

func (*Sqlite) Close

func (db *Sqlite) Close() error

func (*Sqlite) Tx

func (db *Sqlite) Tx() (*sql.Tx, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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