cabal-version: 2.4
name:          hasql-transaction-io
version:       0.2.5.0
license:       MIT
license-file:  LICENSE
copyright:     (c) 2022, 2024 Andre Marianiello
maintainer:    andremarianiello@users.noreply.github.com
author:        Andre Marianiello
homepage:      https://github.com/andremarianiello/hasql-transaction-io
bug-reports:
  https://github.com/andremarianiello/hasql-transaction-io/issues

synopsis:      Perform IO actions during transactions for Hasql
description:
  Perform IO actions during transactions for Hasql. If you need transactions in hasql but do not need to perform IO in the middle of the transaction, use haslq-transaction. This packages differs from hasql-transaction in that it sacrifices invisible retries for the ability to perform arbitrary IO in the middle of a transaction. This is beneficial when your transaction is long-lived (e.g. when using cursors) and you wish to perform IO with requested data. See <https://hackage.haskell.org/package/hasql-streams-core hasql-streams-core> for an example use case.

category:      Database, PostgreSQL, Hasql

source-repository head
  type:     git
  location:
    https://github.com/andremarianiello/hasql-transaction-io.git

library
  exposed-modules:
    Hasql.CursorTransactionIO
    Hasql.CursorTransactionIO.TransactionIO
    Hasql.TransactionIO
    Hasql.TransactionIO.Sessions

  hs-source-dirs:     library
  other-modules:
    Hasql.Private.CursorTransactionIO
    Hasql.Private.Session.MonadThrow
    Hasql.Private.Session.UnliftIO
    Hasql.Private.Statements
    Hasql.Private.TransactionIO
    Hasql.Private.Types

  default-language:   Haskell2010
  default-extensions:
    DeriveFunctor
    FlexibleContexts
    GeneralizedNewtypeDeriving
    LambdaCase
    NamedFieldPuns
    RankNTypes

  other-extensions:   OverloadedStrings
  build-depends:
    , base                     >=4.14 && <4.19
    , bytestring               >=0.10 && <0.12
    , bytestring-tree-builder  ^>=0.2
    , exceptions               ^>=0.10
    , hasql                    ^>=1.6
    , mtl                      ^>=2.3
    , resourcet                ^>=1.3
    , safe-exceptions          ^>=0.1
    , transformers             ^>=0.6
    , unliftio-core            ^>=0.2