@hackage postgresql-typed0.5.0

A PostgreSQL library with compile-time SQL type inference and optional HDBC backend

Automatically type-check SQL statements at compile time. Uses Template Haskell and the raw PostgreSQL protocol to describe SQL statements at compile time and provide appropriate type marshalling for both parameters and results. Allows not only syntax verification of your SQL but also full type safety between your SQL and Haskell. Supports many built-in PostgreSQL types already, including arrays and ranges, and can be easily extended in user code to support any other types.

Also includes an optional HDBC backend that, since it uses the raw PostgreSQL protocol, may be more efficient than the normal libpq backend in some cases (though provides no more type safety than HDBC-postgresql when used without templates).

Originally based on Chris Forno's templatepg library.

  • Installation

  • Tested Compilers

  • Dependencies (0)

  • Dependents (2)

    @hackage/nri-postgresql, @hackage/postgresql-pure
  • Package Flags

      md5
       (on by default)

      Enable md5 password authentication method.

      binary
       (on by default)

      Use binary protocol encoding via postgresql-binary. This may put additional restrictions on supported PostgreSQL server versions.

      text
       (on by default)

      Support Text string values via text (implied by binary).

      uuid
       (on by default)

      Support the UUID type via uuid (implied by binary).

      scientific
       (on by default)

      Support decoding numeric via scientific (implied by binary).

      aeson
       (on by default)

      Support decoding json via aeson.

      hdbc
       (on by default)

      Provide an HDBC driver backend using the raw PostgreSQL protocol.