From 1603038a4dc1f945229836bc49aa448f571ab288 Mon Sep 17 00:00:00 2001 From: Philip O'Toole Date: Thu, 17 Nov 2022 08:03:02 -0500 Subject: Add Serialize and Deserialize support (#1089) Add support for Serialize and Deserialize, which wrap sqlite3_serialize and sqlite3_deserialize. --- sqlite3_opt_serialize_omit.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 sqlite3_opt_serialize_omit.go (limited to 'sqlite3_opt_serialize_omit.go') diff --git a/sqlite3_opt_serialize_omit.go b/sqlite3_opt_serialize_omit.go new file mode 100644 index 0000000..b154dd3 --- /dev/null +++ b/sqlite3_opt_serialize_omit.go @@ -0,0 +1,20 @@ +// +build libsqlite3,!sqlite_serialize + +package sqlite3 + +import ( + "errors" +) + +/* +#cgo CFLAGS: -DSQLITE_OMIT_DESERIALIZE +*/ +import "C" + +func (c *SQLiteConn) Serialize(schema string) ([]byte, error) { + return nil, errors.New("sqlite3: Serialize requires the sqlite_serialize build tag when using the libsqlite3 build tag") +} + +func (c *SQLiteConn) Deserialize(b []byte, schema string) error { + return errors.New("sqlite3: Deserialize requires the sqlite_serialize build tag when using the libsqlite3 build tag") +} -- cgit v1.2.3