cabal-version: 3.0name: hasql-dynamic-statementsversion: 0.5.1.4category: Hasql, Database, PostgreSQLsynopsis: Hasql extension for dynamic construction of statementsdescription: Library extending Hasql with a composable API for building SQL statements dynamically. The core abstraction is 'Snippet', which allows you to construct SQL statements with parameters injected in-place, automatically handling placeholders and encoder matching. This is particularly useful when the structure of your SQL depends on runtime parameters. Key features: * Composable SQL snippets using 'Semigroup' and 'Monoid' instances * Automatic placeholder generation and parameter encoding * Type-safe parameter injection with implicit encoder derivation * Protection against common SQL construction bugs * Support for conditional SQL structure based on parameters Example: > selectSubstring :: Text -> Maybe Int32 -> Maybe Int32 -> Snippet > selectSubstring string from to = > "select substring(" <> param string <> > foldMap (\x -> " from " <> param x) from <> > foldMap (\x -> " for " <> param x) to <> > ")"homepage: https://github.com/nikita-volkov/hasql-dynamic-statementsbug-reports: https://github.com/nikita-volkov/hasql-dynamic-statements/issuesauthor: Nikita Volkov <nikita.y.volkov@mail.ru>maintainer: Nikita Volkov <nikita.y.volkov@mail.ru>copyright: (c) 2019, Nikita Volkovlicense: MITlicense-file: LICENSEextra-doc-files: CHANGELOG.md README.mdsource-repository head type: git location: https://github.com/nikita-volkov/hasql-dynamic-statementscommon 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 TypeOperatorscommon executable import: base ghc-options: -O2 -threaded -with-rtsopts=-N -rtsopts -funbox-strict-fieldscommon test import: base ghc-options: -threaded -with-rtsopts=-Nlibrary import: base hs-source-dirs: src/library exposed-modules: Hasql.DynamicStatements.Snippet other-modules: Hasql.DynamicStatements.Prelude build-depends: base >=4.14 && <5, bytestring >=0.10 && <0.13, containers >=0.6 && <0.9, hasql >=1.10 && <1.11 || >=2.0 && <2.3, hasql-implicits >=0.2.0.3 && <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, pqi-native ^>=1.0, rerebase <2, testcontainers-postgresql >=0.2 && <0.3,