Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 43 lines (31 sloc) 1.759 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
Version 0.1: (2012-05-04)
  * Renamed several modules, typeclasses, and functions:

        QueryParams (renderParams) -> ToRow (toRow)
        QueryResults (convertResults) -> FromRow (fromRow)
        Param (render) -> ToField (toField)
        Result (convert) -> FromField (fromField)

  * Added the `Database.PostgreSQL.Simple.Ok` module, a variation of
    `Either SomeException` that has an instance for `Alternative` and also
    uses a list of exceptions to track the ways it has failed.

  * Changed the return type of `fromField` and `fromRow` from
    `Either SomeException` to `Ok`.

  * Thanks to suggestions from Ozgun Ataman, the `FromRow` typeclass has been
    massively improved. The result is simpler definitions and better
    compositionality. Also, user-defined instances need not be to be
    concerned about forcing the converted results to WHNF. Here is an
    example comparing the old to the new:

        instance (Result a, Result b) => QueryResults (a,b) where
            convertResults [fa,fb] [va,vb] = do
                !a <- convert fa va
                !b <- convert fb vb
                return (a,b)
            convertResults fs vs = convertError fs vs 2

        instance (FromField a, FromField b) => FromRow (a,b) where
            fromRow = (,) <$> field <*> field

  * Added `(:.)`, a pair that allows one to compose `FromRow` instances:

        instance (FromRow a, FromRow b) => FromRow (a :. b) where
            fromRow = (:.) <$> fromRow <*> fromRow

  * Moved the contents `Field` module into the `FromField` module.

  * Removed the `RawResult` type.

  * Added `DefaultIsolationLevel` as a distinct `IsolationLevel` option
    and `DefaultReadWriteMode` as a distinct `ReadWriteMode`.
Something went wrong with that request. Please try again.