{"id":20578885,"url":"https://github.com/andrewbaxter/rs-sqlite-symbology","last_synced_at":"2025-08-13T19:19:10.704Z","repository":{"id":142368518,"uuid":"547298956","full_name":"andrewbaxter/rs-sqlite-symbology","owner":"andrewbaxter","description":"Rust Sqlite query data model and query string builder","archived":false,"fork":false,"pushed_at":"2022-10-30T12:12:02.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-16T22:20:15.204Z","etag":null,"topics":["orm","rust","sql","sqlite"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andrewbaxter.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","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":"2022-10-07T13:04:17.000Z","updated_at":"2022-10-07T13:05:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"4964bb86-bdbb-43d0-ba42-323727aafb80","html_url":"https://github.com/andrewbaxter/rs-sqlite-symbology","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/andrewbaxter%2Frs-sqlite-symbology","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewbaxter%2Frs-sqlite-symbology/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewbaxter%2Frs-sqlite-symbology/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewbaxter%2Frs-sqlite-symbology/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrewbaxter","download_url":"https://codeload.github.com/andrewbaxter/rs-sqlite-symbology/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242206001,"owners_count":20089251,"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":["orm","rust","sql","sqlite"],"created_at":"2024-11-16T06:14:51.199Z","updated_at":"2025-03-06T11:44:17.825Z","avatar_url":"https://github.com/andrewbaxter.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"A Rust data model for Sqlite queries that has methods for building query strings and associated parameter lists.\n\nTypically you'd make an instance of `Select` `Insert` or `Update`, then use it like\n\n```\nlet mut params: Vec\u003cToSqlOutput\u003c'_\u003e\u003e = vec![];\nlet query_str = Select{...}.build_str(params.as_mut());\nlet mut stmt = conn.prepare(\u0026query_text).unwrap();\nlet mut rows = stmt.query(params_from_iter(params.iter())).unwrap();\n...\n```\n\nExpressions are used in various places and are instantiated like\n\n```\nExpr::new(ParamExpr::V(\n    bincode::serialize(\u0026ch_id.owner).unwrap().into(),\n))\n```\n\nBenefits over hand written SQL:\n\n- You can conditinally add/remove/modify clauses, compose query parts using standard language tools (functions) - useful for dynamic queries\n- You can use variables for fields/tables/etc. guaranteeing consistency and preventing typos at compile time\n- Automatic formatting using rustfmt\n\nBenefits over ORMs:\n\n- Not a framework\n\nBenefits over other SQL generators:\n\n- No macros, so automatic formatting using rustfmt\n- SQLite specific, which (theoretically) means better language coverage\n\nIdeally this would have 1-1 relation with the graphs on the SQLite website, sans maybe the formatting-only paths (like including/omitting \"as\").\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewbaxter%2Frs-sqlite-symbology","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewbaxter%2Frs-sqlite-symbology","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewbaxter%2Frs-sqlite-symbology/lists"}