diff options
author | Philip O'Toole <philip.otoole@yahoo.com> | 2022-11-17 08:03:02 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-17 08:03:02 -0500 |
commit | 1603038a4dc1f945229836bc49aa448f571ab288 (patch) | |
tree | fba7c7dc96a7f584912b29b511be9dbd73cff34c /sqlite3_opt_serialize_omit.go | |
parent | Update expected test output (diff) | |
download | golite-1603038a4dc1f945229836bc49aa448f571ab288.tar.gz golite-1603038a4dc1f945229836bc49aa448f571ab288.tar.xz |
Add Serialize and Deserialize support (#1089)
Add support for Serialize and Deserialize, which wrap sqlite3_serialize and sqlite3_deserialize.
Diffstat (limited to 'sqlite3_opt_serialize_omit.go')
-rw-r--r-- | sqlite3_opt_serialize_omit.go | 20 |
1 files changed, 20 insertions, 0 deletions
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") +} |