packages feed

libpg-query-0.1.0.0: libpg-query.cabal

cabal-version: 2.2

name:           libpg-query
version:        0.1.0.0
synopsis:       Parse PostgreSQL DDL and DML: Haskell bindings for libpg_query

description:    libpg-query offers Haskell bindings for @<https://github.com/pganalyze/libpg_query libpg_query>@, which makes use of the actual PostgreSQL server source to parse SQL queries and return the internal PostgreSQL parse tree.
category:       Database, Data
homepage:       https://github.com/kronor-io/pg-query
bug-reports:    https://github.com/kronor-io/pg-query/issues
author:         rhizomic, José Lorenzo Rodríguez
maintainer:     lorenzo@kronor.io
license:        BSD-3-Clause
license-file:   LICENSE
build-type:     Simple
tested-with:    GHC ==9.12.2
extra-source-files:
    README.md
    CHANGELOG.md
    PgQuery.proto

source-repository head
  type:     git
  location: https://github.com/kronor-io/pg-query

library
  exposed-modules:
      PgQuery
      PgQuery.Internal.Parse
      PgQuery.Internal.Proto.PgQuery
      PgQuery.Internal.Proto.PgQuery_Fields
  hs-source-dirs:
      src
  default-extensions:
      StrictData
  c-sources:
      helpers/pg_query_helper.c
  extra-libraries:
      pg_query
  build-depends:
      base >=4.0 && <5.0
    , bytestring >=0.11 && <1.0
    , proto-lens >=0.7.1.5 && <1.0
    , proto-lens-runtime >=0.7.0.6 && <1.0
    , text >=2.0 && <3.0
  default-language: Haskell2010

test-suite libpg-query-test
  type: exitcode-stdio-1.0
  main-is: Spec.hs
  other-modules:
      PgQuery.DeparseSpec
      PgQuery.ParamsSpec
      PgQuery.PlpgsqlSpec
      PgQuery.TriggerSpec
      Paths_libpg_query
  autogen-modules:
      Paths_libpg_query
  hs-source-dirs:
      test
  ghc-options: -threaded -rtsopts -with-rtsopts=-N
  build-tool-depends:
      hspec-discover:hspec-discover
  build-depends:
      base >=4.0 && <5.0
    , bytestring >=0.11 && <1.0
    , hspec
    , hspec-contrib
    , hspec-expectations-pretty-diff
    , lens
    , libpg-query
    , proto-lens >=0.7.1.5 && <1.0
    , proto-lens-runtime >=0.7.0.6 && <1.0
    , text >=2.0 && <3.0
  default-language: Haskell2010