pub trait IntoSelect<'columns, 'transaction, S>: Sized {
type Out: 'transaction;
// Required method
fn into_select(self) -> Select<'columns, 'transaction, S, Self::Out>;
}
Expand description
This trait is implemented by everything that can be retrieved from the database.
The most common type that implements IntoSelect is Expr. Tuples of two values also implement IntoSelect. If you want to return more than two values, then you should use a struct that derives rust_query::Select.
Required Associated Types§
Required Methods§
Sourcefn into_select(self) -> Select<'columns, 'transaction, S, Self::Out>
fn into_select(self) -> Select<'columns, 'transaction, S, Self::Out>
This method is what tells rust-query how to turn the value into a Select.
The only way to implement this method is by constructing a different value that implements IntoSelect and then calling the IntoSelect::into_select method on that other value. The result can then be modified with Select::map.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.