Execute the query and return a +ResourceCollection+ of all hydrated resources
 +ResourceCollection+ is an +Enumerable+, Array-like object.

 @option options [ String ] return_graph Indicates whether to return the graph as one of the variables.
325858
def resources(opts={})
      Tripod::ResourceCollection.new(
        self.resource_class._resources_from_sparql(self.as_query(opts)),
         # pass in the criteria that was used to generate this collection, as well as whether the user specified return graph
        :return_graph => (opts.has_key?(:return_graph) ? opts[:return_graph] : true),
        :criteria => self
      )
    end
951782
public function getGraph($graph, array $options = [])
    {
        $url = UrlHelper::buildUrl(Urls::URL_GRAPH, [$graph]);

        try {
            $response = $this->getConnection()->get($url);
        } catch (Exception $e) {
            return false;
        }

        $data = $response->getJson();

        $options['_isNew'] = false;
        
        $result = Graph::createFromArray($data['graph'], $options);
        $result->set(Graph::ENTRY_KEY, $data['graph'][self::OPTION_NAME]);

        return $result;
    }
1153417
public function collection($resourceKey, array $data)
    {
        $this->normalised['data']['result'] = [];

        foreach ($data as $item) {
            $this->normalised['data']['result'][] = $item['id'];
        }

        return [$resourceKey => $data];
    }
62027
public function collection($resourceKey, array $data)
    {
        $resources = [];

        foreach ($data as $resource) {
            $resources[] = $this->item($resourceKey, $resource)['data'];
        }

        return ['data' => $resources];
    }
788192
def new_collection(query, resources = nil, &block)
      if loaded?
        resources ||= filter(query)
      end

      # TOOD: figure out a way to pass not-yet-saved Resources to this newly
      # created Collection.  If the new resource matches the conditions, then
      # it should be added to the collection (keep in mind limit/offset too)

      self.class.new(query, resources, &block)
    end
1318855
def _get_resources(self, args, params):
        
        resources = []
        disabled = []
        for resource in ['holoviews'] + list(Store.renderers.keys()):
            if resource in args:
                resources.append(resource)

            if resource in params:
                setting = params.pop(resource)
                if setting is True and resource != 'matplotlib':
                    if resource not in resources:
                        resources.append(resource)
                if setting is False:
                    disabled.append(resource)

        unmatched_args = set(args) - set(resources)
        if unmatched_args:
            display(HTML('<b>Warning:</b> Unrecognized resources %s'
                         % ', '.join(unmatched_args)))

        resources = [r for r in resources if r not in disabled]
        if ('holoviews' not in disabled) and ('holoviews' not in resources):
            resources = ['holoviews'] + resources
        return resources
817616
def get_params(self):
    

    if hasattr(self, 'params'):
      return list(self.params)

    # Catch eager execution and assert function overload.
    try:
      if tf.executing_eagerly():
        raise NotImplementedError("For Eager execution - get_params "
                                  "must be overridden.")
    except AttributeError:
      pass

    # For graph-based execution
    scope_vars = tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES,
                                   self.scope + "/")

    if len(scope_vars) == 0:
      self.make_params()
      scope_vars = tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES,
                                     self.scope + "/")
      assert len(scope_vars) > 0

    # Make sure no parameters have been added or removed
    if hasattr(self, "num_params"):
      if self.num_params != len(scope_vars):
        print("Scope: ", self.scope)
        print("Expected " + str(self.num_params) + " variables")
        print("Got " + str(len(scope_vars)))
        for var in scope_vars:
          print("\t" + str(var))
        assert False
    else:
      self.num_params = len(scope_vars)

    return scope_vars
1162524
private Result doGetResources(Request request) throws InvalidQueryException, ResourceNotFoundException {
        AtlasQuery atlasQuery = queryFactory.createTaxonomyQuery(request);
        return new Result(atlasQuery.execute());
    }
1136201
def each
      return to_enum unless block_given?
      super do |resource|
        begin
          original, resource.collection = resource.collection, self
          yield resource
        ensure
          resource.collection = original
        end
      end
    end
414267
def get_resource(url, resource_class, params={})
      resource_class.from_hash(get(url, params), client: self)
    end
614647
function resultRaw (results) {
    // throw error if results required and not retrieved
    if (this.args.required && !results.length) {
        // throw error
        throw this.error('no records found')
    }
    // if only ids were selected the return result object to fetch records
    if (this.select.isSelectOnlyIds) {
        // build result object
        var result = new ImmutableCoreModelResult({
            query: this,
            results: results,
        })
        // return result or all records if specified
        return this.args.all ? result.all() : result
    }
    // otherwise return ImmutableCoreModelInstance record(s)
    else {
        // query is for a single record
        if (this.args.limit === 1) {
            // return new instance or undefined
            return results.length
                ? this.newInstance(results[0])
                : undefined
        }
        // query is for multiple records
        else {
            return _.map(results, result => this.newInstance(result))
        }
    }
}
48778
def __query_with_builder(self, string, builder):
        
        action_graph_pairs = self.__get_action_graph_pairs_from_query(string)
        for action, graph_str in action_graph_pairs:
            if action == 'RETURN' or action == '':
                return self.__return(graph_str, builder)
            try:
                self.action_dict[action](graph_str, builder)
            except MatchException:
                break
        return {}
533728
function result () {
    // wait for all queries to complete then build result
    return this.promise.then(results => {
        // if the entire result set is a cached view then skip processing
        if (results._cachedView) {
            // result is from collection view
            if (this.modelViewEngine.hasCollection) {
                return results
            }
            // result is record(s)
            else {
                return this.resultRaw(results)
            }
        }
        // order results if needed
        if (results.length > 1) {
            results = this.orderResults(results)
        }
        // if there are model views then build result with ModelViewEngine
        // otherwise build result based on raw data
        return defined(this.modelViewEngine)
            ? this.resultModelView(results)
            : this.resultRaw(results)
    })
}
597911
def each
      return to_enum unless block_given?

      if auto_map?
        mapper.(dataset.map { |tuple| output_schema[tuple] }).each { |struct| yield(struct) }
      else
        dataset.each { |tuple| yield(output_schema[tuple]) }
      end
    end
928364
function multi() {
		var multi = get_client().then(function (client) {
			return client.multi();
		});

		return {
			query: query,
			exec: exec
		};

		function query(cypher_query, parameters) {
			return multi.then(function (multi) {
				return query_with(multi, cypher_query, parameters);
			});
		}

		function exec() {
			return multi.then(function (multi) {
				return make_promise(multi.exec.bind(multi));
			});
		}
	}
964016
def retrieve_resource(collection, key):
    
    session = _get_session()
    cls = endpoint_class(collection)
    resource = session.query(cls).get(key)
    if resource is None:
        raise InvalidAPIUsage(404)
    return resource
236121
public function getAll($collection, array $options = [])
    {
        /** @var AbstractHttpRequest $request */
        $request          = $this->getRequest();
        $request->options = $options;
        $request->path    = $this->client->fullDatabasePath . static::API_PATH;
        $request->path .= '?collection=' . $collection;
        $request->method = static::METHOD_GET;

        return $this->getReturnObject($request);
    }