DataTableBuffer

Struct DataTableBuffer 

Source
pub struct DataTableBuffer { /* private fields */ }
Expand description

A Buffer implementation backed by DataTable This allows us to integrate our clean DataTable architecture with the existing enhanced TUI

Implementations§

Source§

impl DataTableBuffer

Source

pub fn new(id: usize, table: DataTable) -> Self

Create a new DataTableBuffer from a DataTable

Source

pub fn from_file(id: usize, file_path: PathBuf) -> Result<Self>

Create from file path

Source

pub fn table(&self) -> &DataTable

Get the underlying DataTable (read-only access)

Source

pub fn view(&self) -> &DataTableView

Get the DataTableView (read-only access)

Trait Implementations§

Source§

impl BufferAPI for DataTableBuffer

Source§

fn get_id(&self) -> usize

Source§

fn get_query(&self) -> String

Source§

fn set_query(&mut self, query: String)

Source§

fn get_last_query(&self) -> String

Source§

fn set_last_query(&mut self, query: String)

Source§

fn get_datatable(&self) -> Option<&DataTable>

Source§

fn get_datatable_mut(&mut self) -> Option<&mut DataTable>

Source§

fn has_datatable(&self) -> bool

Source§

fn get_original_source(&self) -> Option<&DataTable>

Source§

fn set_datatable(&mut self, datatable: Option<Arc<DataTable>>)

Source§

fn set_results_as_datatable( &mut self, _response: Option<QueryResponse>, ) -> Result<(), String>

V50: Helper to convert QueryResponse to DataTable and store it
Source§

fn get_dataview(&self) -> Option<&DataView>

Source§

fn get_dataview_mut(&mut self) -> Option<&mut DataView>

Source§

fn set_dataview(&mut self, dataview: Option<DataView>)

Source§

fn has_dataview(&self) -> bool

Source§

fn get_mode(&self) -> AppMode

Source§

fn set_mode(&mut self, mode: AppMode)

Source§

fn get_edit_mode(&self) -> EditMode

Source§

fn set_edit_mode(&mut self, mode: EditMode)

Source§

fn get_status_message(&self) -> String

Source§

fn set_status_message(&mut self, message: String)

Source§

fn get_selected_row(&self) -> Option<usize>

Source§

fn set_selected_row(&mut self, row: Option<usize>)

Source§

fn get_current_column(&self) -> usize

Source§

fn set_current_column(&mut self, col: usize)

Source§

fn get_scroll_offset(&self) -> (usize, usize)

Source§

fn set_scroll_offset(&mut self, offset: (usize, usize))

Source§

fn get_last_results_row(&self) -> Option<usize>

Source§

fn set_last_results_row(&mut self, row: Option<usize>)

Source§

fn get_last_scroll_offset(&self) -> (usize, usize)

Source§

fn set_last_scroll_offset(&mut self, offset: (usize, usize))

Source§

fn get_filter_pattern(&self) -> String

Source§

fn set_filter_pattern(&mut self, pattern: String)

Source§

fn is_filter_active(&self) -> bool

Source§

fn set_filter_active(&mut self, active: bool)

Source§

fn get_fuzzy_filter_pattern(&self) -> String

Source§

fn set_fuzzy_filter_pattern(&mut self, pattern: String)

Source§

fn is_fuzzy_filter_active(&self) -> bool

Source§

fn set_fuzzy_filter_active(&mut self, active: bool)

Source§

fn get_fuzzy_filter_indices(&self) -> &Vec<usize>

Source§

fn set_fuzzy_filter_indices(&mut self, indices: Vec<usize>)

Source§

fn clear_fuzzy_filter(&mut self)

Source§

fn get_search_pattern(&self) -> String

Source§

fn set_search_pattern(&mut self, pattern: String)

Source§

fn get_search_matches(&self) -> Vec<(usize, usize)>

Source§

fn set_search_matches(&mut self, matches: Vec<(usize, usize)>)

Source§

fn get_current_match(&self) -> Option<(usize, usize)>

Source§

fn set_current_match(&mut self, match_pos: Option<(usize, usize)>)

Source§

fn get_search_match_index(&self) -> usize

Source§

fn set_search_match_index(&mut self, index: usize)

Source§

fn clear_search_state(&mut self)

Source§

fn get_column_stats(&self) -> Option<&ColumnStatistics>

Source§

fn set_column_stats(&mut self, stats: Option<ColumnStatistics>)

Source§

fn get_sort_column(&self) -> Option<usize>

Source§

fn set_sort_column(&mut self, column: Option<usize>)

Source§

fn get_sort_order(&self) -> SortOrder

Source§

fn set_sort_order(&mut self, order: SortOrder)

Source§

fn get_name(&self) -> String

Source§

fn set_name(&mut self, name: String)

Source§

fn get_file_path(&self) -> Option<&PathBuf>

Source§

fn set_file_path(&mut self, path: Option<String>)

Source§

fn is_modified(&self) -> bool

Source§

fn set_modified(&mut self, modified: bool)

Source§

fn get_last_query_source(&self) -> Option<String>

Source§

fn set_last_query_source(&mut self, source: Option<String>)

Source§

fn get_column_widths(&self) -> &Vec<u16>

Source§

fn set_column_widths(&mut self, widths: Vec<u16>)

Source§

fn is_compact_mode(&self) -> bool

Source§

fn set_compact_mode(&mut self, compact: bool)

Source§

fn is_viewport_lock(&self) -> bool

Source§

fn set_viewport_lock(&mut self, locked: bool)

Source§

fn get_viewport_lock_row(&self) -> Option<usize>

Source§

fn set_viewport_lock_row(&mut self, row: Option<usize>)

Source§

fn is_show_row_numbers(&self) -> bool

Source§

fn set_show_row_numbers(&mut self, show: bool)

Source§

fn is_case_insensitive(&self) -> bool

Source§

fn set_case_insensitive(&mut self, insensitive: bool)

Source§

fn get_input_value(&self) -> String

Source§

fn set_input_value(&mut self, value: String)

Source§

fn get_input_cursor(&self) -> usize

Source§

fn set_input_cursor(&mut self, pos: usize)

Source§

fn get_kill_ring(&self) -> String

Source§

fn set_kill_ring(&mut self, text: String)

Source§

fn get_last_visible_rows(&self) -> usize

Source§

fn set_last_visible_rows(&mut self, rows: usize)

Source§

fn apply_filter(&mut self) -> Result<()>

Source§

fn apply_sort(&mut self) -> Result<()>

Source§

fn search(&mut self) -> Result<()>

Source§

fn clear_filters(&mut self)

Source§

fn get_row_count(&self) -> usize

Source§

fn get_column_count(&self) -> usize

Source§

fn get_column_names(&self) -> Vec<String>

Source§

fn get_undo_stack(&self) -> &Vec<(String, usize)>

Source§

fn push_undo(&mut self, state: (String, usize))

Source§

fn pop_undo(&mut self) -> Option<(String, usize)>

Source§

fn get_redo_stack(&self) -> &Vec<(String, usize)>

Source§

fn push_redo(&mut self, state: (String, usize))

Source§

fn pop_redo(&mut self) -> Option<(String, usize)>

Source§

fn clear_redo(&mut self)

Source§

fn is_kill_ring_empty(&self) -> bool

Source§

fn perform_undo(&mut self) -> bool

Source§

fn perform_redo(&mut self) -> bool

Source§

fn save_state_for_undo(&mut self)

Source§

fn debug_dump(&self) -> String

Source§

fn get_input_text(&self) -> String

Source§

fn set_input_text(&mut self, text: String)

Source§

fn handle_input_key(&mut self, event: KeyEvent) -> bool

Source§

fn switch_input_mode(&mut self, _multiline: bool)

Source§

fn get_input_cursor_position(&self) -> usize

Source§

fn set_input_cursor_position(&mut self, position: usize)

Source§

fn is_input_multiline(&self) -> bool

Source§

fn navigate_history_up(&mut self, _history: &[String]) -> bool

Source§

fn navigate_history_down(&mut self, _history: &[String]) -> bool

Source§

fn reset_history_navigation(&mut self)

Source§

fn clear_results(&mut self)

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,