Skip to main content

easy_sql/traits/
update.rs

1use easy_macros::always_context;
2
3use super::{Driver, DriverArguments};
4
5#[always_context]
6/// Update payload mapping for a table.
7///
8/// Prefer implementing this trait via the [`Update`](macro@crate::Update) derive macro; manual
9/// implementations may need updates across releases.
10pub trait Update<'a, Table, D: Driver>: Sized {
11    fn updates(
12        self,
13        args_list: DriverArguments<'a, D>,
14        current_query: &mut String,
15        parameter_n: &mut usize,
16    ) -> anyhow::Result<DriverArguments<'a, D>>;
17}