pub trait TableGenerator: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn columns(&self) -> Vec<DataColumn>;
fn generate(&self, args: Vec<DataValue>) -> Result<Arc<DataTable>>;
fn description(&self) -> &str;
fn arg_count(&self) -> usize;
}
Expand description
Trait for table-generating functions that produce rows dynamically
Required Methods§
Sourcefn columns(&self) -> Vec<DataColumn>
fn columns(&self) -> Vec<DataColumn>
Get the column definitions for the generated table
Sourcefn generate(&self, args: Vec<DataValue>) -> Result<Arc<DataTable>>
fn generate(&self, args: Vec<DataValue>) -> Result<Arc<DataTable>>
Generate the table based on the provided arguments Arguments are evaluated expressions from the SQL query
Sourcefn description(&self) -> &str
fn description(&self) -> &str
Get a description of what this generator does