pub trait HasUpserts {
// Required method
fn upserts_mut(&mut self) -> &mut Vec<ConflictClause>;
}Expand description
An INSERT’s upsert-clause list.
SQLite 3.35 and later accept several, tried in order:
INSERT … ON CONFLICT (a) DO UPDATE SET … ON CONFLICT DO NOTHINGwith the rule that only the last may omit its conflict target. PostgreSQL has
exactly one ON CONFLICT, which is why
Conflict is a single slot and this is a list
instead. The clause itself is core’s
ConflictClause — SQLite’s
ON CONFLICT (cols) [WHERE …] DO { NOTHING | UPDATE SET … [WHERE …] } is that
shape exactly, minus the ON CONSTRAINT target, for which no mod is exported.
Required Methods§
Sourcefn upserts_mut(&mut self) -> &mut Vec<ConflictClause>
fn upserts_mut(&mut self) -> &mut Vec<ConflictClause>
The upsert clauses to modify.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".