{"id":31644098,"url":"https://github.com/quietboil/include-oracle-sql","last_synced_at":"2025-10-07T04:09:20.503Z","repository":{"id":57674347,"uuid":"482995980","full_name":"quietboil/include-oracle-sql","owner":"quietboil","description":"A Yesql inspired macro for using Oracle SQL in Rust ","archived":false,"fork":false,"pushed_at":"2023-03-07T22:15:37.000Z","size":42,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-02T19:53:55.523Z","etag":null,"topics":["database","oracle","rust"],"latest_commit_sha":null,"homepage":"https://quietboil.github.io/include-oracle-sql","language":"Rust","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/quietboil.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":"2022-04-18T21:01:22.000Z","updated_at":"2024-01-22T07:42:32.000Z","dependencies_parsed_at":"2022-08-29T14:31:43.819Z","dependency_job_id":null,"html_url":"https://github.com/quietboil/include-oracle-sql","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/quietboil/include-oracle-sql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quietboil%2Finclude-oracle-sql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quietboil%2Finclude-oracle-sql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quietboil%2Finclude-oracle-sql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quietboil%2Finclude-oracle-sql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quietboil","download_url":"https://codeload.github.com/quietboil/include-oracle-sql/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quietboil%2Finclude-oracle-sql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278486612,"owners_count":25995006,"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-05T02:00:06.059Z","response_time":54,"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"}},"keywords":["database","oracle","rust"],"created_at":"2025-10-07T04:05:09.132Z","updated_at":"2025-10-07T04:09:20.498Z","avatar_url":"https://github.com/quietboil.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![crates.io](https://img.shields.io/crates/v/include-oracle-sql)](https://crates.io/crates/include-oracle-sql)\n[![Documentation](https://docs.rs/include-oracle-sql/badge.svg)](https://docs.rs/include-oracle-sql)\n![MIT](https://img.shields.io/crates/l/include-oracle-sql.svg)\n\n**include-oracle-sql** is an extension of [include-sql][1] for using Oracle SQL in Rust. It completes include-sql by providing `impl_sql` macro to generate database access methods from the included SQL. include-oracle-sql uses [Sibyl][2] for database access.\n\n# Example\n\nWrite your SQL and save it in a file. For example, let's say the following is saved as `library.sql` in the project's `sql` folder:\n\n```sql\n-- name: get_loaned_books ?\n--\n-- Returns the list of books loaned to a patron\n--\n-- # Parameters\n--\n-- param: user_id: \u0026str - user ID\n--\nSELECT book_title\n  FROM library\n WHERE loaned_to = :user_id\n ORDER BY 1\n\n-- name: loan_books!\n--\n-- Updates the book records to reflect loan to a patron\n--\n-- # Parameters\n--\n-- param: book_titles: \u0026str - book titles\n-- param: user_id: \u0026str - user ID\n--\nUPDATE library\n   SET loaned_to = :user_id\n     , loaned_on = current_timestamp\n WHERE book_title IN (:book_titles)\n```\n\nAnd then use it in Rust as:\n\n```rust\nuse include_oracle_sql::{include_sql, impl_sql};\n\ninclude_sql!(\"sql/library.sql\");\n\nfn main() -\u003e sibyl::Result\u003c()\u003e {\n    let db_name = std::env::var(\"DBNAME\").expect(\"database name\");\n    let db_user = std::env::var(\"DBUSER\").expect(\"user name\");\n    let db_pass = std::env::var(\"DBPASS\").expect(\"password\");\n\n    let oracle = sibyl::env()?;\n    let session = oracle.connect(\u0026db_name, \u0026db_user, \u0026db_pass)?;\n\n    db.loan_books(\u0026[\"War and Peace\", \"Gone With the Wind\"], \"Sheldon Cooper\")?;\n\n    db.get_loaned_books(\"Sheldon Cooper\", |row| {\n        let book_title : \u0026str = row.get(\"BOOK_TITLE\")?;\n        println!(\"{}\", book_title);\n        Ok(())\n    })?;\n\n    Ok(())\n}\n```\n\n# Documentation\n\nThe included [documentation][3] describes the supported SQL file format and provides additional details on the generated code.\n\n# 💥 Breaking Changes in 0.2\n\n* [include-sql][1] changed optional statement terminator from `;` to `/`. SQL files that used `;` terminator would need to change it to `/` or remove it completely.\n\n[1]: https://crates.io/crates/include-sql\n[2]: https://crates.io/crates/sibyl\n[3]: https://quietboil.github.io/include-oracle-sql\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquietboil%2Finclude-oracle-sql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquietboil%2Finclude-oracle-sql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquietboil%2Finclude-oracle-sql/lists"}