Class: Dbd::Repo::Neo4jRepo::Base
- Inherits:
-
Object
- Object
- Dbd::Repo::Neo4jRepo::Base
- Defined in:
- lib/dbd/repo/neo4j_repo/base.rb
Overview
To allow some tests on the Neo4j Neography gem.
Instance Method Summary collapse
- #add_node_to_index(index, key, value, node) ⇒ Object
- #batch(*args) ⇒ Object
- #create_node(hash) ⇒ Object
- #create_node_index(name, type, provider) ⇒ Object
- #create_relationship(p, s, o) ⇒ Object
- #execute_query(query_string) ⇒ Object
- #get_node_index(index, key, value) ⇒ Object
- #get_root ⇒ Object
-
#initialize ⇒ Base
constructor
A new instance of Base.
- #list_node_indexes ⇒ Object
- #load_node(uri) ⇒ Object
Constructor Details
#initialize ⇒ Base
Returns a new instance of Base.
8 9 10 |
# File 'lib/dbd/repo/neo4j_repo/base.rb', line 8 def initialize @neo = Neography::Rest.new end |
Instance Method Details
#add_node_to_index(index, key, value, node) ⇒ Object
32 33 34 |
# File 'lib/dbd/repo/neo4j_repo/base.rb', line 32 def add_node_to_index(index, key, value, node) @neo.add_node_to_index(index, key, value, node) end |
#batch(*args) ⇒ Object
16 17 18 |
# File 'lib/dbd/repo/neo4j_repo/base.rb', line 16 def batch(*args) @neo.batch(*args) end |
#create_node(hash) ⇒ Object
12 13 14 |
# File 'lib/dbd/repo/neo4j_repo/base.rb', line 12 def create_node(hash) @neo.create_node(hash) end |
#create_node_index(name, type, provider) ⇒ Object
28 29 30 |
# File 'lib/dbd/repo/neo4j_repo/base.rb', line 28 def create_node_index(name, type, provider) @neo.create_node_index(name, type, provider) end |
#create_relationship(p, s, o) ⇒ Object
20 21 22 |
# File 'lib/dbd/repo/neo4j_repo/base.rb', line 20 def create_relationship(p, s, o) @neo.create_relationship(p, s, o) end |
#execute_query(query_string) ⇒ Object
40 41 42 |
# File 'lib/dbd/repo/neo4j_repo/base.rb', line 40 def execute_query(query_string) @neo.execute_query(query_string) end |
#get_node_index(index, key, value) ⇒ Object
36 37 38 |
# File 'lib/dbd/repo/neo4j_repo/base.rb', line 36 def get_node_index(index, key, value) @neo.get_node_index(index, key, value) end |
#get_root ⇒ Object
44 45 46 |
# File 'lib/dbd/repo/neo4j_repo/base.rb', line 44 def get_root @neo.get_root end |
#list_node_indexes ⇒ Object
24 25 26 |
# File 'lib/dbd/repo/neo4j_repo/base.rb', line 24 def list_node_indexes @neo.list_node_indexes end |
#load_node(uri) ⇒ Object
48 49 50 |
# File 'lib/dbd/repo/neo4j_repo/base.rb', line 48 def load_node(uri) Neography::Node.load(uri) end |