sqlite

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2024 License: MIT Imports: 24 Imported by: 4

README

Sqlite backend

Adding a migration

  1. Install golang-migrate/migrate
  2. For sqlite support you might want to install it via ``` go install -tags 'sqlite3','mysql' github.com/golang-migrate/migrate/v4/cmd/migrate@latest
1. ```bash
   migrate create -ext sql -dir ./db/migrations -seq <name>

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInMemoryBackend

func NewInMemoryBackend(opts ...option) *sqliteBackend

func NewSqliteBackend

func NewSqliteBackend(path string, opts ...option) *sqliteBackend

func WithApplyMigrations added in v0.18.0

func WithApplyMigrations(applyMigrations bool) option

WithApplyMigrations automatically applies database migrations on startup.

func WithBackendOptions added in v0.18.0

func WithBackendOptions(opts ...backend.BackendOption) option

WithBackendOptions allows to pass generic backend options.

Types

type Scanner

type Scanner interface {
	Scan(dest ...interface{}) error
}

Jump to

Keyboard shortcuts

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