| Copyright | 2015 Dylan Simon |
|---|---|
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
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.
Synopsis
- type PGArray a = [Maybe a]
- class (PGType t, PGType (PGElemType t)) => PGArrayType t where
- type PGElemType t :: Symbol
- pgArrayElementType :: PGTypeID t -> PGTypeID (PGElemType t)
- pgArrayDelim :: PGTypeID t -> Char
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 t, PGType (PGElemType t)) => PGArrayType t 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
Associated Types
type PGElemType t :: Symbol Source #
Methods
pgArrayElementType :: PGTypeID t -> PGTypeID (PGElemType t) Source #
pgArrayDelim :: PGTypeID t -> Char Source #
The character used as a delimeter. The default , is correct for all standard types (except box).
Instances
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 t, PGColumn (PGElemType t) a) => PGColumn t (PGArray a) Source # | |
| (PGArrayType t, PGParameter (PGElemType t) a) => PGParameter t (PGArray a) Source # | |
| (PGArrayType t, PGParameter (PGElemType t) a) => PGParameter t [a] Source # | Allow entirely non-null arrays as parameter inputs only. (Only supported on ghc >= 7.10 due to instance overlap.) |