{"id":219171,"name":"postgresql-query","ecosystem":"hackage","description":"\n\n[Index] [Quick Jump]\n\nPackage maintainers\n\nFor package maintainers and hackage trustees\n\nCandidates\n\n\n\npostgresql-query is a library for more simple query generation for\nPostgreSQL database. It is not an ORM (but contains some part of). It\ncontains interpolating quasiquote for simple query generation.\n\nWhen you want to perform some complex SQL query using\npostgresql-simple you writing this query by hands like that:\n\nWell, this is not realy complex. Now what you need to perform the\nquery is to paste parameters instead of this ? signs:\n\nDid you see the mistake? We forgot about ordering field. To perform this query we must\n\nOups!. If we use Identifier \"u.name\" we will get \"u.name\" in our\nquery which is just not right. Sql syntax assumes \"u\".\"name\" for\nthis query. We can not use query parameter to paste optional field\nhere.\n\nNext example is more complex:\n\nSo much to write and so many chances to make a mistake. What if we\ncould write this like:\n\nMuch better!\n\nQuasiquote sqlExp has two way of interpolation:\n\n#{exp} - pastes inside query arbitrary value which type is\ninstance of ToField typeclass. It performs correct strings\nescaping so it is not the same as stupid string interpolation. Dont\nworry about sql-injections when using it.\n\n^{exp} - pastes inside query arbitrary value which type has\ninstance of ToSqlBuilder typeclass.\n\nsqlExp returns SqlBuilder which has a Monoid instance\nand made for effective concatination (bytestring builder works\ninside).\n\nThis quasiquote correctly handles string literals and quoted\nidentifiers. It also removes line and block (even nested) sql comments\nfrom resulting query as well as sequences of space characters. You are\nfree to write queries like\n\nor even\n\nsqlExp will remove all comments and will not interpolate inside\nstring literals or quoted identifiers at all.\n\nIf you have realy huge hardcore sql template you can\n\nIt works just like Yesod's templates. You can use interpolation inside\ntemplates like inside sqlExp.\n\nIs absolutely the same as above. It just prepends sql/ and\nappends .sql to your string. If you agree to follow naming\nconventions you are welcome to use sqlExpFile.","homepage":"https://github.com/s9gf4ult/postgresql-query","licenses":"BSD-3-Clause","normalized_licenses":["BSD-3-Clause"],"repository_url":"https://github.com/s9gf4ult/postgresql-query","keywords_array":["bsd3","database","library","Propose Tags"],"namespace":null,"versions_count":27,"first_release_published_at":"2015-02-27T09:32:17.000Z","latest_release_published_at":"2022-08-22T18:13:16.000Z","latest_release_number":"3.10.0","last_synced_at":"2026-05-08T13:17:09.420Z","created_at":"2022-04-06T00:07:27.096Z","updated_at":"2026-05-08T13:18:02.661Z","registry_url":"https://hackage.haskell.org/package/postgresql-query","install_command":"cabal install postgresql-query","documentation_url":null,"metadata":{},"repo_metadata":{"id":62436380,"uuid":"526096209","full_name":"s9gf4ult/postgresql-query","owner":"s9gf4ult","description":null,"archived":false,"fork":false,"pushed_at":"2022-08-22T18:18:38.000Z","size":245,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-21T13:57:54.694Z","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/s9gf4ult.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2022-08-18T07:05:01.000Z","updated_at":"2022-09-25T21:36:36.000Z","dependencies_parsed_at":"2022-11-01T21:34:09.719Z","dependency_job_id":null,"html_url":"https://github.com/s9gf4ult/postgresql-query","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/s9gf4ult/postgresql-query","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s9gf4ult%2Fpostgresql-query","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s9gf4ult%2Fpostgresql-query/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s9gf4ult%2Fpostgresql-query/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s9gf4ult%2Fpostgresql-query/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/s9gf4ult","download_url":"https://codeload.github.com/s9gf4ult/postgresql-query/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s9gf4ult%2Fpostgresql-query/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280718613,"owners_count":26379163,"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","status":"online","status_checked_at":"2025-10-23T02:00:06.710Z","response_time":142,"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"},"owner_record":{"login":"s9gf4ult","name":"Alexey Uimanov","uuid":"105054","kind":"user","description":"","email":"","website":"http://s9gf4ult.blogspot.com","location":"Tyumen","twitter":null,"company":"@Aviora ","icon_url":"https://avatars.githubusercontent.com/u/105054?v=4","repositories_count":152,"last_synced_at":"2023-04-19T18:17:25.972Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/s9gf4ult","funding_links":[],"total_stars":null,"followers":null,"following":null,"created_at":"2022-11-02T18:44:58.184Z","updated_at":"2023-04-19T18:17:26.102Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/s9gf4ult","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/s9gf4ult/repositories"},"tags":[]},"repo_metadata_updated_at":"2026-05-08T13:18:02.633Z","dependent_packages_count":0,"downloads":17658,"downloads_period":"total","dependent_repos_count":15,"rankings":{"downloads":8.895168126589432,"dependent_repos_count":14.817745125741736,"dependent_packages_count":19.27098050296694,"stargazers_count":34.59734388245267,"forks_count":28.296128849957615,"docker_downloads_count":null,"average":21.17547329754168},"purl":"pkg:hackage/postgresql-query","advisories":[],"docker_usage_url":"https://docker.ecosyste.ms/usage/hackage/postgresql-query","docker_dependents_count":null,"docker_downloads_count":null,"usage_url":"https://repos.ecosyste.ms/usage/hackage/postgresql-query","dependent_repositories_url":"https://repos.ecosyste.ms/api/v1/usage/hackage/postgresql-query/dependencies","status":null,"funding_links":[],"critical":false,"issue_metadata":{"last_synced_at":"2025-08-03T21:47:08.514Z","issues_count":0,"pull_requests_count":2,"avg_time_to_close_issue":null,"avg_time_to_close_pull_request":16001.5,"issues_closed_count":0,"pull_requests_closed_count":2,"pull_request_authors_count":1,"issue_authors_count":0,"avg_comments_per_issue":null,"avg_comments_per_pull_request":0.0,"merged_pull_requests_count":2,"bot_issues_count":0,"bot_pull_requests_count":0,"past_year_issues_count":0,"past_year_pull_requests_count":0,"past_year_avg_time_to_close_issue":null,"past_year_avg_time_to_close_pull_request":null,"past_year_issues_closed_count":0,"past_year_pull_requests_closed_count":0,"past_year_pull_request_authors_count":0,"past_year_issue_authors_count":0,"past_year_avg_comments_per_issue":null,"past_year_avg_comments_per_pull_request":null,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":0,"issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/s9gf4ult%2Fpostgresql-query/issues","maintainers":[{"login":"s9gf4ult","count":2,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/s9gf4ult"}],"active_maintainers":[]},"versions_url":"https://packages.ecosyste.ms/api/v1/registries/hackage.haskell.org/packages/postgresql-query/versions","version_numbers_url":"https://packages.ecosyste.ms/api/v1/registries/hackage.haskell.org/packages/postgresql-query/version_numbers","latest_version_url":"https://packages.ecosyste.ms/api/v1/registries/hackage.haskell.org/packages/postgresql-query/latest_version","dependent_packages_url":"https://packages.ecosyste.ms/api/v1/registries/hackage.haskell.org/packages/postgresql-query/dependent_packages","related_packages_url":"https://packages.ecosyste.ms/api/v1/registries/hackage.haskell.org/packages/postgresql-query/related_packages","codemeta_url":"https://packages.ecosyste.ms/api/v1/registries/hackage.haskell.org/packages/postgresql-query/codemeta","maintainers":[{"uuid":"AlekseyUymanov","login":"AlekseyUymanov","name":null,"email":null,"url":null,"packages_count":19,"html_url":"https://hackage.haskell.org/user/AlekseyUymanov","role":null,"created_at":"2022-11-14T19:21:03.911Z","updated_at":"2022-11-14T19:21:03.911Z","packages_url":"https://packages.ecosyste.ms/api/v1/registries/hackage.haskell.org/maintainers/AlekseyUymanov/packages"}]}