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
评论