Typeful, Modular, Relational, algebraic query engine

Version on this page:
LTS Haskell 22.26:
Stackage Nightly 2024-06-22:
Latest on Hackage:

See all snapshots relational-query appears in

BSD-3-Clause licensed by Kei Hibino
Maintained by [email protected]
This version can be pinned in stack with:relational-query-,7171

Module documentation for

This package contiains typeful relation structure and relational-algebraic query building DSL which can translate into SQL query. Supported query features are below: - Type safe query building - Restriction, Join, Aggregation - Modularized relations - Typed placeholders


  • add xxxNoPH effect APIs of arrow-interface.

  • add some overloaded projection instances for tuple types.
  • add #primary overloaded projection instance.

  • add insertValueList API.
  • (re-)add xxxNoPH effect APIs.
  • prepare to rename derivedXxx to xxx.
  • deprecate typed* APIs with implicit defaultConfig.

  • add compatibility module Database.Relational.Query.TH for upgrading from 0.9.

  • same as re-versioned for TH incompatibility against 0.10.0.

  • fix overloaded-labels instances for GHC 8.2.

  • define projections with overloaded-labels. – Thanks for Ryan Mulligan
  • add a portable sequence number operation.

  • switch namespace to Database.Relational
  • update interfaces about projection types.
  • divide and apply product-isomorphic interfaces.

  • export QuerySuffix and unsafe-query functions from Database.Relational.Query namespace for libraries.

  • fix version constraint.

  • add NULLS FIRST and NULLS LAST to ORDER BY clause.

  • add Show instance of Pi.
  • add pzero and ConstantTermsSQL instance of ().
  • add Category instance of Pi.

  • add tested-with 8.2.1.

  • Add derivedInsertValue definitions to arrow interface.
  • Apply chunked-insert to derivedInsertValue.

  • Use Haskell implementation test instead of flag test in .cabal

  • Add HRR instances of tuple types derived by generic programming.
  • Add generic instances of ShowConstantTermsSQL.

  • Bugfix of lazy instances of ShowConstantTermsSQL.

  • Deprecate some exported interfaces which are internal definitions.

  • Update this changelog

  • simpl-tick-factor work-around to avoid bug of GHC

  • Export Register interface type from Query module.

  • Refactor around sub-query and its builder.
  • Compatibility with dlist-0.5.

  • Add configuration to quote SQL string of table names.

  • Add tested-with meta-data.

  • Update for GHC 8.

  • Fix constraint of build-depends.

  • Add TIMESTAMPTZ literal of PostgreSQL.

  • Add schemaNameMode configuration.

  • Update tests along with deprecations.

  • Drop unused pragma.

  • Drop unreferenced overloading.

  • Update documentation.

  • Fix build-depends.

  • Drop unsafe Expr type.
  • Drop redundant type synonyms around DELETE and UPDATE.
  • Add Register monad to add build-able INSERT statement
  • Configurable relation template names.

  • Deprecate redundant type synonyms.

  • Prepare to drop Expr type and deprecate around it.
  • Fix boolean projection operator types.

  • Update this changelog.

  • Use TH quotations for deriving class symbols.

  • Fix around correlated sub-queries.
  • Update unit-test cases.

  • Add Int8 type as SQL constant int value. (e.g. MySQL)

  • Make InsertQuery type as PreparedNoFetch instance.

  • Add a configuration flag to pring verbose compile-time messages.

  • Increase type safety of interfaces.
  • Simplify interfaces arond unique query.

  • Add MonadTrans instance of QueryJoin.
  • Update links about Opaleye.

  • Update documentation.

  • Add the arrow combinator module and its unit-test cases.

  • Update unit-test cases.
  • Add the fixity of over operator.
  • Avoid an `a future Prelude name’ warning.

  • Switch libraries to use from test-suites not to depend on Cabal library.

  • Add this ChangeLog file.

  • Extend derivedInsert.

  • Add generalized restrict.
  • Pass configuration to DELETE and UPDATE.

  • Update structure of query with placeholders.