Postgrex v0.12.2 Postgrex.Types View Source

Encodes and decodes between Postgres’ protocol and Elixir values.

Link to this section Summary

Types

Postgres internal identifier that maps to a type. See http://www.postgresql.org/docs/9.4/static/datatype-oid.html

State used by the encoder/decoder functions

Functions

Decodes a binary to an Elixir value for the given type

Decodes a binary with the extension for the given type

Encodes an Elixir term to a binary for the given type

Encodes an Elixir term with the extension for the given type

Link to this section Types

Link to this type oid() View Source
oid() :: pos_integer

Postgres internal identifier that maps to a type. See http://www.postgresql.org/docs/9.4/static/datatype-oid.html.

State used by the encoder/decoder functions

Link to this section Functions

Link to this function decode(oid, binary, state) View Source
decode(oid, binary, state) :: term

Decodes a binary to an Elixir value for the given type.

Link to this function decode(extension, oid, binary, state) View Source
decode(Postgrex.Extension.t, oid, binary, state) :: term

Decodes a binary with the extension for the given type.

Link to this function encode(oid, value, state) View Source
encode(oid, term, state) :: binary

Encodes an Elixir term to a binary for the given type.

Link to this function encode(extension, oid, value, state) View Source
encode(Postgrex.Extension.t, oid, term, state) :: binary

Encodes an Elixir term with the extension for the given type.