ComputerScienceHouse / csh-eval

REPL for PEOPLE
MIT License
7 stars 5 forks source link

To Delete or Not To Delete #122

Open TravisWhitaker opened 8 years ago

TravisWhitaker commented 8 years ago

There are two strategies when dealing with deletion. We could actually remove rows from the database when deletes are requested, or we could have an "is_deleted" flag to guard against human stupidity. I'm personally leaning towards "is_deleted," but some people object to this, as it's something you have to remember to take into account in each and every query.

Thoughts?

gambogi commented 8 years ago

I'm in favor of an is_deleted attribute. Especially if we can come up with a way to automatically include that constraint when we're writing queries. If not, human discipline is a poor but acceptable substitute.

TravisWhitaker commented 8 years ago

Hasql (reasonably) doesn't include support for Postgres' query templating, so short of using TH I don't think there's a way to automatically rewrite queries to include the "is_deleted" flag. しかたがない。

gambogi commented 8 years ago

Tragic.