[][src]Trait cassandra_macro::CassandraTable

pub trait CassandraTable {
    fn key_space() -> &'static str;
fn table_name() -> &'static str;
fn create_table_cql() -> &'static str;
fn drop_table_cql() -> &'static str;
fn select_by_primary_keys(projection: Projection) -> String;
fn select_by_primary_and_cluster_keys(projection: Projection) -> String;
fn update_by_primary_keys(columns: Vec<String>) -> String;
fn update_by_primary_and_cluster_keys(columns: Vec<String>) -> String;
fn delete_by_primary_keys() -> String;
fn delete_by_primary_and_cluster_keys() -> String;
fn store_query(&self) -> StoreQuery;
fn update_query(
        &self
    ) -> Result<UpdateQuery, TableWithNoUpdatableColumnsError>;
fn delete_query(&self) -> DeleteQuery; }

Required methods

fn key_space() -> &'static str

key space

fn table_name() -> &'static str

Table name

fn create_table_cql() -> &'static str

CQL for table creation

fn drop_table_cql() -> &'static str

CQL for drop table

fn select_by_primary_keys(projection: Projection) -> String

Prepared statement for selection by primary keys

fn select_by_primary_and_cluster_keys(projection: Projection) -> String

Prepared statement for selection by primary keys and cluster keys

fn update_by_primary_keys(columns: Vec<String>) -> String

Prepared statement for update by primary keys

fn update_by_primary_and_cluster_keys(columns: Vec<String>) -> String

Prepared statement for update by primary keys and cluster keys

fn delete_by_primary_keys() -> String

Prepared statement for delete by primary keys

fn delete_by_primary_and_cluster_keys() -> String

Prepared statement for delete by primary keys and cluster key

fn store_query(&self) -> StoreQuery

Create StoreQuery containing the prepared statement to store this entity

fn update_query(&self) -> Result<UpdateQuery, TableWithNoUpdatableColumnsError>

Create UpdateQuery containing the prepared statement to update this entity

The statement only can update columns that are not part of the primary keys.

fn delete_query(&self) -> DeleteQuery

Create DeleteQuery containing the prepared statement to delete this entity

Loading content...

Implementors

Loading content...