pub enum CassandraStatement {
Show 38 variants
AlterKeyspace(CreateKeyspace),
AlterMaterializedView(AlterMaterializedView),
AlterRole(RoleCommon),
AlterTable(AlterTable),
AlterType(AlterType),
AlterUser(CreateUser),
ApplyBatch,
CreateAggregate(Aggregate),
CreateFunction(CreateFunction),
CreateIndex(CreateIndex),
CreateKeyspace(CreateKeyspace),
CreateMaterializedView(CreateMaterializedView),
CreateRole(RoleCommon),
CreateTable(CreateTable),
CreateTrigger(CreateTrigger),
CreateType(CreateType),
CreateUser(CreateUser),
Delete(Delete),
DropAggregate(CommonDrop),
DropFunction(CommonDrop),
DropIndex(CommonDrop),
DropKeyspace(CommonDrop),
DropMaterializedView(CommonDrop),
DropRole(CommonDrop),
DropTable(CommonDrop),
DropTrigger(DropTrigger),
DropType(CommonDrop),
DropUser(CommonDrop),
Grant(Privilege),
Insert(Insert),
ListPermissions(Privilege),
ListRoles(ListRole),
Revoke(Privilege),
Select(Select),
Truncate(FQName),
Update(Update),
Use(Identifier),
Unknown(String),
}
Expand description
The Supported Cassandra CQL3 statements Documentation for statements can be found at https://docs.datastax.com/en/cql-oss/3.3/cql/cql_reference/cqlCommandsTOC.html
Variants§
AlterKeyspace(CreateKeyspace)
AlterMaterializedView(AlterMaterializedView)
AlterRole(RoleCommon)
AlterTable(AlterTable)
AlterType(AlterType)
AlterUser(CreateUser)
ApplyBatch
CreateAggregate(Aggregate)
CreateFunction(CreateFunction)
CreateIndex(CreateIndex)
CreateKeyspace(CreateKeyspace)
CreateMaterializedView(CreateMaterializedView)
CreateRole(RoleCommon)
CreateTable(CreateTable)
CreateTrigger(CreateTrigger)
CreateType(CreateType)
CreateUser(CreateUser)
Delete(Delete)
DropAggregate(CommonDrop)
DropFunction(CommonDrop)
DropIndex(CommonDrop)
DropKeyspace(CommonDrop)
DropMaterializedView(CommonDrop)
DropRole(CommonDrop)
DropTable(CommonDrop)
DropTrigger(DropTrigger)
DropType(CommonDrop)
DropUser(CommonDrop)
Grant(Privilege)
Insert(Insert)
ListPermissions(Privilege)
ListRoles(ListRole)
Revoke(Privilege)
Select(Select)
Truncate(FQName)
Update(Update)
Use(Identifier)
Unknown(String)
Implementations§
Source§impl CassandraStatement
impl CassandraStatement
Sourcepub fn from_tree(tree: &Tree, source: &str) -> Vec<ParsedStatement>
pub fn from_tree(tree: &Tree, source: &str) -> Vec<ParsedStatement>
extract the cassandra statement from an AST tree.
the boolean return value is true
if there is a parsing error in the statement tree.
Sourcepub fn from_node(node: &Node<'_>, source: &str) -> CassandraStatement
pub fn from_node(node: &Node<'_>, source: &str) -> CassandraStatement
extract the cassandra statement from an AST node.
pub fn get_keyspace<'a>(&'a self, default: &'a Identifier) -> &'a Identifier
pub fn short_name(&self) -> &'static str
Sourcepub fn get_table_name(&self) -> Option<&FQName>
pub fn get_table_name(&self) -> Option<&FQName>
returns the table name from the statement if there is one.
Trait Implementations§
Source§impl Clone for CassandraStatement
impl Clone for CassandraStatement
Source§fn clone(&self) -> CassandraStatement
fn clone(&self) -> CassandraStatement
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CassandraStatement
impl Debug for CassandraStatement
Source§impl Display for CassandraStatement
impl Display for CassandraStatement
Source§impl PartialEq for CassandraStatement
impl PartialEq for CassandraStatement
impl StructuralPartialEq for CassandraStatement
Auto Trait Implementations§
impl Freeze for CassandraStatement
impl RefUnwindSafe for CassandraStatement
impl Send for CassandraStatement
impl Sync for CassandraStatement
impl Unpin for CassandraStatement
impl UnwindSafe for CassandraStatement
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more