pub trait SelectableDataSource<T = Value, C = Expression<T>>: DataSource {
type Select: Selectable<T, C>;
// Required methods
fn select(&self) -> Self::Select;
fn execute_select(
&self,
select: &Self::Select,
) -> impl Future<Output = Result<Vec<T>>> + Send;
// Provided method
fn add_select_column(
&self,
select: &mut Self::Select,
expression: Expression<T>,
alias: Option<&str>,
)
where T: Clone { ... }
}Expand description
Datasource that support creation and execution of select queries
Required Associated Types§
type Select: Selectable<T, C>
Required Methods§
fn select(&self) -> Self::Select
fn execute_select( &self, select: &Self::Select, ) -> impl Future<Output = Result<Vec<T>>> + Send
Provided Methods§
Sourcefn add_select_column(
&self,
select: &mut Self::Select,
expression: Expression<T>,
alias: Option<&str>,
)where
T: Clone,
fn add_select_column(
&self,
select: &mut Self::Select,
expression: Expression<T>,
alias: Option<&str>,
)where
T: Clone,
Add a column expression to a select query with optional alias. Backends must override this if they support aliases.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".