Documentation ¶
Index ¶
- func EncodeURI(filename, query string) string
- func OpenFollower(dsn string) (*sqlite3.SQLiteConn, error)
- func OpenLeader(dsn string, methods sqlite3.ReplicationMethods) (*sqlite3.SQLiteConn, error)
- func ParseURI(uri string) (string, string, error)
- func Restore(path string, database []byte, wal []byte) error
- func Snapshot(path string) ([]byte, []byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeURI ¶
EncodeURI concatenates the given filename and query string, returning the full URI.
func OpenFollower ¶
OpenFollower is a wrapper around SQLiteDriver.Open that opens connection in follower replication mode, and sets any additional dqlite-related options.
func OpenLeader ¶
OpenLeader is a wrapper around SQLiteDriver.Open that opens connection in leader replication mode, and sets any additional dqlite-related options.
The 'methods' argument is used to set the replication methods.
func ParseURI ¶
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.
Types ¶
This section is empty.