See also: epgsql_codec, epgsql_wire.
abstract datatype: codec()
abstract datatype: decoder()
maybe_unknown_type() = type() | {unknown_oid, epgsql_oid_db:oid()}
nulls() = [any(), ...]
opts() = #{nulls => nulls()}
type() = epgsql:type_name() | {array, epgsql:type_name()}
decode/2 | decode single cell. |
decode_array/3 | |
decode_record/3 | |
encode/3 | |
is_null/2 | Returns true if Value is a term representing NULL |
new_codec/2 | |
null/1 | Return the value that represents NULL (1st element of nulls list). |
oid_to_decoder/3 | generate decoder to decode PG binary of datatype specified as OID. |
oid_to_info/2 | |
oid_to_name/2 | |
supports/2 | |
type_to_oid/2 | |
typeinfo_to_name_array/2 | |
typeinfo_to_oid_info/2 | |
update_codec/2 |
decode(Bin::binary(), X2::decoder()) -> any()
decode single cell
decode_array(X1, X2, ArrayDecoder) -> any()
decode_record(X1, X2, Codec) -> any()
encode(TypeName::epgsql:type_name() | {array, epgsql:type_name()}, Value::any(), Codec::codec()) -> iolist()
is_null(Value::any(), Codec::codec()) -> boolean()
Returns true
if Value
is a term representing NULL
new_codec(PgSock::epgsql_sock:pg_sock(), Opts::opts()) -> codec()
null(Codec::codec()) -> any()
Return the value that represents NULL (1st element of nulls
list)
oid_to_decoder(Oid::epgsql_oid_db:oid(), Format::binary | text, Codec::codec()) -> decoder()
generate decoder to decode PG binary of datatype specified as OID
oid_to_info(Oid::epgsql_oid_db:oid(), Codec::codec()) -> epgsql_oid_db:type_info() | undefined
oid_to_name(Oid::epgsql_oid_db:oid(), Codec::codec()) -> maybe_unknown_type()
supports(RecOid, Codec) -> any()
type_to_oid(Name::type(), Codec::codec()) -> epgsql_oid_db:oid()
typeinfo_to_name_array(Unknown::Unknown | epgsql_oid_db:type_info(), X2::term()) -> Unknown | type()
typeinfo_to_oid_info(Unknown::Unknown | epgsql_oid_db:type_info(), X2::term()) -> Unknown | epgsql_oid_db:oid_info()
update_codec(TypeInfos::[epgsql_oid_db:type_info()], Codec::codec()) -> codec()
Generated by EDoc