pub struct Cql;Expand description
Cassandra Query Language dialect, used by ScyllaEngine and the
Cassandra driver. CQL overlaps with SQL for the basic
SELECT/INSERT/UPDATE/DELETE ... WHERE shapes the Client API emits,
but diverges on many details: no RETURNING, no cross-partition
joins, no traditional ON CONFLICT (use IF NOT EXISTS LWT
instead), no transactions, and ? positional placeholders only.
The CQL dialect emits that subset safely; engine-level compensation
covers the RETURNING gap the way MySQL does.
Trait Implementations§
Source§impl SqlDialect for Cql
impl SqlDialect for Cql
Source§fn placeholder(&self, _i: usize) -> String
fn placeholder(&self, _i: usize) -> String
Emit the 1-indexed parameter placeholder for position
i.Source§fn returning_clause(&self, _cols: &str) -> String
fn returning_clause(&self, _cols: &str) -> String
Emit the clause (leading space included) that requests the given
columns be returned after an INSERT/UPDATE/DELETE. Postgres/SQLite/MySQL
emit
RETURNING cols; MSSQL emits OUTPUT INSERTED.cols.Source§fn insert_has_returning(&self) -> bool
fn insert_has_returning(&self) -> bool
Whether an INSERT statement can use the dialect’s returning clause to
retrieve inserted rows in-place.
Source§fn quote_ident(&self, i: &str) -> String
fn quote_ident(&self, i: &str) -> String
Quote a table/column identifier for safe interpolation.
Source§fn upsert_clause(&self, _c: &[&str], _s: &str) -> String
fn upsert_clause(&self, _c: &[&str], _s: &str) -> String
Emit the ON CONFLICT / ON DUPLICATE KEY clause (leading space
included) that converts an INSERT into an upsert.
Source§fn supports_distinct_on(&self) -> bool
fn supports_distinct_on(&self) -> bool
Whether the dialect supports
SELECT DISTINCT ON (cols) (Postgres-only
among our backends today).Source§fn commit_sql(&self) -> &'static str
fn commit_sql(&self) -> &'static str
SQL keyword that commits a transaction. Defaults to
COMMIT.Source§fn rollback_sql(&self) -> &'static str
fn rollback_sql(&self) -> &'static str
SQL keyword that rolls back a transaction. Defaults to
ROLLBACK.Auto Trait Implementations§
impl Freeze for Cql
impl RefUnwindSafe for Cql
impl Send for Cql
impl Sync for Cql
impl Unpin for Cql
impl UnsafeUnpin for Cql
impl UnwindSafe for Cql
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more