{"id":32161284,"url":"https://github.com/v0d1ch/serviette","last_synced_at":"2026-05-14T21:05:38.674Z","repository":{"id":56877720,"uuid":"85248448","full_name":"v0d1ch/serviette","owner":"v0d1ch","description":"JSON to SQL lib","archived":false,"fork":false,"pushed_at":"2017-06-26T14:51:28.000Z","size":270,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-21T13:52:58.594Z","etag":null,"topics":["haskell","json","serviette","sql","sql-query"],"latest_commit_sha":null,"homepage":"","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/v0d1ch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-16T22:49:26.000Z","updated_at":"2020-03-14T11:19:54.000Z","dependencies_parsed_at":"2022-08-20T11:31:04.010Z","dependency_job_id":null,"html_url":"https://github.com/v0d1ch/serviette","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/v0d1ch/serviette","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v0d1ch%2Fserviette","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v0d1ch%2Fserviette/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v0d1ch%2Fserviette/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v0d1ch%2Fserviette/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/v0d1ch","download_url":"https://codeload.github.com/v0d1ch/serviette/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v0d1ch%2Fserviette/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33043279,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["haskell","json","serviette","sql","sql-query"],"created_at":"2025-10-21T13:52:52.669Z","updated_at":"2026-05-14T21:05:38.653Z","avatar_url":"https://github.com/v0d1ch.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SERVIETTE - JSON to SQL [![Build Status](https://travis-ci.org/v0d1ch/serviette.svg?branch=master)](https://travis-ci.org/v0d1ch/serviette) [![Hackage](https://img.shields.io/hackage/v/serviette.svg)](https://hackage.haskell.org/package/serviette) \n\n  Library for generating SQL queries from JSON. \n  Send the json in the expected format and receive raw sql string.\n### Why ?\n- Why not ?\n\n### Expected JSON format\n````\n{\n    \"format\":1,\n    \"action\":\"SELECT\",\n    \"selectName\": \"users\",\n    \"joinTables\":[\n    \t  {\"tablename\":\"addresses\",\"field\":\"userid\",\"operator\":\"=\",\"withTable\":\"users\", \"withField\":\"id\"},\n          {\"tablename\":\"posts\",\"field\":\"userid\",\"operator\":\"=\",\"withTable\":\"users\", \"withField\":\"id\"}\n    \t],\n    \"whereCondition\":[\n          {\"whereTableName\":\"users\",\"whereField\":\"id\", \"whereOperator\":\"\u003e\", \"whereFieldValue\": 1}\n      ]\n}\n````\n\nIf `format` is set to 1 you will get json response:\n\n````\n{\"response\":\"SELECT users join addresses on userid = users.id  join posts on userid = users.id   where users.id \u003e 1\",\"warnings\":\"\",\"errors\":\"\"}\n````\n \nYou can find this lib on [hackage](https://hackage.haskell.org/package/serviette)\nServiette backend is [here](https://github.com/v0d1ch/serviette-yesod-example)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fv0d1ch%2Fserviette","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fv0d1ch%2Fserviette","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fv0d1ch%2Fserviette/lists"}