pub struct CsvDataSourceAdapter { /* private fields */ }Expand description
Adapter to make CsvApiClient implement DataSource trait
Implementations§
Source§impl CsvDataSourceAdapter
 
impl CsvDataSourceAdapter
pub fn new(client: CsvApiClient) -> Self
pub fn from_csv_path(path: &str, table_name: &str) -> Result<Self>
pub fn from_json_path(path: &str, table_name: &str) -> Result<Self>
Sourcepub fn inner(&self) -> &CsvApiClient
 
pub fn inner(&self) -> &CsvApiClient
Get access to the underlying CSV client if needed
pub fn inner_mut(&mut self) -> &mut CsvApiClient
Trait Implementations§
Source§impl DataSource for CsvDataSourceAdapter
 
impl DataSource for CsvDataSourceAdapter
Source§fn query(&self, sql: &str) -> Result<DataSourceQueryResponse>
 
fn query(&self, sql: &str) -> Result<DataSourceQueryResponse>
Execute a SQL-like query against the data source
Source§fn query_with_options(
    &self,
    sql: &str,
    case_insensitive: bool,
) -> Result<DataSourceQueryResponse>
 
fn query_with_options( &self, sql: &str, case_insensitive: bool, ) -> Result<DataSourceQueryResponse>
Execute a query with case-insensitive matching
Source§fn get_schema(&self) -> Option<HashMap<String, Vec<String>>>
 
fn get_schema(&self) -> Option<HashMap<String, Vec<String>>>
Get the schema (table names and their columns)
Source§fn get_table_name(&self) -> String
 
fn get_table_name(&self) -> String
Get the primary table name
Source§fn get_row_count(&self) -> usize
 
fn get_row_count(&self) -> usize
Get total row count (unfiltered)
Source§fn is_case_insensitive(&self) -> bool
 
fn is_case_insensitive(&self) -> bool
Check if data source is case-insensitive
Source§fn set_case_insensitive(&mut self, case_insensitive: bool)
 
fn set_case_insensitive(&mut self, case_insensitive: bool)
Set case sensitivity
Source§fn clone_box(&self) -> Box<dyn DataSource>
 
fn clone_box(&self) -> Box<dyn DataSource>
Clone the data source into a boxed trait object
Auto Trait Implementations§
impl Freeze for CsvDataSourceAdapter
impl RefUnwindSafe for CsvDataSourceAdapter
impl Send for CsvDataSourceAdapter
impl Sync for CsvDataSourceAdapter
impl Unpin for CsvDataSourceAdapter
impl UnwindSafe for CsvDataSourceAdapter
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> 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