Method: InterMine::PathQuery::Query#initialize

Defined in:
lib/intermine/query.rb

#initialize(model, root = nil, service = nil) ⇒ Query

Construct a new query object. You should not use this directly. Instead use the factory methods in Service.

query = service.query("Gene")


284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
# File 'lib/intermine/query.rb', line 284

def initialize(model, root=nil, service=nil)
    @model = model
    @service = service
    @url = (@service.nil?) ? nil : @service.root + Service::QUERY_RESULTS_PATH
    @list_upload_uri = (@service.nil?) ? nil : @service.root + Service::QUERY_TO_LIST_PATH
    @list_append_uri = (@service.nil?) ? nil : @service.root + Service::QUERY_APPEND_PATH
    if root
        @root = InterMine::Metadata::Path.new(root, model).rootClass
    end
    @constraints = []
    @joins = []
    @views = []
    @sort_order = []
    @used_codes = []
    @logic_parser = LogicParser.new(self)
    @constraint_factory = ConstraintFactory.new(self)
end