preql-0.2: safe PostgreSQL queries using Quasiquoters

Safe HaskellNone
LanguageHaskell2010

Preql.Wire.FromSql

Description

Decoding values from Postgres wire format to Haskell.

Synopsis

Documentation

data FieldDecoder a Source #

A FieldDecoder for a type a consists of an OID indicating the Postgres type which can be decoded, and a parser from the binary representation of that type to the Haskell representation.

Constructors

FieldDecoder Oid (BinaryParser a) 
Instances
Functor FieldDecoder Source # 
Instance details

Defined in Preql.Wire.FromSql

Methods

fmap :: (a -> b) -> FieldDecoder a -> FieldDecoder b #

(<$) :: a -> FieldDecoder b -> FieldDecoder a #

class FromSqlField a where Source #

Instances
FromSqlField Bool Source # 
Instance details

Defined in Preql.Wire.FromSql

FromSqlField Double Source # 
Instance details

Defined in Preql.Wire.FromSql

FromSqlField Float Source # 
Instance details

Defined in Preql.Wire.FromSql

FromSqlField Int16 Source # 
Instance details

Defined in Preql.Wire.FromSql

FromSqlField Int32 Source # 
Instance details

Defined in Preql.Wire.FromSql

FromSqlField Int64 Source # 
Instance details

Defined in Preql.Wire.FromSql

FromSqlField ByteString Source #

If you want to encode some more specific Haskell type via JSON, it is more efficient to use encode and jsonb_bytes directly, rather than this instance.

Instance details

Defined in Preql.Wire.FromSql

FromSqlField ByteString Source # 
Instance details

Defined in Preql.Wire.FromSql

FromSqlField Text Source # 
Instance details

Defined in Preql.Wire.FromSql

FromSqlField UTCTime Source # 
Instance details

Defined in Preql.Wire.FromSql

FromSqlField Value Source #

If you want to encode some more specific Haskell type via JSON, it is more efficient to use fromSqlJsonField rather than this instance.

Instance details

Defined in Preql.Wire.FromSql

FromSqlField Text Source # 
Instance details

Defined in Preql.Wire.FromSql

FromSqlField String Source # 
Instance details

Defined in Preql.Wire.FromSql

FromSqlField UUID Source # 
Instance details

Defined in Preql.Wire.FromSql

FromSqlField Day Source # 
Instance details

Defined in Preql.Wire.FromSql

FromSqlField TimeOfDay Source # 
Instance details

Defined in Preql.Wire.FromSql

FromSqlField TimeTZ Source # 
Instance details

Defined in Preql.Wire.FromSql

class FromSql a where Source #

Instances
FromSql Bool Source # 
Instance details

Defined in Preql.Wire.FromSql

FromSql Double Source # 
Instance details

Defined in Preql.Wire.FromSql

FromSql Float Source # 
Instance details

Defined in Preql.Wire.FromSql

FromSql Int16 Source # 
Instance details

Defined in Preql.Wire.FromSql

FromSql Int32 Source # 
Instance details

Defined in Preql.Wire.FromSql

FromSql Int64 Source # 
Instance details

Defined in Preql.Wire.FromSql

FromSql ByteString Source # 
Instance details

Defined in Preql.Wire.FromSql

FromSql ByteString Source # 
Instance details

Defined in Preql.Wire.FromSql

FromSql Text Source # 
Instance details

Defined in Preql.Wire.FromSql

FromSql UTCTime Source # 
Instance details

Defined in Preql.Wire.FromSql

FromSql Value Source # 
Instance details

Defined in Preql.Wire.FromSql

FromSql Text Source # 
Instance details

Defined in Preql.Wire.FromSql

FromSql String Source # 
Instance details

Defined in Preql.Wire.FromSql

FromSql UUID Source # 
Instance details

Defined in Preql.Wire.FromSql

FromSql Day Source # 
Instance details

Defined in Preql.Wire.FromSql

FromSql TimeOfDay Source # 
Instance details

Defined in Preql.Wire.FromSql

FromSql TimeTZ Source # 
Instance details

Defined in Preql.Wire.FromSql

FromSqlField a => FromSql (Maybe a) Source # 
Instance details

Defined in Preql.Wire.FromSql

(FromSql a, FromSql b) => FromSql (a, b) Source # 
Instance details

Defined in Preql.Wire.FromSql

Methods

fromSql :: RowDecoder (a, b) Source #

(FromSql a, FromSql b, FromSql c) => FromSql (a, b, c) Source # 
Instance details

Defined in Preql.Wire.FromSql

Methods

fromSql :: RowDecoder (a, b, c) Source #

(FromSql a, FromSql b, FromSql c, FromSql d) => FromSql (a, b, c, d) Source # 
Instance details

Defined in Preql.Wire.FromSql

Methods

fromSql :: RowDecoder (a, b, c, d) Source #

(FromSql a, FromSql b, FromSql c, FromSql d, FromSql e) => FromSql (a, b, c, d, e) Source # 
Instance details

Defined in Preql.Wire.FromSql

Methods

fromSql :: RowDecoder (a, b, c, d, e) Source #

(FromSql a, FromSql b, FromSql c, FromSql d, FromSql e, FromSql f) => FromSql (a, b, c, d, e, f) Source # 
Instance details

Defined in Preql.Wire.FromSql

Methods

fromSql :: RowDecoder (a, b, c, d, e, f) Source #

(FromSql a, FromSql b, FromSql c, FromSql d, FromSql e, FromSql f, FromSql g) => FromSql (a, b, c, d, e, f, g) Source # 
Instance details

Defined in Preql.Wire.FromSql

Methods

fromSql :: RowDecoder (a, b, c, d, e, f, g) Source #

(FromSql a, FromSql b, FromSql c, FromSql d, FromSql e, FromSql f, FromSql g, FromSql h) => FromSql (a, b, c, d, e, f, g, h) Source # 
Instance details

Defined in Preql.Wire.FromSql

Methods

fromSql :: RowDecoder (a, b, c, d, e, f, g, h) Source #

(FromSql a, FromSql b, FromSql c, FromSql d, FromSql e, FromSql f, FromSql g, FromSql h, FromSql i) => FromSql (a, b, c, d, e, f, g, h, i) Source # 
Instance details

Defined in Preql.Wire.FromSql

Methods

fromSql :: RowDecoder (a, b, c, d, e, f, g, h, i) Source #

(FromSql a, FromSql b, FromSql c, FromSql d, FromSql e, FromSql f, FromSql g, FromSql h, FromSql i, FromSql j) => FromSql (a, b, c, d, e, f, g, h, i, j) Source # 
Instance details

Defined in Preql.Wire.FromSql

Methods

fromSql :: RowDecoder (a, b, c, d, e, f, g, h, i, j) Source #

(FromSql a, FromSql b, FromSql c, FromSql d, FromSql e, FromSql f, FromSql g, FromSql h, FromSql i, FromSql j, FromSql k) => FromSql (a, b, c, d, e, f, g, h, i, j, k) Source # 
Instance details

Defined in Preql.Wire.FromSql

Methods

fromSql :: RowDecoder (a, b, c, d, e, f, g, h, i, j, k) Source #

(FromSql a, FromSql b, FromSql c, FromSql d, FromSql e, FromSql f, FromSql g, FromSql h, FromSql i, FromSql j, FromSql k, FromSql l) => FromSql (a, b, c, d, e, f, g, h, i, j, k, l) Source # 
Instance details

Defined in Preql.Wire.FromSql

Methods

fromSql :: RowDecoder (a, b, c, d, e, f, g, h, i, j, k, l) Source #

(FromSql a, FromSql b, FromSql c, FromSql d, FromSql e, FromSql f, FromSql g, FromSql h, FromSql i, FromSql j, FromSql k, FromSql l, FromSql m) => FromSql (a, b, c, d, e, f, g, h, i, j, k, l, m) Source # 
Instance details

Defined in Preql.Wire.FromSql

Methods

fromSql :: RowDecoder (a, b, c, d, e, f, g, h, i, j, k, l, m) Source #

(FromSql a, FromSql b, FromSql c, FromSql d, FromSql e, FromSql f, FromSql g, FromSql h, FromSql i, FromSql j, FromSql k, FromSql l, FromSql m, FromSql n) => FromSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source # 
Instance details

Defined in Preql.Wire.FromSql

Methods

fromSql :: RowDecoder (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source #

(FromSql a, FromSql b, FromSql c, FromSql d, FromSql e, FromSql f, FromSql g, FromSql h, FromSql i, FromSql j, FromSql k, FromSql l, FromSql m, FromSql n, FromSql o) => FromSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source # 
Instance details

Defined in Preql.Wire.FromSql

Methods

fromSql :: RowDecoder (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source #

(FromSql a, FromSql b, FromSql c, FromSql d, FromSql e, FromSql f, FromSql g, FromSql h, FromSql i, FromSql j, FromSql k, FromSql l, FromSql m, FromSql n, FromSql o, FromSql p) => FromSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) Source # 
Instance details

Defined in Preql.Wire.FromSql

Methods

fromSql :: RowDecoder (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) Source #

(FromSql a, FromSql b, FromSql c, FromSql d, FromSql e, FromSql f, FromSql g, FromSql h, FromSql i, FromSql j, FromSql k, FromSql l, FromSql m, FromSql n, FromSql o, FromSql p, FromSql q) => FromSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) Source # 
Instance details

Defined in Preql.Wire.FromSql

Methods

fromSql :: RowDecoder (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) Source #

(FromSql a, FromSql b, FromSql c, FromSql d, FromSql e, FromSql f, FromSql g, FromSql h, FromSql i, FromSql j, FromSql k, FromSql l, FromSql m, FromSql n, FromSql o, FromSql p, FromSql q, FromSql r) => FromSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) Source # 
Instance details

Defined in Preql.Wire.FromSql

Methods

fromSql :: RowDecoder (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) Source #

(FromSql a, FromSql b, FromSql c, FromSql d, FromSql e, FromSql f, FromSql g, FromSql h, FromSql i, FromSql j, FromSql k, FromSql l, FromSql m, FromSql n, FromSql o, FromSql p, FromSql q, FromSql r, FromSql s) => FromSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) Source # 
Instance details

Defined in Preql.Wire.FromSql

Methods

fromSql :: RowDecoder (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) Source #

(FromSql a, FromSql b, FromSql c, FromSql d, FromSql e, FromSql f, FromSql g, FromSql h, FromSql i, FromSql j, FromSql k, FromSql l, FromSql m, FromSql n, FromSql o, FromSql p, FromSql q, FromSql r, FromSql s, FromSql t) => FromSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) Source # 
Instance details

Defined in Preql.Wire.FromSql

Methods

fromSql :: RowDecoder (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) Source #

(FromSql a, FromSql b, FromSql c, FromSql d, FromSql e, FromSql f, FromSql g, FromSql h, FromSql i, FromSql j, FromSql k, FromSql l, FromSql m, FromSql n, FromSql o, FromSql p, FromSql q, FromSql r, FromSql s, FromSql t, FromSql u) => FromSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) Source # 
Instance details

Defined in Preql.Wire.FromSql

Methods

fromSql :: RowDecoder (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) Source #

(FromSql a, FromSql b, FromSql c, FromSql d, FromSql e, FromSql f, FromSql g, FromSql h, FromSql i, FromSql j, FromSql k, FromSql l, FromSql m, FromSql n, FromSql o, FromSql p, FromSql q, FromSql r, FromSql s, FromSql t, FromSql u, FromSql v) => FromSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) Source # 
Instance details

Defined in Preql.Wire.FromSql

Methods

fromSql :: RowDecoder (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) Source #

(FromSql a, FromSql b, FromSql c, FromSql d, FromSql e, FromSql f, FromSql g, FromSql h, FromSql i, FromSql j, FromSql k, FromSql l, FromSql m, FromSql n, FromSql o, FromSql p, FromSql q, FromSql r, FromSql s, FromSql t, FromSql u, FromSql v, FromSql w) => FromSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) Source # 
Instance details

Defined in Preql.Wire.FromSql

Methods

fromSql :: RowDecoder (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) Source #

(FromSql a, FromSql b, FromSql c, FromSql d, FromSql e, FromSql f, FromSql g, FromSql h, FromSql i, FromSql j, FromSql k, FromSql l, FromSql m, FromSql n, FromSql o, FromSql p, FromSql q, FromSql r, FromSql s, FromSql t, FromSql u, FromSql v, FromSql w, FromSql x) => FromSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) Source # 
Instance details

Defined in Preql.Wire.FromSql

Methods

fromSql :: RowDecoder (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) Source #

(FromSql a, FromSql b, FromSql c, FromSql d, FromSql e, FromSql f, FromSql g, FromSql h, FromSql i, FromSql j, FromSql k, FromSql l, FromSql m, FromSql n, FromSql o, FromSql p, FromSql q, FromSql r, FromSql s, FromSql t, FromSql u, FromSql v, FromSql w, FromSql x, FromSql y) => FromSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) Source # 
Instance details

Defined in Preql.Wire.FromSql

Methods

fromSql :: RowDecoder (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) Source #