serviette: JSON to Sql raw string or db result in json format

[ bsd3, deprecated, library, web ] [ Propose Tags ]

Use json to query the database and receive results

[Skip to Readme]
Versions [faq],,,,,, (info)
Dependencies aeson, base (>=4.7 && <5), bytestring (>=0.9 && <0.11), generic-deriving, protolude, text (>=0.11 && <2.0) [details]
License BSD-3-Clause
Copyright 2017 Sasa Bogicevic
Author Sasa Bogicevic
Category Web
Home page
Source repo head: git clone
Uploaded by v0d1ch at Fri Jun 16 23:19:08 UTC 2017
Distributions NixOS:
Downloads 2294 total (60 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2017-06-16 [all 1 reports]




Maintainer's Corner

For package maintainers and hackage trustees

Readme for serviette-

[back to package description]


Library for generating SQL queries from JSON. Send the json in the expected format and receive raw sql string.

Why ?

  • Why not ?

Expected JSON format

    "selectName": "users",
          {"tablename":"addresses","field":"userid","operator":"=","withTable":"users", "withField":"id"},
          {"tablename":"posts","field":"userid","operator":"=","withTable":"users", "withField":"id"}
          {"whereTableName":"users","whereField":"id", "whereOperator":">", "whereFieldValue": 1}

If format is set to 1 you will get raw sql string back, something like this: