On Feb 5, 5:25 pm, go94022 <[email protected]> wrote: > Searched here and did not find anything on this. Maybe it's easy but > not clear to me. > > Want to add an optimistic lock check when doing a model update. > Realize this could be done in before_update, but that would be a > separate query from the actual update. > > That is, just want to 'model.save', but under the hood it does a > 'UPDATE ..., lock_id = lock_id + 1 WHERE lock_id = <original_lock_id>'
Sequel does not currently support this by default or with a built in plugin. It sounds like a good idea for a plugin, and one I would consider as having as one of the builtin plugins. I've added it to my todo list, but it may be a while before I work on it. Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en.
