pub struct PluginVirtualTable { /* private fields */ }Expand description
Virtual table backed by a WASM plugin
Implementations§
Source§impl PluginVirtualTable
impl PluginVirtualTable
Sourcepub fn new(
plugin_name: &str,
table_name: &str,
schema: VirtualTableSchema,
) -> Self
pub fn new( plugin_name: &str, table_name: &str, schema: VirtualTableSchema, ) -> Self
Create a new plugin-backed virtual table
Sourcepub fn with_cache_ttl(self, secs: u64) -> Self
pub fn with_cache_ttl(self, secs: u64) -> Self
Set cache TTL
Sourcepub fn qualified_name(&self) -> String
pub fn qualified_name(&self) -> String
Get the fully qualified table name
Trait Implementations§
Source§impl VirtualTable for PluginVirtualTable
impl VirtualTable for PluginVirtualTable
Source§fn schema(&self) -> &VirtualTableSchema
fn schema(&self) -> &VirtualTableSchema
Get table schema
Source§fn scan(
&self,
columns: &[String],
filter: Option<&VirtualFilter>,
limit: Option<usize>,
offset: Option<usize>,
) -> Result<Vec<VirtualRow>, VirtualTableError>
fn scan( &self, columns: &[String], filter: Option<&VirtualFilter>, limit: Option<usize>, offset: Option<usize>, ) -> Result<Vec<VirtualRow>, VirtualTableError>
Scan with optional filter
Source§fn get(&self, key: &SochValue) -> Result<Option<VirtualRow>, VirtualTableError>
fn get(&self, key: &SochValue) -> Result<Option<VirtualRow>, VirtualTableError>
Point lookup by primary key
Source§fn stats(&self) -> VirtualTableStats
fn stats(&self) -> VirtualTableStats
Get statistics for query planning
Auto Trait Implementations§
impl !Freeze for PluginVirtualTable
impl !RefUnwindSafe for PluginVirtualTable
impl Send for PluginVirtualTable
impl Sync for PluginVirtualTable
impl Unpin for PluginVirtualTable
impl UnsafeUnpin for PluginVirtualTable
impl UnwindSafe for PluginVirtualTable
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