pub struct PluginDataSource { /* private fields */ }Expand description
Wrapper around a plugin data source
Provides Rust-friendly access to plugin functionality including self-describing schema for LSP autocomplete and validation.
Implementations§
Source§impl PluginDataSource
impl PluginDataSource
Sourcepub fn new(
name: String,
vtable: &'static DataSourceVTable,
config: &Value,
) -> Result<Self>
pub fn new( name: String, vtable: &'static DataSourceVTable, config: &Value, ) -> Result<Self>
Create a new plugin data source instance
§Arguments
name- Plugin namevtable- Data source vtable (must be static)config- Configuration value (will be MessagePack encoded)
Sourcepub fn get_query_schema(&self) -> &ParsedQuerySchema
pub fn get_query_schema(&self) -> &ParsedQuerySchema
Get the query schema for LSP autocomplete and validation
Sourcepub fn get_output_schema(&self) -> &ParsedOutputSchema
pub fn get_output_schema(&self) -> &ParsedOutputSchema
Get the output schema for LSP autocomplete
Sourcepub fn validate_query(&self, query: &Value) -> Result<()>
pub fn validate_query(&self, query: &Value) -> Result<()>
Validate a query before execution
Sourcepub fn unsubscribe(&self, subscription_id: u64) -> Result<()>
pub fn unsubscribe(&self, subscription_id: u64) -> Result<()>
Unsubscribe from streaming data
Sourcepub fn get_source_schema(&self, source_id: &str) -> Result<PluginSchema>
pub fn get_source_schema(&self, source_id: &str) -> Result<PluginSchema>
Sourcepub fn supports_schema_discovery(&self) -> bool
pub fn supports_schema_discovery(&self) -> bool
Check if this plugin supports schema discovery
Sourcepub fn supports_binary(&self) -> bool
pub fn supports_binary(&self) -> bool
Check if this plugin supports binary loading (ABI v2)
Sourcepub fn load_binary(
&self,
query: &Value,
granularity: ProgressGranularity,
progress_handle: Option<&ProgressHandle>,
) -> Result<ValueWord>
pub fn load_binary( &self, query: &Value, granularity: ProgressGranularity, progress_handle: Option<&ProgressHandle>, ) -> Result<ValueWord>
Load historical data in binary columnar format (ABI v2)
Trait Implementations§
Source§impl Drop for PluginDataSource
impl Drop for PluginDataSource
impl Send for PluginDataSource
impl Sync for PluginDataSource
Auto Trait Implementations§
impl Freeze for PluginDataSource
impl RefUnwindSafe for PluginDataSource
impl Unpin for PluginDataSource
impl UnsafeUnpin for PluginDataSource
impl UnwindSafe for PluginDataSource
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