View Source EdgeDB.Protocol.Codec protocol (EdgeDB v0.4.0)

A codec knows how to work with the internal binary data from EdgeDB. The binary protocol specification for the codecs can be found on the official EdgeDB site. Useful links for codec developers:

Link to this section Summary

Types

Codec ID.

t()

Functions

Function that can decode EdgeDB binary format into an entity.

Function that can encode an entity to EdgeDB binary format.

Link to this section Types

Link to this section Functions

Link to this function

decode(codec, data, codec_storage)

View Source
@spec decode(t(), bitstring(), EdgeDB.Protocol.CodecStorage.t()) :: value
when value: term()

Function that can decode EdgeDB binary format into an entity.

Link to this function

encode(codec, value, codec_storage)

View Source
@spec encode(t(), value, EdgeDB.Protocol.CodecStorage.t()) :: iodata()
when value: term()

Function that can encode an entity to EdgeDB binary format.