Module: Neography::Rest::Cypher

Includes:
Helpers
Included in:
Neography::Rest
Defined in:
lib/neography/rest/cypher.rb

Instance Method Summary collapse

Methods included from Helpers

#encode, #escape, #get_id, #json_content_type, #parse_depth, #parse_direction, #parse_order, #parse_type, #parse_uniqueness

Instance Method Details

#execute_query(query, parameters = {}, cypher_options = nil) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/neography/rest/cypher.rb', line 6

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