hasql-postgresql-types: Integration of "hasql" with "postgresql-types"

[ codecs, hasql, library, mit, postgresql ] [ Propose Tags ] [ Report a vulnerability ]

Provides automatic encoder and decoder generation for "hasql", supporting all PostgreSQL standard types defined in the "postgresql-types" package.


[Skip to Readme]

Modules

[Last Documentation]

  • Hasql
    • Hasql.PostgresqlTypes

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1, 0.1.0.1
Dependencies base (>=4.11 && <5), hasql (>=1.10.1 && <1.11), postgresql-types-algebra (>=0.1 && <0.2), ptr-peeker (>=0.1.0.1 && <0.2), ptr-poker (>=0.1.3 && <0.2), tagged (>=0.8.9 && <0.9), text-builder (>=1.0.0.4 && <1.1) [details]
License MIT
Copyright (c) 2026, Nikita Volkov
Author Nikita Volkov <nikita.y.volkov@mail.ru>
Maintainer Nikita Volkov <nikita.y.volkov@mail.ru>
Uploaded by NikitaVolkov at 2026-01-22T20:12:42Z
Category PostgreSQL, Codecs, Hasql
Home page https://github.com/nikita-volkov/hasql-postgresql-types
Bug tracker https://github.com/nikita-volkov/hasql-postgresql-types/issues
Source repo head: git clone https://github.com/nikita-volkov/hasql-postgresql-types
Distributions
Downloads 3 total (3 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2026-01-22 [all 2 reports]

Readme for hasql-postgresql-types-0.1

[back to package description]

hasql-postgresql-types

Hackage Continuous Haddock

Integration of "hasql" with "postgresql-types" via the IsScalar typeclass from "postgresql-types-algebra". Provides automatic encoder and decoder generation for precise PostgreSQL scalar types.

Usage

import Hasql.PostgresqlTypes (encoder, decoder)
import qualified PostgresqlTypes as Pt
import qualified Hasql.Statement as Statement
import qualified Hasql.Encoders as Encoders
import qualified Hasql.Decoders as Decoders

myStatement :: Statement.Statement Pt.Timestamptz [Pt.Timestamptz]
myStatement = Statement.preparable sql enc dec
  where
    sql = "SELECT $1::timestamptz"
    enc = Encoders.param (Encoders.nonNullable encoder)
    dec = Decoders.rowList (Decoders.column (Decoders.nonNullable decoder))