enum CompletionContext {
Show 23 variants
Empty,
ClauseKeyword,
TableName {
keyspace: Option<String>,
},
ColumnName {
keyspace: Option<String>,
table: String,
},
ConsistencyLevel,
DescribeTarget,
FilePath,
KeyspaceName,
SelectColumnList,
CreateTarget,
AlterTarget,
DropTarget,
DeleteTarget,
GrantRevoke,
InsertTarget,
BeginTarget,
SelectPostStar,
SelectPostFrom,
InsertPostValues,
DeletePostFrom,
UpdateClause,
UpdatePostSet,
GenericClause,
}Expand description
Detected completion context based on the input up to the cursor.
Variants§
Empty
At the start of input — complete with statement keywords and shell commands.
ClauseKeyword
After a statement keyword — complete with generic clause keywords.
TableName
After FROM, INTO, UPDATE, etc. — complete with table names.
ColumnName
After SELECT … FROM table WHERE — complete with column names.
ConsistencyLevel
After CONSISTENCY — complete with consistency levels.
DescribeTarget
After DESCRIBE/DESC — complete with sub-commands or schema names.
FilePath
After SOURCE or CAPTURE — complete with file paths.
KeyspaceName
After USE — complete with keyspace names.
SelectColumnList
After SELECT — complete with *, DISTINCT, JSON, or column names.
CreateTarget
After CREATE — complete with TABLE, KEYSPACE, INDEX, etc.
AlterTarget
After ALTER — complete with TABLE, KEYSPACE, TYPE, etc.
DropTarget
After DROP — complete with TABLE, KEYSPACE, INDEX, etc.
DeleteTarget
After DELETE — complete with FROM or column names.
GrantRevoke
After GRANT/REVOKE — complete with permission names.
InsertTarget
After INSERT — complete with INTO.
BeginTarget
After BEGIN — complete with BATCH, UNLOGGED, COUNTER.
SelectPostStar
After SELECT * — only FROM is valid next.
SelectPostFrom
After SELECT … FROM table — complete with WHERE, ORDER BY, LIMIT, etc.
InsertPostValues
After INSERT … VALUES(…) — complete with IF NOT EXISTS, USING.
DeletePostFrom
After DELETE … FROM table — complete with WHERE, IF, USING TIMESTAMP.
UpdateClause
After UPDATE table — complete with SET, USING.
UpdatePostSet
After UPDATE … SET col = val — complete with WHERE, IF.
GenericClause
Generic clause fallback — common clause keywords.
Trait Implementations§
Source§impl Debug for CompletionContext
impl Debug for CompletionContext
Source§impl PartialEq for CompletionContext
impl PartialEq for CompletionContext
impl StructuralPartialEq for CompletionContext
Auto Trait Implementations§
impl Freeze for CompletionContext
impl RefUnwindSafe for CompletionContext
impl Send for CompletionContext
impl Sync for CompletionContext
impl Unpin for CompletionContext
impl UnsafeUnpin for CompletionContext
impl UnwindSafe for CompletionContext
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
§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