Copyright | 2015 Dylan Simon |
---|---|
Safe Haskell | None |
Language | Haskell98 |
Database.PostgreSQL.Typed.Array
Contents
Description
Representaion of PostgreSQL's array type. Currently this only supports one-dimensional arrays. PostgreSQL arrays in theory can dynamically be any (rectangular) shape.
- type PGArray a = [Maybe a]
- class (PGType ta, PGType t) => PGArrayType ta t | ta -> t, t -> ta where
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.
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 # | |
Orphan instances
PGType "\"char\"" => PGType "\"char\"[]" Source # | |
PGType "abstime" => PGType "abstime[]" Source # | |
PGType "aclitem" => PGType "aclitem[]" Source # | |
PGType "bigint" => PGType "bigint[]" Source # | |
PGType "bit" => PGType "bit[]" Source # | |
PGType "boolean" => PGType "boolean[]" Source # | |
PGType "box" => PGType "box[]" Source # | |
PGType "bpchar" => PGType "bpchar[]" Source # | |
PGType "bytea" => PGType "bytea[]" Source # | |
PGType "character varying" => PGType "character varying[]" Source # | |
PGType "cid" => PGType "cid[]" Source # | |
PGType "cidr" => PGType "cidr[]" Source # | |
PGType "circle" => PGType "circle[]" Source # | |
PGType "cstring" => PGType "cstring[]" Source # | |
PGType "date" => PGType "date[]" Source # | |
PGType "daterange" => PGType "daterange[]" Source # | |
PGType "double precision" => PGType "double precision[]" Source # | |
PGType "gtsvector" => PGType "gtsvector[]" Source # | |
PGType "inet" => PGType "inet[]" Source # | |
PGType "int2vector" => PGType "int2vector[]" Source # | |
PGType "int4range" => PGType "int4range[]" Source # | |
PGType "int8range" => PGType "int8range[]" Source # | |
PGType "integer" => PGType "integer[]" Source # | |
PGType "interval" => PGType "interval[]" Source # | |
PGType "json" => PGType "json[]" Source # | |
PGType "line" => PGType "line[]" Source # | |
PGType "lseg" => PGType "lseg[]" Source # | |
PGType "macaddr" => PGType "macaddr[]" Source # | |
PGType "money" => PGType "money[]" Source # | |
PGType "name" => PGType "name[]" Source # | |
PGType "numeric" => PGType "numeric[]" Source # | |
PGType "numrange" => PGType "numrange[]" Source # | |
PGType "oid" => PGType "oid[]" Source # | |
PGType "oidvector" => PGType "oidvector[]" Source # | |
PGType "path" => PGType "path[]" Source # | |
PGType "point" => PGType "point[]" Source # | |
PGType "polygon" => PGType "polygon[]" Source # | |
PGType "real" => PGType "real[]" Source # | |
PGType "record" => PGType "record[]" Source # | |
PGType "refcursor" => PGType "refcursor[]" Source # | |
PGType "regclass" => PGType "regclass[]" Source # | |
PGType "regconfig" => PGType "regconfig[]" Source # | |
PGType "regdictionary" => PGType "regdictionary[]" Source # | |
PGType "regoper" => PGType "regoper[]" Source # | |
PGType "regoperator" => PGType "regoperator[]" Source # | |
PGType "regproc" => PGType "regproc[]" Source # | |
PGType "regprocedure" => PGType "regprocedure[]" Source # | |
PGType "regtype" => PGType "regtype[]" Source # | |
PGType "reltime" => PGType "reltime[]" Source # | |
PGType "smallint" => PGType "smallint[]" Source # | |
PGType "text" => PGType "text[]" Source # | |
PGType "tid" => PGType "tid[]" Source # | |
PGType "time with time zone" => PGType "time with time zone[]" Source # | |
PGType "time without time zone" => PGType "time without time zone[]" Source # | |
PGType "timestamp with time zone" => PGType "timestamp with time zone[]" Source # | |
PGType "timestamp without time zone" => PGType "timestamp without time zone[]" Source # | |
PGType "tinterval" => PGType "tinterval[]" Source # | |
PGType "tsquery" => PGType "tsquery[]" Source # | |
PGType "tsrange" => PGType "tsrange[]" Source # | |
PGType "tstzrange" => PGType "tstzrange[]" Source # | |
PGType "tsvector" => PGType "tsvector[]" Source # | |
PGType "txid_snapshot" => PGType "txid_snapshot[]" Source # | |
PGType "uuid" => PGType "uuid[]" Source # | |
PGType "varbit" => PGType "varbit[]" Source # | |
PGType "xid" => PGType "xid[]" Source # | |
PGType "xml" => PGType "xml[]" Source # | |
(PGArrayType ta t, PGColumn t a) => PGColumn ta (PGArray a) Source # | |
(PGArrayType ta t, PGParameter t a) => PGParameter ta [a] Source # | Allow entirely non-null arrays as parameter inputs only. (Only supported on ghc >= 7.10 due to instance overlap.) |
(PGArrayType ta t, PGParameter t a) => PGParameter ta (PGArray a) Source # | |