Next: , Previous: DSR Store Controllers, Up: Data Store API Reference


8.8 Handling Serialization

Data stores must initialize Class elephant:store-controller with internal serializer functions. Packages elephant-serializer1 and elephant-serializer2 contains serialize and deserialize methods on buffer-streams as defined in elephant-memutil. The elephant functions serialize and deserialize dispatch on the appropriate slot values of the store-controller.

NOTE: This should perhaps become entirely the job of the data store to
decide how to serialize values and for a specific version, what
serializer to use.  The elphant main package can define serializers
for use by different data stores.

— Function: elephant-data-store:serialize frob bs sc

Generic interface to serialization that dispatches based on the current Elephant version

— Function: elephant-data-store:deserialize bs sc &optional oid-only

Generic interface to serialization that dispatches based on the current Elephant version

These utility functions are useful if a data store does not have the ability to store variable length binary data. They are based on the cl-base64 library.

— Function: elephant-data-store:serialize-to-base64-string x sc

Encode object using the store controller's serializer format, but encoded in a base64

— Function: elephant-data-store:deserialize-from-base64-string x sc

Decode a base64-string using the store controller's deserialize method