Authors: Sergey Prokhorov (me@seriyps.ru).
abstract datatype: db()
oid() = non_neg_integer()
Row of typname
, oid
, typarray
from pg_type table.
oid_entry() = {epgsql:type_name(), Oid::oid(), ArrayOid::oid()}
oid_info() = {Oid::oid(), epgsql:type_name(), IsArray::boolean()}
abstract datatype: type_info()
build_query/1 | build query to fetch OID to type_name information from PG server. |
find_by_name/3 | find type by type name. |
find_by_oid/2 | find type by OID. |
from_list/1 | |
join_codecs_oids/2 | Build list of #type{}'s by merging oid and codec lists by type name. |
oid_by_name/3 | lookup OID by type name. |
parse_rows/1 | Parse result of squery(build_query(...)) |
to_list/1 | |
type_to_codec_entry/1 | convert type to codec_entry(). |
type_to_element_oid/1 | For array types return its element's OID. |
type_to_oid_info/1 | Convert type tp oid_info(). |
update/2 | update DB adding new type definitions. |
build_query(TypeNames::[epgsql:type_name() | binary()]) -> iolist()
build query to fetch OID to type_name information from PG server
find_by_name(Name::epgsql:type_name(), IsArray::boolean(), Oid_db::db()) -> type_info()
find type by type name
find_by_oid(Oid::oid(), Oid_db::db()) -> type_info() | undefined
find type by OID
from_list(Types::[type_info()]) -> db()
join_codecs_oids(Oids::ordsets:ordset(oid_entry()), Codecs::ordsets:ordset(epgsql_codec:codec_entry())) -> [type_info()]
Build list of #type{}'s by merging oid and codec lists by type name.
oid_by_name(Name::epgsql:type_name(), IsArray::boolean(), Oid_db::db()) -> oid()
lookup OID by type name. May fall
parse_rows(Rows::ordsets:ordset({binary(), binary(), binary()})) -> ordsets:ordset(oid_entry())
Parse result of squery(build_query(...))
to_list(Oid_db) -> any()
type_to_codec_entry(Type::type_info()) -> epgsql_codec:codec_entry()
convert type to codec_entry()
type_to_element_oid(Type::type_info()) -> oid() | undefined
For array types return its element's OID
type_to_oid_info(Type::type_info()) -> oid_info()
Convert type tp oid_info()
update(Types::[type_info()], Oid_db::db()) -> db()
update DB adding new type definitions. If some of type definitions already exist, old ones will be overwritten by new ones
Generated by EDoc