serdes

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package serdes provides functions to (de)serialize databases.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Deserialize

func Deserialize(db *sqlite3.Conn, schema string, data []byte) error

Deserialize restores a database from a byte slice, DESTROYING any contents previously stored in schema.

To non-destructively open a database from a byte slice, consider alternatives like the "reader" or "memdb" VFSes.

This differs from the similarly named SQLite API in that it DOES NOT disconnect from schema to reopen as an in-memory database.

https://sqlite.org/c3ref/deserialize.html

func Serialize

func Serialize(db *sqlite3.Conn, schema string) ([]byte, error)

Serialize backs up a database into a byte slice.

https://sqlite.org/c3ref/serialize.html

Types

This section is empty.

Jump to

Keyboard shortcuts

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