Neo4j 的 JRuby 封装 Cadet
Cadet 是使用 JRuby 实现的嵌入式 Neo4j,可以让你方便的在 JRuby 应用中使用 Neo4j。
示例代码:
require 'cadet'Cadet::Session.open "path/to/graph.db/" do#for a batch inserter session:#Cadet::BatchInserter::Session.open "path/to/graph.db/" do#bear in mind that, the database directory needs to be clean before establishing a BatchInserter session. transaction do Person_by_name("Javad").lives_in_to City_by_name("Chicago") endend