Class: Gouda::OnlyQueuesConstraint
- Inherits:
-
Struct
- Object
- Struct
- Gouda::OnlyQueuesConstraint
- Defined in:
- lib/gouda/queue_constraints.rb
Instance Attribute Summary collapse
-
#queue_names ⇒ Object
Returns the value of attribute queue_names.
Instance Method Summary collapse
Instance Attribute Details
#queue_names ⇒ Object
Returns the value of attribute queue_names
10 11 12 |
# File 'lib/gouda/queue_constraints.rb', line 10 def queue_names @queue_names end |
Instance Method Details
#to_sql ⇒ Object
11 12 13 14 15 16 |
# File 'lib/gouda/queue_constraints.rb', line 11 def to_sql placeholders = (["?"] * queue_names.length).join(",") ActiveRecord::Base.sanitize_sql_array([<<~SQL, *queue_names]) queue_name IN (#{placeholders}) SQL end |