packages feed

postgresql-simple-bind-0.3.0.0: postgresql-simple-bind.cabal

name:                postgresql-simple-bind
version:             0.3.0.0
synopsis:            FFI-like bindings for PostgreSQL stored functions
description:         For tutorial see here: https:\/\/github.com\/zohl\/postgresql-simple-bind\/blob\/master\/README.md
license:             BSD3
license-file:        LICENSE
author:              Al Zohali
maintainer:          Al Zohali <zohl@fmap.me>
-- copyright:
category:            Database
build-type:          Simple
-- extra-source-files:
cabal-version:       >=1.10

flag dev
  description: Turn on development settings.
  manual:      True
  default:     False

flag db-tests
  description: Turn on tests with database.
  manual:      False
  default:     False

flag older-call-syntax
  description: Turn on usage of (:=) in queries instead of (=>). This
               is necessary for PostgreSQL < 9.5.
  manual:      True
  default:     True

flag debug-queries
  description: Turn on output of executed queries.
  manual:      False
  default:     False

source-repository head
  type:     git
  location: https://github.com/zohl/postgresql-simple-bind.git

library
  build-depends: base >= 4.7 && < 5.0
               , attoparsec >= 0.13.0 && < 0.14
               , bytestring >= 0.10.8 && < 0.11
               , data-default
               , exceptions
               , heredoc >= 0.2.0 && < 0.3
               , postgresql-simple >= 0.5.2 && < 0.6
               , template-haskell >= 2.11.0 && < 2.12
               , text >= 1.2.2 && < 1.3
               , time >= 1.6.0 && < 1.7

  hs-source-dirs: src
  exposed-modules:
     Database.PostgreSQL.Simple.Bind
     Database.PostgreSQL.Simple.Bind.Common
     Database.PostgreSQL.Simple.Bind.Representation
     Database.PostgreSQL.Simple.Bind.Types
     Database.PostgreSQL.Simple.Bind.Utils

  other-modules:
     Database.PostgreSQL.Simple.Bind.Implementation

  default-language:    Haskell2010

  if flag(dev)
    ghc-options:      -Wall -Werror
  else
    ghc-options:      -O2 -Wall

  if flag(older-call-syntax)
    cpp-options: -DOlderCallSyntax

  if flag(debug-queries)
    cpp-options: -DDebugQueries

test-suite tests
  type:           exitcode-stdio-1.0

  hs-source-dirs: tests
  main-is:        Main.hs

  ghc-options: -Wall

  build-depends: base >= 4.7 && < 5.0
               , bytestring >= 0.10.8 && < 0.11
               , hspec
               , postgresql-simple >= 0.5.2 && < 0.6
               , postgresql-simple-bind
               , text >= 1.2.2 && < 1.3

  default-language:    Haskell2010

  if flag(dev)
    ghc-options:      -Wall -Werror
  else
    ghc-options:      -O2 -Wall


test-suite examples
  type:           exitcode-stdio-1.0

  hs-source-dirs: examples
  main-is:        Main.hs

  ghc-options: -Wall

  build-depends: base >= 4.7 && < 5.0
               , attoparsec >= 0.13.0 && < 0.14
               , bytestring >= 0.10.8 && < 0.11
               , case-conversion
               , data-default
               , hspec
               , postgresql-simple >= 0.5.2 && < 0.6
               , postgresql-simple-bind
               , text >= 1.2.2 && < 1.3

  default-language:    Haskell2010

  if flag(dev)
    ghc-options:      -Wall -Wno-redundant-constraints -Werror
  else
    ghc-options:      -O2 -Wall -Wno-redundant-constraints

  if flag(db-tests)
    cpp-options: -DDBTests