Class: Arel::Lock
- Defined in:
- lib/arel/algebra/relations/operations/lock.rb
Instance Attribute Summary
Attributes inherited from Compound
Attributes included from Relation
Instance Method Summary collapse
-
#initialize(relation, locked, &block) ⇒ Lock
constructor
A new instance of Lock.
Methods inherited from Compound
#attributes, #build_query, #engine, #eql?, #hash, requires, #unoperated_rows
Methods included from Relation
#bind, #call, #christener, #compiler, #exclusion_predicate_sql, #externalizable?, #externalize, #inclusion_predicate_sql, #join?, #primary_key, #session, #to_sql
Methods included from Relation::DefaultOperations
#attributes, #groupings, #havings, #inserts, #joins, #locked, #orders, #projections, #skipped, #sources, #taken, #wheres
Methods included from Relation::AttributeAccessable
#[], #find_attribute_matching_attribute, #find_attribute_matching_name, #position_of
Methods included from Relation::Operable
#alias, #join, #lock, #outer_join
Methods included from Relation::Operable::Writable
Methods included from Relation::Enumerable
Constructor Details
#initialize(relation, locked, &block) ⇒ Lock
Returns a new instance of Lock.
6 7 8 9 |
# File 'lib/arel/algebra/relations/operations/lock.rb', line 6 def initialize(relation, locked, &block) @relation = relation @locked = locked.blank? ? " FOR UPDATE" : locked end |