esqueleto
esqueleto copied to clipboard
New home of Esqueleto, please file issues so we can get things caught up!
I'm writing a query using `arrayAgg`, which can return a `NULL`/`Nothing` value, so I'm combining it with `coalesceDefault` to just get an empty array in that case. E.g.: ```hs query...
It already has `Functor` and a stock-derived `Traversable` would be pretty useful when dealing with `Value (Maybe a)`s.
Adds `withMaterialized` function to support this non-standard postgres behavior. Before submitting your PR, check that you've: - [x] Bumped the version number. - [x] Documented new APIs with [Haddock markup](https://www.haskell.org/haddock/doc/html/index.html)....
I'm trying to run the following query with a recursive common table expressions using Esqueleto's ```withRecursive``` but received an unexpected error at runtime. Is there a way to fix this?...
Calling `sum_` on an `Int` column and trying to use the result as an `Int` leads to a marshal error
It appears that (at least in Postgresql), summing a list of `int`s gives back a `numeric`. So when you call `sum_` from esqueleto on an `Int` column and use the...
As requested by @parsonsmatt in https://github.com/bitemyapp/esqueleto/issues/82#issuecomment-584725299 . The relevant bits of the schema are: ``` Tx hash ByteString sqltype=hash32type block BlockId -- This type is the primary key for the...
Consider the type: ```haskell data Record key = Record { key :: key, column :: Int } ``` We can't write `deriveEsqueletoRecord` here because there's a type error. We can't...
There's functions like `ilike` where [the docs say](https://hackage.haskell.org/package/esqueleto-3.5.11.1/docs/Database-Esqueleto-Experimental.html#v:ilike): > Supported by PostgreSQL only. Or others where both MySQL and Postgres support them, but no other RDBMSes. Then there's also modules...
change `TyVarBndr ()` to `TyVarBndr BndrVis` (GHC 9.8, i.e. template-haskell 2.21)
#282 * Add JsonValue newtype wrapper to support extracting Json values from sql queries * Added instances for SqlSelect/ToAlias*/ToMaybe * Add new PgToJsonb typeclass to support `toJsonb` function on `Value`,...