pub trait TreeInsert {
// Required methods
fn columns<'a, I>(descendents: I) -> Result<SqlExpr, ToqlError>
where I: Iterator<Item = FieldPath<'a>>;
fn values<'a, 'b, I, J>(
&self,
descendents: I,
roles: &HashSet<String>,
should_insert: &mut J,
values: &mut SqlExpr,
) -> Result<(), ToqlError>
where I: Iterator<Item = FieldPath<'a>> + Clone,
J: Iterator<Item = &'b bool>;
}Expand description
The trait allows to build the INSERT SQL statement for nested structs.
Required Methods§
Sourcefn columns<'a, I>(descendents: I) -> Result<SqlExpr, ToqlError>
fn columns<'a, I>(descendents: I) -> Result<SqlExpr, ToqlError>
Return columns of struct located at descendents.
Sourcefn values<'a, 'b, I, J>(
&self,
descendents: I,
roles: &HashSet<String>,
should_insert: &mut J,
values: &mut SqlExpr,
) -> Result<(), ToqlError>
fn values<'a, 'b, I, J>( &self, descendents: I, roles: &HashSet<String>, should_insert: &mut J, values: &mut SqlExpr, ) -> Result<(), ToqlError>
Return values of structs located at descendents.
The should_insert argument allows the method to only insert a part of the collection.
This is needed to deal with newly added merges.
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.