pg_value/type_info
This module provides a TypeInfo record and builder functions intended
for use by PostgreSQL client libraries. Applications should not have to
use anything in this module and instead use the pg_value module.
Types
Information about a PostgreSQL type. Needed for encoding and decoding Values.
pub type TypeInfo {
TypeInfo(
oid: Int,
name: String,
typesend: String,
typereceive: String,
typelen: Int,
output: String,
input: String,
elem_oid: Int,
elem_type: option.Option(TypeInfo),
base_oid: Int,
comp_oids: List(Int),
comp_types: option.Option(List(TypeInfo)),
)
}
Constructors
-
TypeInfo( oid: Int, name: String, typesend: String, typereceive: String, typelen: Int, output: String, input: String, elem_oid: Int, elem_type: option.Option(TypeInfo), base_oid: Int, comp_oids: List(Int), comp_types: option.Option(List(TypeInfo)), )
Values
pub fn base_oid(ti: TypeInfo, base_oid: Int) -> TypeInfo
Sets the base_oid value of a TypeInfo record.
pub fn comp_oids(ti: TypeInfo, comp_oids: List(Int)) -> TypeInfo
Sets the comp_oids value of a TypeInfo record.
pub fn comp_types(
ti: TypeInfo,
comp_types: option.Option(List(TypeInfo)),
) -> TypeInfo
Sets the comp_types value of a TypeInfo record.
pub fn elem_oid(ti: TypeInfo, elem_oid: Int) -> TypeInfo
Sets the elem_oid value of a TypeInfo record.
pub fn elem_type(
ti: TypeInfo,
elem_type: option.Option(TypeInfo),
) -> TypeInfo
Sets the elem_type value of a TypeInfo record.
pub fn new(oid: Int) -> TypeInfo
Returns a TypeInfo record with the provided oid Int, with all other values empty.