Use case here is pretty common, let's say you've got a comment:
type Comment = ref object of Model
text: string
user: string
I'd like to be able to do something like
dbConn.update(comment, "user = ?", signedInUser)
It makes it much easier to ensure that updates are only happening to an item that a user owns/created. Right now I'm doing the checking manually, which results in additional select queries. Something similar already exists for count and sum, as they take additional conditions.
Use case here is pretty common, let's say you've got a comment:
I'd like to be able to do something like
It makes it much easier to ensure that updates are only happening to an item that a user owns/created. Right now I'm doing the checking manually, which results in additional select queries. Something similar already exists for count and sum, as they take additional conditions.