Skip to main content

HasDuplicateKeyUpdate

Trait HasDuplicateKeyUpdate 

Source
pub trait HasDuplicateKeyUpdate {
    // Required method
    fn duplicate_key_update_mut(&mut self) -> &mut Set;
}
Expand description

A statement with an ON DUPLICATE KEY UPDATE assignment list.

A separate trait from HasSet because an INSERT has two assignment lists — the INSERT … SET row source and this one — and a mod has to be able to say which it means. HasSet is the row source; the body of on_duplicate_key_update is a bare Set, which implements HasSet reflexively, so the same set/set_col mods serve both.

Required Methods§

Source

fn duplicate_key_update_mut(&mut self) -> &mut Set

The ON DUPLICATE KEY UPDATE assignments.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§