pub enum GrammarContext {
Show 16 variants
Start,
ExpectColumnList,
ExpectTable,
ExpectKeyspace,
ExpectColumn,
ExpectSetClause,
ExpectQualifiedPart,
ExpectType,
ExpectOrderBy,
ExpectOrderByColumn,
ExpectValues,
ExpectWithOption,
ExpectConsistencyLevel,
ExpectDescribeTarget,
ExpectFilePath,
General,
}Expand description
Grammar context: what syntactic position we’re at, used to distinguish keywords from identifiers and to drive tab completion.
Variants§
Start
Start of statement — expecting a keyword like SELECT, INSERT, etc.
ExpectColumnList
After SELECT — expecting column list, *, or DISTINCT.
ExpectTable
After FROM / INTO / UPDATE / TABLE / INDEX ON — expecting a table name.
ExpectKeyspace
After USE / KEYSPACE — expecting a keyspace name.
ExpectColumn
After WHERE / AND / IF (conditions) — expecting a column name.
ExpectSetClause
After SET (in UPDATE) — expecting column = value pairs.
ExpectQualifiedPart
After a dot — expecting the second part of a qualified name.
ExpectType
After a column/table type keyword — expecting a CQL type name.
ExpectOrderBy
After ORDER — expecting BY.
ExpectOrderByColumn
After ORDER BY — expecting column name.
ExpectValues
After VALUES — expecting ( value_list ).
ExpectWithOption
Inside WITH clause options.
ExpectConsistencyLevel
After CONSISTENCY / SERIAL CONSISTENCY — expecting level name.
ExpectDescribeTarget
After DESCRIBE / DESC — expecting sub-command or schema name.
ExpectFilePath
After SOURCE / CAPTURE — expecting file path.
General
General clause context (default within a statement body).
Trait Implementations§
Source§impl Clone for GrammarContext
impl Clone for GrammarContext
Source§fn clone(&self) -> GrammarContext
fn clone(&self) -> GrammarContext
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GrammarContext
impl Debug for GrammarContext
Source§impl PartialEq for GrammarContext
impl PartialEq for GrammarContext
impl Copy for GrammarContext
impl Eq for GrammarContext
impl StructuralPartialEq for GrammarContext
Auto Trait Implementations§
impl Freeze for GrammarContext
impl RefUnwindSafe for GrammarContext
impl Send for GrammarContext
impl Sync for GrammarContext
impl Unpin for GrammarContext
impl UnwindSafe for GrammarContext
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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