use of org.neo4j.kernel.internal.EmbeddedGraphDatabase in project neo4j by neo4j.
the class ProduceUncleanStore method main.
public static void main(String[] args) throws Exception {
String storeDir = args[0];
boolean setGraphProperty = args.length > 1 ? Boolean.parseBoolean(args[1]) : false;
GraphDatabaseService db = new EmbeddedGraphDatabase(storeDir, stringMap(), GraphDatabaseDependencies.newDependencies().userLogProvider(NullLogProvider.getInstance()));
try (Transaction tx = db.beginTx()) {
Node node = db.createNode();
node.setProperty("name", "Something");
if (setGraphProperty) {
//noinspection deprecation
((GraphDatabaseAPI) db).getDependencyResolver().resolveDependency(NodeManager.class).newGraphProperties().setProperty("prop", "Some value");
}
tx.success();
}
System.exit(0);
}
Aggregations