packages feed

hasql-dynamic-statements-0.4: hasql-dynamic-statements.cabal

cabal-version: 3.0
name: hasql-dynamic-statements
version: 0.4
synopsis: Hasql extension for dynamic construction of statements
description:
  Library extending Hasql with an abstraction that simplifies construction of SQL statements, the structure of which depends on the parameters.

homepage: https://github.com/nikita-volkov/hasql-dynamic-statements
bug-reports:
  https://github.com/nikita-volkov/hasql-dynamic-statements/issues

author: Nikita Volkov <nikita.y.volkov@mail.ru>
maintainer: Nikita Volkov <nikita.y.volkov@mail.ru>
copyright: (c) 2019, Nikita Volkov
license: MIT
license-file: LICENSE
extra-doc-files:
  CHANGELOG.md

source-repository head
  type: git
  location: https://github.com/nikita-volkov/hasql-dynamic-statements

common base
  default-language: Haskell2010
  default-extensions:
    ApplicativeDo
    BangPatterns
    BlockArguments
    DefaultSignatures
    DeriveDataTypeable
    DeriveFoldable
    DeriveFunctor
    DeriveGeneric
    DeriveTraversable
    DerivingVia
    EmptyDataDecls
    FlexibleContexts
    FlexibleInstances
    FunctionalDependencies
    GADTs
    GeneralizedNewtypeDeriving
    ImportQualifiedPost
    LambdaCase
    LiberalTypeSynonyms
    MultiParamTypeClasses
    MultiWayIf
    NamedFieldPuns
    NoImplicitPrelude
    NoMonomorphismRestriction
    OverloadedStrings
    PatternGuards
    QuasiQuotes
    RankNTypes
    RecordWildCards
    RoleAnnotations
    ScopedTypeVariables
    StandaloneDeriving
    StrictData
    TupleSections
    TypeApplications
    TypeFamilies
    TypeOperators

common executable
  import: base
  ghc-options:
    -O2
    -threaded
    -with-rtsopts=-N
    -rtsopts
    -funbox-strict-fields

common test
  import: base
  ghc-options:
    -threaded
    -with-rtsopts=-N

library
  import: base
  hs-source-dirs: src/library
  exposed-modules:
    Hasql.DynamicStatements.Session
    Hasql.DynamicStatements.Snippet
    Hasql.DynamicStatements.Statement

  other-modules:
    Hasql.DynamicStatements.Prelude
    Hasql.DynamicStatements.Snippet.Defs

  build-depends:
    base >=4.14 && <5,
    bytestring >=0.10 && <0.13,
    containers >=0.6 && <0.8,
    hasql >=1.10 && <1.11,
    hasql-implicits >=0.2.0.2 && <0.3,
    text >=1 && <3,
    text-builder >=1.0 && <1.1,

test-suite test
  import: test
  type: exitcode-stdio-1.0
  hs-source-dirs: src/test
  main-is: Main.hs
  other-modules:
    Regressions.Issue2Spec
    SpecHook
    Units.SnippetSpec

  build-tool-depends:
    hspec-discover:hspec-discover ^>=2.11.12

  build-depends:
    hasql,
    hasql-dynamic-statements,
    hspec ^>=2.11.12,
    rerebase <2,
    testcontainers-postgresql >=0.2 && <0.3,