Postgrex v0.11.1 Postgrex.Types

Encodes and decodes between Postgres’ protocol and Elixir values.

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

Types

oid :: pos_integer

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

state

State used by the encoder/decoder functions

Functions

decode(oid, binary, state)

Specs

decode(oid, binary, state) :: term

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

decode(extension, oid, binary, state)

Specs

decode(Postgrex.Extension.t, oid, binary, state) :: term

Decodes a binary with the extension for the given type.

encode(oid, value, state)

Specs

encode(oid, term, state) :: binary

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

encode(extension, oid, value, state)

Specs

encode(Postgrex.Extension.t, oid, term, state) :: binary

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