{"id":16660935,"url":"https://github.com/agrafix/hasql-simple","last_synced_at":"2025-04-09T18:51:06.609Z","repository":{"id":59152926,"uuid":"103514699","full_name":"agrafix/hasql-simple","owner":"agrafix","description":"Haskell: A somewhat opinionated \"simpler\" API to hasql","archived":false,"fork":false,"pushed_at":"2017-09-14T14:27:59.000Z","size":7,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-04T15:46:22.294Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/agrafix.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-09-14T09:38:36.000Z","updated_at":"2021-03-22T17:29:43.000Z","dependencies_parsed_at":"2022-09-13T11:01:12.326Z","dependency_job_id":null,"html_url":"https://github.com/agrafix/hasql-simple","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrafix%2Fhasql-simple","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrafix%2Fhasql-simple/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrafix%2Fhasql-simple/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrafix%2Fhasql-simple/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agrafix","download_url":"https://codeload.github.com/agrafix/hasql-simple/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248092275,"owners_count":21046447,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-12T10:32:29.138Z","updated_at":"2025-04-09T18:51:06.585Z","avatar_url":"https://github.com/agrafix.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hasql-simple\n\n[![CircleCI](https://circleci.com/gh/agrafix/hasql-simple.svg?style=svg)](https://circleci.com/gh/agrafix/hasql-simple)\n\nA somewhat opinionated \"simpler\" API to hasql. This allows to write code like:\n\n```haskell\nimport Hasql.Query\nimport Hasql.Simple\nimport qualified Hasql.Decoders as D\n\ndata NewUser\n    = NewUser\n    { nu_username :: !T.Text\n    , nu_email :: !T.Text\n    , nu_password :: !(Password 'PtHash)\n    } deriving (Show)\n\ncreateUserQ :: Query NewUser UserId\ncreateUserQ =\n    statement sql encoder decoder True\n    where\n      sql =\n          \"INSERT INTO login (username, email, password) VALUES ($1, $2, $3) RETURNING id;\"\n      encoder =\n          req nu_username\n          \u003c\u003e req nu_email\n          \u003c\u003e req nu_password\n      decoder =\n          D.singleRow dbDecVal\n```\n\nThe `-simple` in the name is due to this type class approach beeing similar to the one found in `postgresql-simple`. All contributions (e.g. more instances and/or helper functions) are welcome, please send a PR.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagrafix%2Fhasql-simple","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagrafix%2Fhasql-simple","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagrafix%2Fhasql-simple/lists"}