packages feed

postgresql-connection-string-0.1.0.6: postgresql-connection-string.cabal

cabal-version: 3.0
name: postgresql-connection-string
version: 0.1.0.6
category: Database, PostgreSQL
synopsis: PostgreSQL connection string type, parser and builder
description:
  A library for parsing and constructing PostgreSQL connection strings (URIs and keyword/value format).

  Supports the full PostgreSQL connection URI format as specified in
  <https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING the PostgreSQL documentation>,
  including:

  * User and password authentication

  * Single and multiple host specifications with optional ports

  * Database name specification

  * Connection parameters as query string

  * Percent-encoding for special characters

  The library provides both parsing (from Text to structured representation) and
  rendering (back to connection string format, either as URI or keyword/value pairs).

homepage: https://github.com/nikita-volkov/postgresql-connection-string
bug-reports: https://github.com/nikita-volkov/postgresql-connection-string/issues
author: Nikita Volkov <nikita.y.volkov@mail.ru>
maintainer: Nikita Volkov <nikita.y.volkov@mail.ru>
copyright: (c) 2025, Nikita Volkov
license: MIT
license-file: LICENSE
extra-source-files:
  README.md

extra-doc-files:
  CHANGELOG.md

source-repository head
  type: git
  location: https://github.com/nikita-volkov/postgresql-connection-string

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

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

library
  import: base
  hs-source-dirs: src/library
  exposed-modules:
    PostgresqlConnectionString

  other-modules:
    PercentEncoding
    PercentEncoding.Charsets
    PercentEncoding.MonadPlus
    PercentEncoding.Parsers
    PercentEncoding.TextBuilders
    PercentEncoding.Utf8CharView
    Platform.Prelude
    PostgresqlConnectionString.Charsets
    PostgresqlConnectionString.Parsers
    PostgresqlConnectionString.Types
    PostgresqlConnectionString.Types.Gens

  build-depends:
    QuickCheck >=2.14 && <3,
    base >=4.13 && <5,
    bytestring >=0.10 && <0.13,
    charset ^>=0.3.12,
    containers >=0.6 && <0.9,
    hashable >=1.2 && <2,
    megaparsec >=9.2.1 && <10.0,
    text >=1.2 && <3,
    text-builder >=1 && <1.1,

test-suite library-tests
  import: test
  type: exitcode-stdio-1.0
  hs-source-dirs: src/library-tests
  main-is: Main.hs
  build-depends:
    QuickCheck >=2.14 && <3,
    base >=4.13 && <5,
    containers >=0.6 && <0.9,
    hspec ^>=2.11.12,
    postgresql-connection-string,
    quickcheck-classes >=0.6.5 && <0.7,
    text >=1.2 && <3,