{"id":16702756,"url":"https://github.com/jasperav/catalytic","last_synced_at":"2026-02-14T17:01:22.584Z","repository":{"id":40350156,"uuid":"417470633","full_name":"Jasperav/Catalytic","owner":"Jasperav","description":"🚀 Catalytic is an ORM for ScyllaDb and Cassandra which provides zero-cost abstractions for querying and generating Rust structs based on the database. Scylla and Cassandra are both NoSQL databases which can scale horizontally and hold large amounts of data.","archived":false,"fork":false,"pushed_at":"2024-10-22T06:19:10.000Z","size":338,"stargazers_count":104,"open_issues_count":4,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-01-14T01:09:54.007Z","etag":null,"topics":["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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Jasperav.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-15T11:11:56.000Z","updated_at":"2025-11-27T02:02:58.000Z","dependencies_parsed_at":"2023-02-16T17:16:42.893Z","dependency_job_id":"8e5f0e45-8231-4ebe-87af-eb170ccfbdb0","html_url":"https://github.com/Jasperav/Catalytic","commit_stats":{"total_commits":36,"total_committers":2,"mean_commits":18.0,"dds":0.08333333333333337,"last_synced_commit":"6f963d55a193a910deb224f22a9318d8d5b83006"},"previous_names":["jasperav/scylla_orm"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Jasperav/Catalytic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jasperav%2FCatalytic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jasperav%2FCatalytic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jasperav%2FCatalytic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jasperav%2FCatalytic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jasperav","download_url":"https://codeload.github.com/Jasperav/Catalytic/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jasperav%2FCatalytic/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29450587,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T15:52:44.973Z","status":"ssl_error","status_checked_at":"2026-02-14T15:52:11.208Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["orm","rust"],"created_at":"2024-10-12T19:06:02.683Z","updated_at":"2026-02-14T17:01:22.525Z","avatar_url":"https://github.com/Jasperav.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Catalytic: ScyllaDB and Cassandra Object-Relation Mapper\n\n[![Latest Version](https://img.shields.io/crates/v/catalytic.svg)](https://crates.io/crates/catalytic)\n[![Build Status](https://img.shields.io/github/actions/workflow/status/Jasperav/catalytic/scylla.yml?branch=master)](https://github.com/jasperav/catalytic/actions)\n\n\u003cimg src=\"assets/rust-orm.png\" height=\"200\" align=\"right\" title=\"Rust ORM ScyllaDB logo\"\u003e\nThis library contains several crates with the following features:\n\n- Automatic map tables to Rust `struct`s: **catalytic_table_to_struct**. See [Usage](#automatic-map-tables-to-rust).\nSee the [generated](/catalytic_table_to_struct/example/src/generated) dir for the generated code.\n- Compile time checked queries: **catalytic_macro** (`catalytic_macro::query`). See [Usage](#catalytic_macro).\n- Plugin derive macro to generate business logic: **catalytic_macro** (`catalytic_macro::mirror`)\n- Automatic JSON mapping. When there is a column with type `text`, you can implement the\n`Transformer` trait and map it to a type that implements `serde::Serialize` and `serde::Deserialize`\n- All queries are executed as a prepared statement\n- Support for Materialized Views (and mapping between the base table if the columns are the same)\n\n_Not all types are supported yet due to https://github.com/scylladb/scylla-rust-driver/issues/104_\n\n## Query types\nDepending on a query, a certain query type can be derived. These can be found [here](/catalytic/src/query_transform.rs).\nThese are the commonly used query types:\n\n- `SelectMultiple`: Can be used as an iterator to iterate over the rows\n- `SelectUnique`: Selects an optional unique row by full primary key\n- `SelectUniqueExpect`: Same as `SelectUnique`, but fails if the row doesn't exist\n- `SelectUniqueExpect` with `Count` as entity type: has the special `select_count` method for queries like \"select count(*) from ...\"\n\nThere are also `struct`s for CRUD operations.\n\n## Usage\n### Automatic map tables to Rust\nYou can see an example on how to generate Rust `struct`s in the [example](/catalytic_table_to_struct/example) dir.\n\n- In the build.rs file the `Transformer` trait is implemented and used for json mapping\n- In the generated dir you can see the generated `struct`s\n\nHow to implement it yourself (step-by-step guide how to mimic the `example` crate):\n\n- Add a build-dependency: `catalytic_table_to_struct = \"0.1\"`\n- Create a build.rs file\n- Optionally implement the `Tranformer` trait (or use `DefaultTransformer`)\n- Call `catalytic_table_to_struct::generate`\n- Build the project\n\nAn example of the structure of the generated code for table 'child' is:\n\n- Child: a `struct` with owned values. Can be converted to ChildRef, PrimaryKey and PrimaryKeyRef\n- ChildRef: a `struct` where the values are all borrowed. This `struct` can perform insertions. Can be converted to Child, PrimaryKey and PrimaryKeyRef\n- PrimaryKey: a `struct` which holds the owned values of the primary key fields of Child. Can be converted to PrimaryKeyRef.\n- PrimaryKeyRef: a `struct` where the values are all borrowed. This `struct` can perform updates, deletions and selects. Can be converted to PrimaryKey\n- UpdatableColumn: an `enum` which holds the enum variants with owned values of columns that can be updated. Can be converted to UpdatableColumnRef.\n- UpdatableColumnRef: an `enum` where the values are all borrowed. This is used by PrimaryKeyRef for updates. Can be converted to UpdatableColumn.\n\n### Macros\nCrate `catalytic_macro` holds several macros that can be used to ensure compile/type checked queries.\nExamples on how this can be used can be found in [lib.rs](/catalytic_table_to_struct/example/src/lib.rs), method `qmd`.\n\nHow to implement it yourself:\n- Add dependency: `catalytic_macro = \"0.1\"`\n- The `query` macro returns the correct [query type](#query-types) for the given query\n- The `query_base_table` macro transforms a `select` query to the materialized view table, to a `select` query of the base table\n- `mirror` and `primary_key` can be used for other derive macros\n\n### Used in production\nhttps://www.beezleapp.com/ - Beezle Social allows users to connect which are nearby, discover local events now\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasperav%2Fcatalytic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjasperav%2Fcatalytic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasperav%2Fcatalytic/lists"}