hasql/library/Hasql/Encoders.hs

56 lines
779 B
Haskell
Raw Normal View History

2019-05-20 19:24:27 +03:00
{-|
A DSL for declaration of statement parameter encoders.
For compactness of names all the types defined here imply being an encoder.
E.g., the `Array` type is an __encoder__ of arrays, not the data-structure itself.
-}
2015-12-05 09:09:31 +03:00
module Hasql.Encoders
2015-11-08 21:09:42 +03:00
(
2019-05-20 19:24:27 +03:00
-- * Parameters product
2015-11-08 21:09:42 +03:00
Params,
2019-05-20 19:24:27 +03:00
noParams,
2018-05-23 13:04:13 +03:00
param,
2019-05-20 19:24:27 +03:00
-- * Nullability
NullableOrNot,
nonNullable,
nullable,
-- * Param
Param,
primitive,
array,
-- * Primitive
Primitive,
2015-11-08 21:09:42 +03:00
bool,
int2,
int4,
int8,
float4,
float8,
numeric,
char,
text,
bytea,
date,
timestamp,
timestamptz,
time,
timetz,
interval,
uuid,
2017-03-14 18:11:42 +03:00
inet,
2015-11-08 21:09:42 +03:00
json,
2016-02-09 13:14:19 +03:00
jsonBytes,
2016-01-29 11:46:18 +03:00
jsonb,
2016-02-09 13:14:19 +03:00
jsonbBytes,
2015-11-10 17:53:14 +03:00
enum,
2016-01-12 10:55:36 +03:00
unknown,
2015-11-08 21:09:42 +03:00
-- * Array
Array,
2018-05-23 13:04:13 +03:00
element,
dimension,
2019-05-20 19:24:27 +03:00
foldableDimension,
2015-11-08 21:09:42 +03:00
)
where
2019-05-20 19:24:27 +03:00
import Hasql.Private.Encoders