Class: Dbd::Repo::Neo4jRepo::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/dbd/repo/neo4j_repo/base.rb

Overview

To allow some tests on the Neo4j Neography gem.

Instance Method Summary collapse

Constructor Details

#initializeBase

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_rootObject



44
45
46
# File 'lib/dbd/repo/neo4j_repo/base.rb', line 44

def get_root
  @neo.get_root
end

#list_node_indexesObject



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