On Wed, Aug 11, 2021 at 6:39 AM Paul <[email protected]> wrote:

> Thank you Jeremy.  Searching through this group I also found this answer
> you gave to another person with same problem, and it worked:
>
> def DB1.dataset
>   super.nolock
> end
> DB1.extend_datasets do
>   def join_clause_sql_append(sql, jc)
>     super
>     sql << " WITH (NOLOCK)" unless jc.table.is_a?(Sequel::Dataset)
>   end
> end
> DB1.send(:reset_default_dataset)
>

That will work, but be aware it sets NOLOCK for all queries, not just the
specific query you want to use it in.

Thanks,
Jeremy

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/CADGZSSf16YraC3QnTMhEvA46rLuC5TpS%3D2ocf-aDqvorf2jq%2BQ%40mail.gmail.com.

Reply via email to