| 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 t, PGType (PGElemType t)) => PGArrayType t where
- type PGElemType t :: Symbol
Documentation
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 t, PGType (PGElemType t)) => PGArrayType t where #
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.
Associated Types
type PGElemType t :: Symbol #
Methods
pgArrayElementType :: PGTypeID t -> PGTypeID (PGElemType t) #
pgArrayDelim :: PGTypeID t -> Char #
The character used as a delimeter. The default , is correct for all standard types (except box).
Instances
| PGType "\"char\"" => PGArrayType "\"char\"[]" # | |
| PGType "abstime" => PGArrayType "abstime[]" # | |
| PGType "aclitem" => PGArrayType "aclitem[]" # | |
| PGType "bigint" => PGArrayType "bigint[]" # | |
| PGType "bit" => PGArrayType "bit[]" # | |
| PGType "boolean" => PGArrayType "boolean[]" # | |
| PGType "box" => PGArrayType "box[]" # | |
| PGType "bpchar" => PGArrayType "bpchar[]" # | |
| PGType "bytea" => PGArrayType "bytea[]" # | |
| PGType "character varying" => PGArrayType "character varying[]" # | |
| PGType "cid" => PGArrayType "cid[]" # | |
| PGType "cidr" => PGArrayType "cidr[]" # | |
| PGType "circle" => PGArrayType "circle[]" # | |
| PGType "cstring" => PGArrayType "cstring[]" # | |
| PGType "date" => PGArrayType "date[]" # | |
| PGType "daterange" => PGArrayType "daterange[]" # | |
| PGType "double precision" => PGArrayType "double precision[]" # | |
| PGType "gtsvector" => PGArrayType "gtsvector[]" # | |
| PGType "inet" => PGArrayType "inet[]" # | |
| PGType "int2vector" => PGArrayType "int2vector[]" # | |
| PGType "int4range" => PGArrayType "int4range[]" # | |
| PGType "int8range" => PGArrayType "int8range[]" # | |
| PGType "integer" => PGArrayType "integer[]" # | |
| PGType "interval" => PGArrayType "interval[]" # | |
| PGType "json" => PGArrayType "json[]" # | |
| PGType "line" => PGArrayType "line[]" # | |
| PGType "lseg" => PGArrayType "lseg[]" # | |
| PGType "macaddr" => PGArrayType "macaddr[]" # | |
| PGType "money" => PGArrayType "money[]" # | |
| PGType "name" => PGArrayType "name[]" # | |
| PGType "numeric" => PGArrayType "numeric[]" # | |
| PGType "numrange" => PGArrayType "numrange[]" # | |
| PGType "oid" => PGArrayType "oid[]" # | |
| PGType "oidvector" => PGArrayType "oidvector[]" # | |
| PGType "path" => PGArrayType "path[]" # | |
| PGType "point" => PGArrayType "point[]" # | |
| PGType "polygon" => PGArrayType "polygon[]" # | |
| PGType "real" => PGArrayType "real[]" # | |
| PGType "record" => PGArrayType "record[]" # | |
| PGType "refcursor" => PGArrayType "refcursor[]" # | |
| PGType "regclass" => PGArrayType "regclass[]" # | |
| PGType "regconfig" => PGArrayType "regconfig[]" # | |
| PGType "regdictionary" => PGArrayType "regdictionary[]" # | |
| PGType "regoper" => PGArrayType "regoper[]" # | |
| PGType "regoperator" => PGArrayType "regoperator[]" # | |
| PGType "regproc" => PGArrayType "regproc[]" # | |
| PGType "regprocedure" => PGArrayType "regprocedure[]" # | |
| PGType "regtype" => PGArrayType "regtype[]" # | |
| PGType "reltime" => PGArrayType "reltime[]" # | |
| PGType "smallint" => PGArrayType "smallint[]" # | |
| PGType "text" => PGArrayType "text[]" # | |
| PGType "tid" => PGArrayType "tid[]" # | |
| PGType "time with time zone" => PGArrayType "time with time zone[]" # | |
| PGType "time without time zone" => PGArrayType "time without time zone[]" # | |
| PGType "timestamp with time zone" => PGArrayType "timestamp with time zone[]" # | |
| PGType "timestamp without time zone" => PGArrayType "timestamp without time zone[]" # | |
| PGType "tinterval" => PGArrayType "tinterval[]" # | |
| PGType "tsquery" => PGArrayType "tsquery[]" # | |
| PGType "tsrange" => PGArrayType "tsrange[]" # | |
| PGType "tstzrange" => PGArrayType "tstzrange[]" # | |
| PGType "tsvector" => PGArrayType "tsvector[]" # | |
| PGType "txid_snapshot" => PGArrayType "txid_snapshot[]" # | |
| PGType "uuid" => PGArrayType "uuid[]" # | |
| PGType "varbit" => PGArrayType "varbit[]" # | |
| PGType "xid" => PGArrayType "xid[]" # | |
| PGType "xml" => PGArrayType "xml[]" # | |
Orphan instances
| PGType "\"char\"" => PGType "\"char\"[]" # | |
| PGType "abstime" => PGType "abstime[]" # | |
| PGType "aclitem" => PGType "aclitem[]" # | |
| PGType "bigint" => PGType "bigint[]" # | |
| PGType "bit" => PGType "bit[]" # | |
| PGType "boolean" => PGType "boolean[]" # | |
| PGType "box" => PGType "box[]" # | |
| PGType "bpchar" => PGType "bpchar[]" # | |
| PGType "bytea" => PGType "bytea[]" # | |
| PGType "character varying" => PGType "character varying[]" # | |
| PGType "cid" => PGType "cid[]" # | |
| PGType "cidr" => PGType "cidr[]" # | |
| PGType "circle" => PGType "circle[]" # | |
| PGType "cstring" => PGType "cstring[]" # | |
| PGType "date" => PGType "date[]" # | |
| PGType "daterange" => PGType "daterange[]" # | |
| PGType "double precision" => PGType "double precision[]" # | |
| PGType "gtsvector" => PGType "gtsvector[]" # | |
| PGType "inet" => PGType "inet[]" # | |
| PGType "int2vector" => PGType "int2vector[]" # | |
| PGType "int4range" => PGType "int4range[]" # | |
| PGType "int8range" => PGType "int8range[]" # | |
| PGType "integer" => PGType "integer[]" # | |
| PGType "interval" => PGType "interval[]" # | |
| PGType "json" => PGType "json[]" # | |
| PGType "line" => PGType "line[]" # | |
| PGType "lseg" => PGType "lseg[]" # | |
| PGType "macaddr" => PGType "macaddr[]" # | |
| PGType "money" => PGType "money[]" # | |
| PGType "name" => PGType "name[]" # | |
| PGType "numeric" => PGType "numeric[]" # | |
| PGType "numrange" => PGType "numrange[]" # | |
| PGType "oid" => PGType "oid[]" # | |
| PGType "oidvector" => PGType "oidvector[]" # | |
| PGType "path" => PGType "path[]" # | |
| PGType "point" => PGType "point[]" # | |
| PGType "polygon" => PGType "polygon[]" # | |
| PGType "real" => PGType "real[]" # | |
| PGType "record" => PGType "record[]" # | |
| PGType "refcursor" => PGType "refcursor[]" # | |
| PGType "regclass" => PGType "regclass[]" # | |
| PGType "regconfig" => PGType "regconfig[]" # | |
| PGType "regdictionary" => PGType "regdictionary[]" # | |
| PGType "regoper" => PGType "regoper[]" # | |
| PGType "regoperator" => PGType "regoperator[]" # | |
| PGType "regproc" => PGType "regproc[]" # | |
| PGType "regprocedure" => PGType "regprocedure[]" # | |
| PGType "regtype" => PGType "regtype[]" # | |
| PGType "reltime" => PGType "reltime[]" # | |
| PGType "smallint" => PGType "smallint[]" # | |
| PGType "text" => PGType "text[]" # | |
| PGType "tid" => PGType "tid[]" # | |
| PGType "time with time zone" => PGType "time with time zone[]" # | |
| PGType "time without time zone" => PGType "time without time zone[]" # | |
| PGType "timestamp with time zone" => PGType "timestamp with time zone[]" # | |
| PGType "timestamp without time zone" => PGType "timestamp without time zone[]" # | |
| PGType "tinterval" => PGType "tinterval[]" # | |
| PGType "tsquery" => PGType "tsquery[]" # | |
| PGType "tsrange" => PGType "tsrange[]" # | |
| PGType "tstzrange" => PGType "tstzrange[]" # | |
| PGType "tsvector" => PGType "tsvector[]" # | |
| PGType "txid_snapshot" => PGType "txid_snapshot[]" # | |
| PGType "uuid" => PGType "uuid[]" # | |
| PGType "varbit" => PGType "varbit[]" # | |
| PGType "xid" => PGType "xid[]" # | |
| PGType "xml" => PGType "xml[]" # | |
| (PGArrayType t, PGColumn (PGElemType t) a) => PGColumn t (PGArray a) # | |
| (PGArrayType t, PGParameter (PGElemType t) a) => PGParameter t [a] # | Allow entirely non-null arrays as parameter inputs only. (Only supported on ghc >= 7.10 due to instance overlap.) |
| (PGArrayType t, PGParameter (PGElemType t) a) => PGParameter t (PGArray a) # | |