sqlite

package
v0.89.8 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2021 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// WALMode for sqlite.
	WALMode = "wal"
)

Variables

This section is empty.

Functions

func ChangeEncryptionKey added in v0.80.2

func ChangeEncryptionKey(path, key, newKey string) error

func DecryptDB added in v0.69.0

func DecryptDB(oldPath, newPath, key string) error

DecryptDB completely removes the encryption from the db

func EncryptDB added in v0.69.0

func EncryptDB(unencryptedPath, encryptedPath, key string) error

EncryptDB takes a plaintext database and adds encryption

func Migrate

func Migrate(db *sql.DB, resources *bindata.AssetSource) error

Migrate database using provided resources.

func OpenDB

func OpenDB(path, key string) (*sql.DB, error)

OpenDB opens not-encrypted database.

func OpenUnecryptedDB

func OpenUnecryptedDB(path string) (*sql.DB, error)

OpenUnecryptedDB opens database with setting PRAGMA key.

Types

type JSONBlob

type JSONBlob struct {
	Data interface{}
}

JSONBlob type for marshaling/unmarshaling inner type to json.

func (*JSONBlob) Scan

func (blob *JSONBlob) Scan(value interface{}) error

Scan implements interface.

func (*JSONBlob) Value

func (blob *JSONBlob) Value() (driver.Value, error)

Value implements interface.

Jump to

Keyboard shortcuts

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