Module | DataMapper::Model::Scope |
In: |
lib/dm-core/model/scope.rb
|
Module with query scoping functionality.
Scopes are implemented using simple array based stack that is thread local. Default scope can be set on a per repository basis.
Scopes are merged as new queries are nested. It is also possible to get exclusive scope access using with_exclusive_scope
Pushes given query on top of scope stack and yields given block, then pops the stack. During block execution queries previously pushed onto the stack have no effect.
@api private