{"id":15024848,"url":"https://github.com/lmoors30/sqly","last_synced_at":"2026-01-28T03:12:55.850Z","repository":{"id":255175013,"uuid":"848802069","full_name":"LMOORS30/sqly","owner":"LMOORS30","description":"A lightweight macro system on top of sqlx, inspired by ormx.","archived":false,"fork":false,"pushed_at":"2024-12-26T10:58:54.000Z","size":101,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-08T20:47:19.051Z","etag":null,"topics":["async","await","postgres","rust","sql"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LMOORS30.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-28T12:38:59.000Z","updated_at":"2024-12-26T20:00:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"46374a41-453c-43c6-ab60-2ad6a2df9802","html_url":"https://github.com/LMOORS30/sqly","commit_stats":null,"previous_names":["lmoors30/sqly"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LMOORS30%2Fsqly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LMOORS30%2Fsqly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LMOORS30%2Fsqly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LMOORS30%2Fsqly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LMOORS30","download_url":"https://codeload.github.com/LMOORS30/sqly/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248568503,"owners_count":21126040,"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":["async","await","postgres","rust","sql"],"created_at":"2024-09-24T20:01:03.901Z","updated_at":"2026-01-28T03:12:55.844Z","avatar_url":"https://github.com/LMOORS30.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"sqly\n[\u003cimg alt=\"github.com\" src=\"https://img.shields.io/badge/github.com-LMOORS30/sqly-5e728a?labelColor=343942\u0026style=for-the-badge\u0026logo=github\" height=\"20\"\u003e](https://github.com/LMOORS30/sqly)\n[\u003cimg alt=\"crates.io\" src=\"https://img.shields.io/badge/crates.io-sqly-5e888a?labelColor=343942\u0026style=for-the-badge\u0026logo=rust\" height=\"20\"\u003e](https://crates.io/crates/sqly)\n[\u003cimg alt=\"docs.rs\" src=\"https://img.shields.io/badge/docs.rs-sqly-5e8a76?labelColor=343942\u0026style=for-the-badge\u0026logo=docs.rs\" height=\"20\"\u003e](https://docs.rs/sqly)\n====\n\nsqly is a lightweight macro system on top of [sqlx](https://github.com/launchbadge/sqlx), inspired by [ormx](https://github.com/NyxCode/ormx).\n\nIt works by generating common SQL queries and associated structs at compile time, letting the generated queries be checked and executed by sqlx.\n\nThis crate differs from ormx by the added functionality of generating SQL `SELECT` queries with support for nested objects through SQL `JOIN` clauses. Additionally, many more attributes are available to further customize the query generation and row decoding.\n\n##### Cargo.toml\n```toml\n[dependencies.sqly]\nversion = \"0.5.0\"\nfeatures = [\"postgres\"]\n\n[dependencies.sqlx]\nversion = \"0.8.6\"\ndefault-features = false\n\n[profile.dev.package.sqlx-macros]\nopt-level = 3\n\n[profile.dev.package.sqly-macros]\nopt-level = 3\n```\n\n##### Features\n`postgres`\u0026ensp;—\u0026ensp;generate queries for PostgreSQL\u003cbr\u003e\n` mariadb`\u0026ensp;—\u0026ensp;generate queries for MariaDB (not supported)\u003cbr\u003e\n`  sqlite`\u0026ensp;—\u0026ensp;generate queries for SQLite (not supported)\u003cbr\u003e\n`   mysql`\u0026ensp;—\u0026ensp;generate queries for MySQL (not supported)\u003cbr\u003e\n` checked`\u0026ensp;—\u0026ensp;enable compile-time checking (default)\n\nCurrently only postgres is supported.\n\n\u003cbr\u003e\n\n### Usage\n[\u003cimg alt=\"docs.rs\" src=\"https://img.shields.io/badge/docs.rs-sqly-5e8a76?labelColor=343942\u0026style=for-the-badge\u0026logo=docs.rs\" height=\"30\"\u003e](https://docs.rs/sqly)\n\n\u003cbr\u003e\n\n### Roadmap\n**Major**\n- [X] Basic `DELETE` queries\n- [X] Basic `INSERT` queries\n- [X] Basic `UPDATE` queries\n- [X] Basic `SELECT` queries\n    - [X] Storing information across separate `#[derive]` invocations\n    - [ ] Optional outer macro pattern for better compiler support\n- [X] `#[sqly(foreign)]`\n    - [X] SQL `INNER JOIN`\n    - [X] SQL `LEFT JOIN`\n    - [X] Custom SQL joins\n    - [X] Unique table aliases\n- [ ] `sqly::query!` macros to extend generated queries\n\n**Minor**\n- [X] `Flat::Flat` type for flexibility\n- [X] `#[sqly(infer)]` for custom sqlx types\n- [X] `#[sqly(value)]` for custom parameter binding\n- [X] `#[sqly(select)]` for custom SQL select expressions\n- [X] `#[sqly(default, from, try_from)]` for decoding table fields\n- [X] `#[sqly(insert, update)]` for custom SQL value expressions\n- [X] `#[sqly(filter)]` for custom SQL filter expressions\n- [X] `#[sqly(optional)]` for dynamic SQL through optional fields\n- [X] `#[sqly(returning)]` for SQL `RETURNING` clause\n\n**Draft**\n- [ ] `#[sqly(flatten)]` for nested structs\n- [ ] `#[sqly(group)]` for SQL `GROUP BY` clause\n- [ ] `#[sqly(distinct, order, limit, offset)]` clauses\n- [ ] Decoding database rows unchecked or by index\n- [ ] Custom attributes in generated structs\n- [ ] Support for generic structs\n- [ ] Output dummy code on error\n- [ ] ... ?\n\n\u003cbr\u003e\n\n#### License\n\n\u003csup\u003e\nLicensed under either of\n\u003ca href=\"LICENSE-APACHE\"\u003eApache License, Version 2.0\u003c/a\u003e or\n\u003ca href=\"LICENSE-MIT\"\u003eMIT license\u003c/a\u003e\nat your option.\n\u003c/sup\u003e\n\n\u003cbr\u003e\n\n\u003csub\u003e\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in this crate by you, as defined in the Apache-2.0 license, shall\nbe dual licensed as above, without any additional terms or conditions.\n\u003c/sub\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flmoors30%2Fsqly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flmoors30%2Fsqly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flmoors30%2Fsqly/lists"}