2 ms·
> you need the 'time_finished' column to either have a valid date, or it's NULL if the activity hasn't finished yet Rust’s Diesel has an interesting way of dea
by jon_richards 4y ago
> you need the 'time_finished' column to either have a valid date, or it's NULL if the activity hasn't finished yet
Rust’s Diesel has an interesting way of dealing with this. “None” means missing while “Some(None)” means the value null. So when updating a record, “None” makes no change while “Some(None)” sets the value to null.
This distinction is obviously lost when retrieving from the database, but it’s an interesting concept.