Class: Neography::Rest::Cypher
- Inherits:
-
Object
- Object
- Neography::Rest::Cypher
- Includes:
- Helpers
- Defined in:
- lib/neography/rest/cypher.rb
Instance Method Summary collapse
-
#initialize(connection) ⇒ Cypher
constructor
A new instance of Cypher.
- #query(query, parameters = {}) ⇒ Object
Methods included from Helpers
Constructor Details
#initialize(connection) ⇒ Cypher
Returns a new instance of Cypher.
6 7 8 |
# File 'lib/neography/rest/cypher.rb', line 6 def initialize(connection) @connection = connection end |
Instance Method Details
#query(query, parameters = {}) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/neography/rest/cypher.rb', line 10 def query(query, parameters = {}) = { :body => { :query => query, :params => parameters }.to_json, :headers => json_content_type.merge({'Accept' => 'application/json;stream=true'}) } @connection.post(@connection.cypher_path, ) end |