postgresql-typed-0.4.2.1: A PostgreSQL access library with compile-time SQL type inference

Copyright2015 Dylan Simon
Safe HaskellNone
LanguageHaskell98

Database.PostgreSQL.Typed.Array

Description

Representaion of PostgreSQL's array type. Currently this only supports one-dimensional arrays. PostgreSQL arrays in theory can dynamically be any (rectangular) shape.

Synopsis

Documentation

type PGArray a = [Maybe a] Source

The cannonical representation of a PostgreSQL array of any type, which may always contain NULLs. Currenly only one-dimetional arrays are supported, although in PostgreSQL, any array may be of any dimentionality.

class (PGType ta, PGType t) => PGArrayType ta t | ta -> t, t -> ta where Source

Class indicating that the first PostgreSQL type is an array of the second. This implies PGParameter and PGColumn instances that will work for any type using comma as a delimiter (i.e., anything but box). This will only work with 1-dimensional arrays.

Minimal complete definition

Nothing

Methods

pgArrayElementType :: PGTypeName ta -> PGTypeName t Source

pgArrayDelim :: PGTypeName ta -> Char Source

The character used as a delimeter. The default , is correct for all standard types (except box).

Instances

PGType "\"char\"" => PGArrayType "\"char\"[]" "\"char\"" Source 
PGType "abstime" => PGArrayType "abstime[]" "abstime" Source 
PGType "aclitem" => PGArrayType "aclitem[]" "aclitem" Source 
PGType "bigint" => PGArrayType "bigint[]" "bigint" Source 
PGType "bit" => PGArrayType "bit[]" "bit" Source 
PGType "boolean" => PGArrayType "boolean[]" "boolean" Source 
PGType "box" => PGArrayType "box[]" "box" Source 
PGType "bpchar" => PGArrayType "bpchar[]" "bpchar" Source 
PGType "bytea" => PGArrayType "bytea[]" "bytea" Source 
PGType "character varying" => PGArrayType "character varying[]" "character varying" Source 
PGType "cid" => PGArrayType "cid[]" "cid" Source 
PGType "cidr" => PGArrayType "cidr[]" "cidr" Source 
PGType "circle" => PGArrayType "circle[]" "circle" Source 
PGType "cstring" => PGArrayType "cstring[]" "cstring" Source 
PGType "date" => PGArrayType "date[]" "date" Source 
PGType "daterange" => PGArrayType "daterange[]" "daterange" Source 
PGType "double precision" => PGArrayType "double precision[]" "double precision" Source 
PGType "gtsvector" => PGArrayType "gtsvector[]" "gtsvector" Source 
PGType "inet" => PGArrayType "inet[]" "inet" Source 
PGType "int2vector" => PGArrayType "int2vector[]" "int2vector" Source 
PGType "int4range" => PGArrayType "int4range[]" "int4range" Source 
PGType "int8range" => PGArrayType "int8range[]" "int8range" Source 
PGType "integer" => PGArrayType "integer[]" "integer" Source 
PGType "interval" => PGArrayType "interval[]" "interval" Source 
PGType "json" => PGArrayType "json[]" "json" Source 
PGType "line" => PGArrayType "line[]" "line" Source 
PGType "lseg" => PGArrayType "lseg[]" "lseg" Source 
PGType "macaddr" => PGArrayType "macaddr[]" "macaddr" Source 
PGType "money" => PGArrayType "money[]" "money" Source 
PGType "name" => PGArrayType "name[]" "name" Source 
PGType "numeric" => PGArrayType "numeric[]" "numeric" Source 
PGType "numrange" => PGArrayType "numrange[]" "numrange" Source 
PGType "oid" => PGArrayType "oid[]" "oid" Source 
PGType "oidvector" => PGArrayType "oidvector[]" "oidvector" Source 
PGType "path" => PGArrayType "path[]" "path" Source 
PGType "point" => PGArrayType "point[]" "point" Source 
PGType "polygon" => PGArrayType "polygon[]" "polygon" Source 
PGType "real" => PGArrayType "real[]" "real" Source 
PGType "record" => PGArrayType "record[]" "record" Source 
PGType "refcursor" => PGArrayType "refcursor[]" "refcursor" Source 
PGType "regclass" => PGArrayType "regclass[]" "regclass" Source 
PGType "regconfig" => PGArrayType "regconfig[]" "regconfig" Source 
PGType "regdictionary" => PGArrayType "regdictionary[]" "regdictionary" Source 
PGType "regoper" => PGArrayType "regoper[]" "regoper" Source 
PGType "regoperator" => PGArrayType "regoperator[]" "regoperator" Source 
PGType "regproc" => PGArrayType "regproc[]" "regproc" Source 
PGType "regprocedure" => PGArrayType "regprocedure[]" "regprocedure" Source 
PGType "regtype" => PGArrayType "regtype[]" "regtype" Source 
PGType "reltime" => PGArrayType "reltime[]" "reltime" Source 
PGType "smallint" => PGArrayType "smallint[]" "smallint" Source 
PGType "text" => PGArrayType "text[]" "text" Source 
PGType "tid" => PGArrayType "tid[]" "tid" Source 
PGType "time with time zone" => PGArrayType "time with time zone[]" "time with time zone" Source 
PGType "time without time zone" => PGArrayType "time without time zone[]" "time without time zone" Source 
PGType "timestamp with time zone" => PGArrayType "timestamp with time zone[]" "timestamp with time zone" Source 
PGType "timestamp without time zone" => PGArrayType "timestamp without time zone[]" "timestamp without time zone" Source 
PGType "tinterval" => PGArrayType "tinterval[]" "tinterval" Source 
PGType "tsquery" => PGArrayType "tsquery[]" "tsquery" Source 
PGType "tsrange" => PGArrayType "tsrange[]" "tsrange" Source 
PGType "tstzrange" => PGArrayType "tstzrange[]" "tstzrange" Source 
PGType "tsvector" => PGArrayType "tsvector[]" "tsvector" Source 
PGType "txid_snapshot" => PGArrayType "txid_snapshot[]" "txid_snapshot" Source 
PGType "uuid" => PGArrayType "uuid[]" "uuid" Source 
PGType "varbit" => PGArrayType "varbit[]" "varbit" Source 
PGType "xid" => PGArrayType "xid[]" "xid" Source 
PGType "xml" => PGArrayType "xml[]" "xml" Source