pub struct Indexer { /* private fields */ }Expand description
Entry struct for indexing csv tables
Implementations§
Source§impl Indexer
impl Indexer
Sourcepub fn always_use_unix_newline(&mut self, tv: bool)
pub fn always_use_unix_newline(&mut self, tv: bool)
Always use unix newline for formatting
Sourcepub fn contains_table(&self, table_name: &str) -> bool
pub fn contains_table(&self, table_name: &str) -> bool
Check if indexer contains table
Sourcepub fn drop_table(&mut self, table_name: &str)
pub fn drop_table(&mut self, table_name: &str)
Drop table
Sourcepub fn add_table(
&mut self,
table_name: &str,
input: impl BufRead,
) -> CIndexResult<()>
pub fn add_table( &mut self, table_name: &str, input: impl BufRead, ) -> CIndexResult<()>
Add table
pub fn add_table_with_option( &mut self, table_name: &str, input: impl BufRead, reader_option: ReaderOption, ) -> CIndexResult<()>
Sourcepub fn add_table_with_headers(
&mut self,
table_name: &str,
input: impl BufRead,
headers: &[String],
) -> CIndexResult<()>
pub fn add_table_with_headers( &mut self, table_name: &str, input: impl BufRead, headers: &[String], ) -> CIndexResult<()>
Add table with header
Sourcepub fn index_raw(
&self,
raw_query: &str,
out_option: OutOption<'_>,
) -> CIndexResult<()>
pub fn index_raw( &self, raw_query: &str, out_option: OutOption<'_>, ) -> CIndexResult<()>
Index with raq query
Sourcepub fn index(&self, query: Query, out_option: OutOption<'_>) -> CIndexResult<()>
pub fn index(&self, query: Query, out_option: OutOption<'_>) -> CIndexResult<()>
Index with pre-built query
Sourcepub fn index_get_records(&self, query: Query) -> CIndexResult<Vec<Vec<String>>>
pub fn index_get_records(&self, query: Query) -> CIndexResult<Vec<Vec<String>>>
Get rows filtered by query
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Indexer
impl RefUnwindSafe for Indexer
impl Send for Indexer
impl Sync for Indexer
impl Unpin for Indexer
impl UnwindSafe for Indexer
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