odbc-0.2.0: Haskell binding to the ODBC API, aimed at SQL Server driver

Safe HaskellNone
LanguageHaskell2010

Database.ODBC.Conversion

Description

Conversion conveniences.

Synopsis

Documentation

class FromValue a where Source #

Convert from a Value to a regular Haskell value.

Minimal complete definition

fromValue

Methods

fromValue :: Value -> Either String a Source #

The String is used for a helpful error message.

Instances

FromValue Bool Source # 
FromValue Double Source # 
FromValue Float Source # 
FromValue Int Source # 
FromValue Word8 Source # 
FromValue ByteString Source # 
FromValue ByteString Source # 
FromValue Text Source # 
FromValue Text Source # 
FromValue LocalTime Source # 
FromValue TimeOfDay Source # 
FromValue Day Source # 
FromValue Binary Source # 
FromValue Value Source # 
FromValue Smalldatetime Source # 
FromValue Datetime2 Source # 
FromValue a => FromValue (Maybe a) Source # 

class FromRow r where Source #

For producing rows from a list of column values.

You can get a row of a single type like Text or a list e.g. [Maybe Value] if you don't know what you're dealing with, or a tuple e.g. (Text, Int, Bool).

Minimal complete definition

fromRow

Methods

fromRow :: [Value] -> Either String r Source #

Instances

FromRow Bool Source # 
FromRow Double Source # 
FromRow Float Source # 
FromRow Int Source # 
FromRow Word8 Source # 
FromRow ByteString Source # 
FromRow ByteString Source # 
FromRow Text Source # 
FromRow Text Source # 
FromRow LocalTime Source # 
FromRow TimeOfDay Source # 
FromRow Day Source # 
FromRow Binary Source # 
FromRow Value Source # 
FromRow [Value] Source # 
FromValue v => FromRow (Maybe v) Source # 

Methods

fromRow :: [Value] -> Either String (Maybe v) Source #

FromValue v => FromRow (Identity v) Source # 
(FromValue a, FromValue b) => FromRow (a, b) Source # 

Methods

fromRow :: [Value] -> Either String (a, b) Source #

(FromValue a, FromValue b, FromValue c) => FromRow (a, b, c) Source # 

Methods

fromRow :: [Value] -> Either String (a, b, c) Source #

(FromValue a, FromValue b, FromValue c, FromValue d) => FromRow (a, b, c, d) Source # 

Methods

fromRow :: [Value] -> Either String (a, b, c, d) Source #

(FromValue a, FromValue b, FromValue c, FromValue d, FromValue e) => FromRow (a, b, c, d, e) Source # 

Methods

fromRow :: [Value] -> Either String (a, b, c, d, e) Source #

(FromValue a, FromValue b, FromValue c, FromValue d, FromValue e, FromValue f) => FromRow (a, b, c, d, e, f) Source # 

Methods

fromRow :: [Value] -> Either String (a, b, c, d, e, f) Source #

(FromValue a, FromValue b, FromValue c, FromValue d, FromValue e, FromValue f, FromValue g) => FromRow (a, b, c, d, e, f, g) Source # 

Methods

fromRow :: [Value] -> Either String (a, b, c, d, e, f, g) Source #

(FromValue a, FromValue b, FromValue c, FromValue d, FromValue e, FromValue f, FromValue g, FromValue h) => FromRow (a, b, c, d, e, f, g, h) Source # 

Methods

fromRow :: [Value] -> Either String (a, b, c, d, e, f, g, h) Source #

(FromValue a, FromValue b, FromValue c, FromValue d, FromValue e, FromValue f, FromValue g, FromValue h, FromValue i) => FromRow (a, b, c, d, e, f, g, h, i) Source # 

Methods

fromRow :: [Value] -> Either String (a, b, c, d, e, f, g, h, i) Source #

(FromValue a, FromValue b, FromValue c, FromValue d, FromValue e, FromValue f, FromValue g, FromValue h, FromValue i, FromValue j) => FromRow (a, b, c, d, e, f, g, h, i, j) Source # 

Methods

fromRow :: [Value] -> Either String (a, b, c, d, e, f, g, h, i, j) Source #

(FromValue a, FromValue b, FromValue c, FromValue d, FromValue e, FromValue f, FromValue g, FromValue h, FromValue i, FromValue j, FromValue k) => FromRow (a, b, c, d, e, f, g, h, i, j, k) Source # 

Methods

fromRow :: [Value] -> Either String (a, b, c, d, e, f, g, h, i, j, k) Source #

(FromValue a, FromValue b, FromValue c, FromValue d, FromValue e, FromValue f, FromValue g, FromValue h, FromValue i, FromValue j, FromValue k, FromValue l) => FromRow (a, b, c, d, e, f, g, h, i, j, k, l) Source # 

Methods

fromRow :: [Value] -> Either String (a, b, c, d, e, f, g, h, i, j, k, l) Source #

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

Methods

fromRow :: [Value] -> Either String (a, b, c, d, e, f, g, h, i, j, k, l, m) Source #

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

Methods

fromRow :: [Value] -> Either String (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source #

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

Methods

fromRow :: [Value] -> Either String (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source #

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

Methods

fromRow :: [Value] -> Either String (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) Source #

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

Methods

fromRow :: [Value] -> Either String (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) Source #

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

Methods

fromRow :: [Value] -> Either String (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) Source #

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

Methods

fromRow :: [Value] -> Either String (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) Source #

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

Methods

fromRow :: [Value] -> Either String (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) Source #

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

Methods

fromRow :: [Value] -> Either String (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) Source #

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

Methods

fromRow :: [Value] -> Either String (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) Source #

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

Methods

fromRow :: [Value] -> Either String (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) Source #

(FromValue a, FromValue b, FromValue c, FromValue d, FromValue e, FromValue f, FromValue g, FromValue h, FromValue i, FromValue j, FromValue k, FromValue l, FromValue m, FromValue n, FromValue o, FromValue p, FromValue q, FromValue r, FromValue s, FromValue t, FromValue u, FromValue v, FromValue w, FromValue x) => FromRow (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 # 

Methods

fromRow :: [Value] -> Either String (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 #

(FromValue a, FromValue b, FromValue c, FromValue d, FromValue e, FromValue f, FromValue g, FromValue h, FromValue i, FromValue j, FromValue k, FromValue l, FromValue m, FromValue n, FromValue o, FromValue p, FromValue q, FromValue r, FromValue s, FromValue t, FromValue u, FromValue v, FromValue w, FromValue x, FromValue y) => FromRow (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 # 

Methods

fromRow :: [Value] -> Either String (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 #