sofie-db 0.4.0

The handler model (inputs, events, replies), aggregates, read models, the query builder, the unit of work, migrations, the worker and the database seam.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::Write;

impl Write<'_> {
    /// Every one for an insert.
    #[must_use]
    pub fn changed_fields(&self) -> Vec<&str> {
        let columns = self.table.columns.iter().zip(self.fields);
        columns
            .filter(|(column, value)| {
                !self
                    .loaded(column)
                    .is_some_and(|loaded| crate::sql::same_value(loaded, value))
            })
            .map(|(column, _)| column.as_str())
            .collect()
    }
}