pub struct CompletionManager { /* private fields */ }
Expand description
Manages tab completion for SQL queries Extracted from the monolithic enhanced_tui.rs
Implementations§
Source§impl CompletionManager
impl CompletionManager
pub fn new() -> Self
Sourcepub fn has_suggestions(&self) -> bool
pub fn has_suggestions(&self) -> bool
Check if we have active suggestions
Sourcepub fn suggestions(&self) -> &[String]
pub fn suggestions(&self) -> &[String]
Get current suggestions
Sourcepub fn current_index(&self) -> usize
pub fn current_index(&self) -> usize
Get current suggestion index
Sourcepub fn current_suggestion(&self) -> Option<&str>
pub fn current_suggestion(&self) -> Option<&str>
Get the currently selected suggestion
Sourcepub fn next_suggestion(&mut self)
pub fn next_suggestion(&mut self)
Move to next suggestion
Sourcepub fn prev_suggestion(&mut self)
pub fn prev_suggestion(&mut self)
Move to previous suggestion
Sourcepub fn set_table_names(&mut self, tables: HashSet<String>)
pub fn set_table_names(&mut self, tables: HashSet<String>)
Update available table names
Sourcepub fn set_column_names(&mut self, table: String, columns: Vec<String>)
pub fn set_column_names(&mut self, table: String, columns: Vec<String>)
Update column names for a table
Trait Implementations§
Source§impl Clone for CompletionManager
impl Clone for CompletionManager
Source§fn clone(&self) -> CompletionManager
fn clone(&self) -> CompletionManager
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 moreAuto Trait Implementations§
impl Freeze for CompletionManager
impl RefUnwindSafe for CompletionManager
impl Send for CompletionManager
impl Sync for CompletionManager
impl Unpin for CompletionManager
impl UnwindSafe for CompletionManager
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
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