{"id":16348457,"url":"https://github.com/devinus/sqerl","last_synced_at":"2025-10-23T19:02:21.536Z","repository":{"id":2845473,"uuid":"3849187","full_name":"devinus/sqerl","owner":"devinus","description":"An Erlang-flavoured SQL DSL","archived":false,"fork":false,"pushed_at":"2017-04-06T14:38:35.000Z","size":354,"stargazers_count":58,"open_issues_count":4,"forks_count":24,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-17T19:01:40.929Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/devinus/sqerl","language":"Erlang","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devinus.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":"2012-03-27T22:21:47.000Z","updated_at":"2025-02-01T14:36:50.000Z","dependencies_parsed_at":"2022-07-19T00:32:29.939Z","dependency_job_id":null,"html_url":"https://github.com/devinus/sqerl","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/devinus%2Fsqerl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devinus%2Fsqerl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devinus%2Fsqerl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devinus%2Fsqerl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devinus","download_url":"https://codeload.github.com/devinus/sqerl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244717125,"owners_count":20498280,"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-11T00:52:11.788Z","updated_at":"2025-10-23T19:02:16.497Z","avatar_url":"https://github.com/devinus.png","language":"Erlang","funding_links":[],"categories":[],"sub_categories":[],"readme":"Sqerl\n=====\n\n\u003cimg src=\"http://cloud.github.com/downloads/devinus/sqerl/sqerl.jpg\" align=\"right\" /\u003e\n\nSqerl is a domain specific embedded language for expressing SQL\nstatements in Erlang as well as a library for generating the literal\nequivalents of Sqerl expressions.\n\nSqerl lets you describe SQL queries using a combination of Erlang\nlists, tuples, atoms and values in a way that resembles the structure\nof SQL statements. You can pass this structure to the `sql/1` or\n`sql/2` functions, which parse it and return an iolist (a tree of\nstrings and/or binaries) or a single binary, either of which can be\nsent to database engine through a socket (usually via a\ndatabase-specific driver).\n\nSqerl supports a large subset of the SQL language implemented by some\npopular RDBMS's, including most common `INSERT`, `UPDATE`, `DELETE` and\n`SELECT` statements. Sqerl can generate complex queries including those\nwith unions, nested statements and aggregate functions, but it does\nnot currently attempt to cover every feature and extension of the SQL\nlanguage.\n\nSqerl's benefits are:\n\n- Easy dynamic generation of SQL queries from Erlang by combining\n  native Erlang types rather than string fragments.\n- Prevention of most, if not all, SQL injection attacks by assuring\n  that all string values are properly escaped.\n- Efficient generation of iolists as nested lists of binaries.\n\n*Warning*: Sqerl allows you to write verbatim `WHERE` clauses as well\nas verbatim `LIMIT` and other trailing clauses, but using this feature\nis highly discouraged because it exposes you to SQL injection attacks.\n\nFor usage examples, look at the file `test/sqerl_tests.erl`.\n\nAcknowledgements\n================\n\nAlmost entirely based on ErlyWeb's ErlSQL by Yariv Sadan.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevinus%2Fsqerl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevinus%2Fsqerl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevinus%2Fsqerl/lists"}