sqlcipher

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: MIT Imports: 12 Imported by: 0

README

sqlcipher

This is just a copy of the sqlite3 driver except that it imports github.com/mutecomm/go-sqlcipher.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDatabaseDirty  = fmt.Errorf("database is dirty")
	ErrNilConfig      = fmt.Errorf("no config")
	ErrNoDatabaseName = fmt.Errorf("no database name")
)
View Source
var DefaultMigrationsTable = "schema_migrations"

Functions

func WithInstance

func WithInstance(instance *sql.DB, config *Config) (database.Driver, error)

Types

type Config

type Config struct {
	MigrationsTable string
	DatabaseName    string
	NoTxWrap        bool
}

type Sqlite

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

func (*Sqlite) Close

func (m *Sqlite) Close() error

func (*Sqlite) Drop

func (m *Sqlite) Drop() (err error)

func (*Sqlite) ListAppliedVersions

func (m *Sqlite) ListAppliedVersions() ([]int, error)

func (*Sqlite) Lock

func (m *Sqlite) Lock() error

func (*Sqlite) Open

func (m *Sqlite) Open(url string) (database.Driver, error)

func (*Sqlite) Run

func (m *Sqlite) Run(migration io.Reader) error

func (*Sqlite) SetSourceDriver

func (m *Sqlite) SetSourceDriver(sourceDrv source.Driver) error

This database driver does not currently support file sourcing.

func (*Sqlite) SetVersion

func (m *Sqlite) SetVersion(version int, dirty bool, forced bool, knownDirection *source.Direction) (*source.Direction, error)

func (*Sqlite) Unlock

func (m *Sqlite) Unlock() error

func (*Sqlite) Version

func (m *Sqlite) Version() (version int, dirty bool, err error)

Jump to

Keyboard shortcuts

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