connection

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseURI

func ParseURI(uri string) (string, uint64, error)

ParseURI parses the given sqlite3 URI checking if it's compatible with dqlite.

Only pure file names without any directory segment are accepted (e.g. "test.db"). Query parameters are always valid except for "mode=memory".

It returns the filename and query parameters.

func Restore

func Restore(vfs *bindings.Vfs, path string, database, wal []byte) error

Restore the given database and WAL backups, writing them at the given database path.

func Snapshot

func Snapshot(vfs *bindings.Vfs, path string) ([]byte, []byte, error)

Snapshot returns a snapshot of the SQLite database with the given path.

The snapshot is comprised of two byte slices, one with the content of the database and one is the content of the WAL file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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