packages feed

postgresql-simple-named-0.0.5.0: postgresql-simple-named.cabal

cabal-version:       2.4
name:                postgresql-simple-named
version:             0.0.5.0
synopsis:            Implementation of named parameters for `postgresql-simple` library
description:
    Implementation of named parameters for @postgresql-simple@ library.
    .
    Here is an exaple of how it could be used in your code:
    .
    > queryNamed dbConnection [sql|
    >     SELECT *
    >     FROM table
    >     WHERE foo = ?foo
    >       AND bar = ?bar
    >       AND baz = ?foo
    > |] [ "foo" =? "fooBar"
    >    , "bar" =? "barVar"
    >    ]

homepage:            https://github.com/Holmusk/postgresql-simple-named
bug-reports:         https://github.com/Holmusk/postgresql-simple-named/issues
license:             MPL-2.0
license-file:        LICENSE
author:              Veronika Romashkina, Dmitrii Kovanikov
maintainer:          Holmusk <tech@holmusk.com>
copyright:           2019 Holmusk
category:            Database, PostgreSQL
build-type:          Simple
extra-source-files:  README.md
extra-doc-files:     CHANGELOG.md
tested-with:         GHC == 9.0.2
                   , GHC == 9.2.8
                   , GHC == 9.4.8
                   , GHC == 9.6.3
                   , GHC == 9.8.1

source-repository head
  type:                git
  location:            https://github.com/Holmusk/postgresql-simple-named.git

common common-options
  build-depends:       base >= 4.11 && < 4.20

  ghc-options:         -Wall
                       -Wincomplete-uni-patterns
                       -Wincomplete-record-updates
                       -Wcompat
                       -Widentities
                       -Wredundant-constraints
                       -fhide-source-paths
                       -Wmissing-export-lists
                       -Wpartial-fields
  if impl(ghc >= 8.8)
    ghc-options:       -Wmissing-deriving-strategies
  if impl(ghc >= 8.10)
    ghc-options:       -Wunused-packages

  default-language:    Haskell2010
  default-extensions:  ConstraintKinds
                       DeriveGeneric
                       GeneralizedNewtypeDeriving
                       InstanceSigs
                       KindSignatures
                       LambdaCase
                       OverloadedStrings
                       RecordWildCards
                       ScopedTypeVariables
                       StandaloneDeriving
                       TupleSections
                       TypeApplications
                       ViewPatterns

library
  import:              common-options
  hs-source-dirs:      src
  exposed-modules:     PgNamed
  build-depends:       bytestring >= 0.10 && < 0.13
                     , mtl >= 2.2 && < 2.4
                     , postgresql-simple >= 0.5 && < 0.8
                     , text >= 1.2 && < 2.2

test-suite postgresql-simple-named-test
  import:              common-options
  type:                exitcode-stdio-1.0
  hs-source-dirs:      test
  main-is:             Spec.hs

  build-depends:       bytestring
                     , hspec >= 2.5
                     , postgresql-simple-named
                     , postgresql-simple >= 0.5 && < 0.8
                     , resource-pool ^>= 0.2.3.2 || ^>= 0.4.0.0
                     , transformers

  ghc-options:         -threaded -rtsopts -with-rtsopts=-N

test-suite postgresql-simple-named-doctest
  import:              common-options
  type:                exitcode-stdio-1.0
  hs-source-dirs:      test
  main-is:             Doctest.hs

  build-depends:       doctest
                     , Glob

  ghc-options:         -threaded