Catalytic: ScyllaDB and Cassandra Object-Relation Mapper

Latest Version Build Status

This library contains several crates with the following features:

Not all types are supported yet due to https://github.com/scylladb/scylla-rust-driver/issues/104

Query types

Depending on a query, a certain query type can be derived. These can be found here. These are the commonly used query types:

There are also structs for CRUD operations.

Usage

Automatic map tables to Rust

You can see an example on how to generate Rust structs in the example dir.

How to implement it yourself (step-by-step guide how to mimic the example crate):

An example of the structure of the generated code for table 'child' is:

Macros

Crate catalytic_macro holds several macros that can be used to ensure compile/type checked queries. Examples on how this can be used can be found in lib.rs, method qmd.

How to implement it yourself: - Add dependency: catalytic_macro = "0.1" - The query macro returns the correct query type for the given query - The query_base_table macro transforms a select query to the materialized view table, to a select query of the base table - mirror and primary_key can be used for other derive macros