Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def init():
global neo, transaction
neo = NeoService(NEO_DB, jvm = defaultJVM())
transaction = neo.transaction
def open(dbpath):
global dirname, graph, transaction
if dirname:
raise RuntimeError("A Neo4j database is already open. Please close it before opening a new one.")
dirname = dbpath
graph = NeoService(dbpath, jvm = defaultJVM())
transaction = graph.transaction
def initAnalyze (self):
## create Neo4j DB + index to store analyzed metadata
self.graphdb = neo4j.NeoService(conf_param["analyze_db_uri"])
self.uuid_index = self.graphdb.index("uuid.idx", create=True)
self.path_index = self.graphdb.index("path.idx", create=True)