-
Notifications
You must be signed in to change notification settings - Fork 78
Neon
Ujjwal Thaakar edited this page Dec 28, 2013
·
11 revisions
Neon is fast, minimal ruby binding for the neo4j-core api. It provides a simple api to manipulate a Neo4J database instance hosted on a server or running as an embedded instance.
You start a session with a Neo4J database by creating a session. You can create a session with a REST server or an Embedded instance as follows :-
# REST session
session = Session::Rest.new(url, options)
url
defaults to http://localhost:7474
options
defaults to {} and takes the following keys :-
options = {
directory: '', # Prefix the url with this directory
cypher: '/cypher', # Cypher path for the server
gremlin: '/ext/GremlinPlugin/graphdb/execute_script', # Gremlin path for the server
log: false, # Log activity or not
log_path: 'neography.log', # File name used for the log if :log is true
threads: 20, # Maximum number of threads to use
authentication: nil, # 'basic' or 'digest'
username: nil,
password: nil,
parser: MultiJsonParser
}
You can also quickly initialize
# Embedded session
session = Session::Embedded.new(path_to_db, auto_tx)
path_to_db
is the path to the embedded database instance.
auto_tx
is an optional boolean parameter that is true by default.
WARNING: Much of the information in this wiki is out of day. We are in the process of moving things to readthedocs