hasql-th
hasql-th copied to clipboard
Template Haskell utilities for Hasql
Hi! I'm trying to use a stored procedure within `resultlessStatement`, but the parser complains as soon as it sees the `call` keyword in my query body. Is it supported by...
Suppose I have the following database schema, ```sql CREATE TABLE supplier ( id bigserial, name text ); CREATE TABLE inventory_item ( id bigserial, name text ); CREATE TABLE item_supplier (...
With hasql it's possible to make newtype wrappers for e.g. different integer based ids, keep the constructors private, and just export decoders and encoders. With hasql-th it seems like constructors...
I have following pattern that I use a lot on my code: ``` (HD.column.HD.nonNullable) (HD.jsonbBytes (first T.pack . eitherDecodeStrict) ``` This way I can parse json structure into desired type,...
I have some large chunks of pre-existing sql that are heavily commented, to make it clear what's going on. Unfortunately hasql-th doesn't seem to cope: ``` select "bar" :: text...
> > This might also make it easier to write a simple extension that checks the statements against a schema at test time (i.e. given db connection, check these sql...
> > Yeah would be really cool if we could keep our _preparable statements_ in separate sql files. Definitely second this feature. > > P.S. Great work on this library!...
In my current project I have a decoder functions, `decodeEntity :: Result A` that decodes some columns, then I can write more complex decoder as: ``` entity
The error reporting of this library is awesome, thank you! However, it does not integrate well with HLS. Any error span the complete quasi quote AND the customerror message localization...