Hello,

Active Record has `ActiveRecord::Base#lock!` method just like Sequel, and 
additionally it has `ActiveRecord::Base#with_lock`, which wraps the 
`#lock!` in a transaction:

  model.with_lock do
    # ...
  end

  # which translates to

  model.transaction do
    model.lock!
    # ...
  end

rom-sql has a similar convenience method as well. I was thinking that it 
could be useful to add the same kind of method to Sequel, since it's a 
common pattern. What do you think?

Kind regards,
Janko

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/0bba88b3-559e-47ed-9ded-6a5a641f2559%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to