mirror of
https://github.com/circuithub/rel8.git
synced 2024-10-05 21:29:35 +03:00
Hey! Hey! Can u rel8?
9105dbf67f
This means that users defining new `DBType`s will have to additionally derive `Encodable` (but a simple `deriving Encodable` will suffice). It also opens up the possibility of users defining non-`DBType`s that are `lit`able (and `select`able). For example, the `HKDT` helper makes allows arbitrary products of `DBType`s to be `lit`ed via `higgled`'s `HKD`: ```haskell data S3Object = S3Object { bucketName :: Text , objectKey :: Text } deriving stock Generic deriving Encodable via HKDT S3Object ``` With the above loaded into GHCi: ``` >>> :t lit (S3Object mempty mempty) lit (S3Object mempty mempty) :: HKD S3Object Expr ``` The implementation is extensible, allowing for the possibility of other "strategies" (in addition to `DBType` and `HKD`) in the future. |
||
---|---|---|
.github/workflows | ||
docs | ||
nix | ||
src | ||
tests | ||
.gitignore | ||
cabal.project | ||
cabal.project.haskell-nix | ||
default.nix | ||
LICENSE | ||
README.md | ||
rel8.cabal | ||
shell.nix |
Welcome!
Welcome to Rel8! Rel8 is a Haskell library for interacting with PostgreSQL databases, built on top of the fantastic Opaleye library.
The main objectives of Rel8 are:
-
Conciseness: Users using Rel8 should not need to write boiler-plate code. By using expressive types, we can provide sufficient information for the compiler to infer code whenever possible.
-
Inferrable: Despite using a lot of type level magic, Rel8 aims to have excellent and predictable type inference.
-
Familiar: writing Rel8 queries should feel like normal Haskell programming.
For more details, check out the official documentation.