Class: Gouda::ExceptQueueConstraint
- Inherits:
-
Struct
- Object
- Struct
- Gouda::ExceptQueueConstraint
- 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
19 20 21 |
# File 'lib/gouda/queue_constraints.rb', line 19 def queue_names @queue_names end |
Instance Method Details
#to_sql ⇒ Object
20 21 22 23 24 25 |
# File 'lib/gouda/queue_constraints.rb', line 20 def to_sql placeholders = (["?"] * queue_names.length).join(",") ActiveRecord::Base.sanitize_sql_array([<<~SQL, *queue_names]) queue_name NOT IN (#{placeholders}) SQL end |