Created
September 20, 2016 22:27
-
-
Save Leward/59718ff5fd844a042e363610b6233cc9 to your computer and use it in GitHub Desktop.
Graphaware Timetree Embedded Neo4j Database
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2016-09-20 22:25:59.916+0000 INFO [c.g.r.b.RuntimeKernelExtension] GraphAware Runtime enabled, bootstrapping... | |
2016-09-20 22:25:59.956+0000 INFO [c.g.r.b.RuntimeKernelExtension] Bootstrapping module with order 1, ID timetree, using com.graphaware.module.timetree.module.TimeTreeModuleBootstrapper | |
2016-09-20 22:26:00.080+0000 INFO [c.g.r.b.RuntimeKernelExtension] GraphAware Runtime bootstrapped, starting the Runtime... | |
2016-09-20 22:26:00.500+0000 INFO [c.g.r.b.RuntimeKernelExtension] GraphAware Runtime automatically started. | |
[name:db.constraints, signature:db.constraints() :: (description :: STRING?)] | |
[name:db.indexes, signature:db.indexes() :: (description :: STRING?, state :: STRING?, type :: STRING?)] | |
[name:db.labels, signature:db.labels() :: (label :: STRING?)] | |
[name:db.propertyKeys, signature:db.propertyKeys() :: (propertyKey :: STRING?)] | |
[name:db.relationshipTypes, signature:db.relationshipTypes() :: (relationshipType :: STRING?)] | |
[name:dbms.changePassword, signature:dbms.changePassword(password :: STRING?) :: ()] | |
[name:dbms.components, signature:dbms.components() :: (name :: STRING?, versions :: LIST? OF STRING?, edition :: STRING?)] | |
[name:dbms.procedures, signature:dbms.procedures() :: (name :: STRING?, signature :: STRING?)] | |
[name:dbms.queryJmx, signature:dbms.queryJmx(query :: STRING?) :: (name :: STRING?, description :: STRING?, attributes :: MAP?)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Init In-Memory graph database | |
GraphDatabaseSettings.BoltConnector bolt = GraphDatabaseSettings.boltConnector("0"); | |
tempNeo4jPath = Files.createTempDirectory('zenapp_testdb_') | |
GraphDatabaseSettings.plugin_dir | |
graphDatabaseService = new GraphDatabaseFactory() | |
.newEmbeddedDatabaseBuilder(tempNeo4jPath.toFile()) | |
.setConfig(bolt.enabled, "true") | |
.setConfig(bolt.address, "localhost:8487") | |
.setConfig(bolt.encryption_level, GraphDatabaseSettings.BoltConnector.EncryptionLevel.DISABLED.toString()) | |
.setConfig(RuntimeKernelExtension.RUNTIME_ENABLED, "true") | |
.setConfig("com.graphaware.module.timetree.1", TimeTreeModuleBootstrapper.class.name) | |
.newGraphDatabase(); | |
// Init system under test | |
Config config = Config | |
.build() | |
.withEncryptionLevel(Config.EncryptionLevel.NONE) | |
.toConfig(); | |
Driver driver = GraphDatabase.driver('bolt://localhost:8487', config) | |
missionRepository = new MissionRepository(neo4jSession: driver.session()) | |
def session = driver.session() | |
session.run("CALL dbms.procedures() YIELD name, signature RETURN name, signature").list().forEach { | |
println it.asMap() | |
} | |
session.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just add this after line 13