Safe Haskell | None |
---|---|
Language | Haskell2010 |
An intermediate array representation and utilities for its (de)composition.
Documentation
type Data = ([Dimension], [Value], Bool, Word32) Source
A representation of a data serializable to the PostgreSQL array binary format.
Consists of a list of dimensions, a list of encoded elements, a flag specifying, whether it contains any nulls, and an oid.
type Dimension = (Word32, Word32) Source
A width and a lower bound.
Currently the lower bound is only allowed to have a value of 1
.
type Value = Maybe ByteString Source
An encoded value. Nothing
if it represents a NULL
.
asSingleton :: Data -> Maybe Value Source
Access a value of data, if the data represents a single value.
fromListUnsafe :: [Data] -> Data Source
Construct from a non-empty list, taking the shared parameters from the first element.