{"id":18907492,"url":"https://github.com/roy-ganz/toql","last_synced_at":"2025-10-24T16:34:30.863Z","repository":{"id":57670187,"uuid":"185453068","full_name":"roy-ganz/toql","owner":"roy-ganz","description":"A friendly and productive ORM","archived":false,"fork":false,"pushed_at":"2022-04-12T12:20:37.000Z","size":5210,"stargazers_count":51,"open_issues_count":6,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-10T03:39:38.889Z","etag":null,"topics":["database","orm","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/roy-ganz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-07T17:59:02.000Z","updated_at":"2025-02-07T10:37:20.000Z","dependencies_parsed_at":"2022-09-26T20:40:51.666Z","dependency_job_id":null,"html_url":"https://github.com/roy-ganz/toql","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roy-ganz%2Ftoql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roy-ganz%2Ftoql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roy-ganz%2Ftoql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roy-ganz%2Ftoql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roy-ganz","download_url":"https://codeload.github.com/roy-ganz/toql/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249006521,"owners_count":21197288,"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":["database","orm","rust"],"created_at":"2024-11-08T09:21:46.705Z","updated_at":"2025-10-24T16:34:25.837Z","avatar_url":"https://github.com/roy-ganz.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Toql - A friendly and productive ORM\n\n![Tests](https://github.com/roy-ganz/toql/actions/workflows/tests.yml/badge.svg)\n[![Current Crates.io Version](https://img.shields.io/crates/v/toql.svg)](https://crates.io/crates/toql)\n\n[Beginner Guide](https://roy-ganz.github.io/toql_guide) | [API documentation](https://docs.rs/toql)\n\nToql is an ORM for async databases that features\n- Translation between Rust structs and database tables.\n- Can load and modify nested structs.\n- A unique dead simple query language, suitable for web clients.\n- Different table aliases from long and readable to tiny and fast.\n- Prepared statements against SQL injection.\n- Support for raw SQL for full database power.\n- Support for role based access.\n- Highly customizable through user defined parameters, query functions, field handlers, etc. \n- Compile time safety for queries, fields and path names.\n- No unsafe Rust code.\n- Tested on real world scenario.\n\nIt currently only supports **MySQL**. More are coming, promised :)\n\n## Installation\nAdd this to your `Cargo.toml`:\n\n```toml\n[dependencies]\ntoql = {version = \"0.4\", features = [\"serde\"]}\ntoql_mysql_async = \"0.4\"\n```\n\n## Look And Feel\n\nDerive your structs:\n```rust\n#[derive(Toql)]\n#[toql(auto_key)]\nstruct Todo {\n    #[toql(key)]\n    id: u64,\n    what: String,\n\n    #[toql(join)]\n    user: User \n}\n```\n\nAnd do stuff with them:\n```rust\nlet toql = ...\nlet todo = Todo{ ... };\n\n// Insert todo and update its generated id\ntoql.insert_one(\u0026mut todo, paths!(top)).await?; \n\n// Compile time checked queries!\nlet q = query!(Todo, \"*, user_id eq ?\", \u0026todo.user.id); \n\n// Typesafe loading\nlet todos = toql.load_many(q).await?; \n```\n\n\n## Quick start\nCheck out the [CRUD example](https://github.com/roy-ganz/todo_rotomy).\n\n## Contribution\nComments, bug fixes and quality improvements are welcome. \n\n## License\nToql is distributed under the terms of both the MIT license and the\nApache License (Version 2.0).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froy-ganz%2Ftoql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froy-ganz%2Ftoql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froy-ganz%2Ftoql/lists"}