Method: InterMine::PathQuery::Query#add_constraint
- Defined in:
- lib/intermine/query.rb
#add_constraint(*parameters) ⇒ Object
Add a constraint to the query matching the given parameters, and return the created constraint.
con = query.add_constraint("length", ">", 500)
Note that (at least for now) the style of argument used by where and add_constraint is not compatible. This is on the TODO list.
757 758 759 760 761 |
# File 'lib/intermine/query.rb', line 757 def add_constraint(*parameters) con = @constraint_factory.make_constraint(parameters) @constraints << con return con end |