pub struct LoadQuery {
pub provider: Option<String>,
pub params: HashMap<String, ValueWord>,
pub target_type: Option<String>,
pub column_mapping: Option<HashMap<String, String>>,
}Expand description
Generic data load request (industry-agnostic)
Supports arbitrary key-value parameters for maximum flexibility.
§Examples
Finance:
ⓘ
LoadQuery {
provider: Some("data"),
params: { "symbol": "ES", "from": "2023-01-01", "to": "2023-12-31" },
target_type: Some("Candle"),
}Weather:
ⓘ
LoadQuery {
provider: Some("weather_api"),
params: { "station": "LAX", "metric": "temperature", "interval": "hourly" },
target_type: Some("WeatherReading"),
}Fields§
§provider: Option<String>Provider name (e.g., “data”, “api”, “warehouse”) If None, uses default provider
params: HashMap<String, ValueWord>Generic parameters (arbitrary key-value)
target_type: Option<String>Target type name for validation (e.g., “Candle”, “TickData”) If specified, validates DataFrame has required columns
column_mapping: Option<HashMap<String, String>>Optional column mapping override Maps: target_field → source_column
Implementations§
Source§impl LoadQuery
impl LoadQuery
Sourcepub fn with_provider(self, name: &str) -> Self
pub fn with_provider(self, name: &str) -> Self
Set provider name
Sourcepub fn with_param(self, key: &str, value: ValueWord) -> Self
pub fn with_param(self, key: &str, value: ValueWord) -> Self
Add a parameter
Sourcepub fn with_column_mapping(self, mapping: HashMap<String, String>) -> Self
pub fn with_column_mapping(self, mapping: HashMap<String, String>) -> Self
Set column mapping
Sourcepub fn to_data_query(&self) -> Result<DataQuery>
pub fn to_data_query(&self) -> Result<DataQuery>
Convert to provider-specific DataQuery
Extracts common parameters and builds a DataQuery. Provider-specific logic for parameter interpretation.
§Errors
Returns error if required parameters are missing.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LoadQuery
impl RefUnwindSafe for LoadQuery
impl Send for LoadQuery
impl Sync for LoadQuery
impl Unpin for LoadQuery
impl UnsafeUnpin for LoadQuery
impl UnwindSafe for LoadQuery
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