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