Sha256: 09c7f7560d7a962f2922c8ad9404dda3286f9851209669a353ff0ed77787f74d
Contents?: true
Size: 846 Bytes
Versions: 13
Compression:
Stored size: 846 Bytes
Contents
module Neography class Rest module Cypher include Neography::Rest::Helpers def execute_query(query, parameters = {}, cypher_options = nil) options = { :body => { :query => query, :params => parameters }.to_json, :headers => json_content_type.merge({'Accept' => 'application/json;stream=true;charset=UTF-8'}) } @connection.post(optioned_path(cypher_options), options) end private def optioned_path(cypher_options = nil) return @connection.cypher_path unless cypher_options options = [] options << "includeStats=true" if cypher_options[:stats] options << "profile=true" if cypher_options[:profile] @connection.cypher_path + "?" + options.join("&") end end end end
Version data entries
13 entries across 13 versions & 3 rubygems