News for hackers. Stuff that matters.
Re:A Critique of SQL, 40 Years Later by jon_richards on Wednesday August 24, 2022 @03:00PM (#32584135)
> 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.

There are no comments on this comment yet.