#111 ✓resolved
Andreas Ronge


Reported by Andreas Ronge | February 17th, 2010 @ 07:19 PM | in 0.4.1

Should wrap the neo4j batch inserter in a nice API: http://wiki.neo4j.org/content/Batch_Insert

    Neo4j::BatchInserter.new do |b|
      a = Neo4j::Node.new :name => 'a'
      b = Neo4j::Node.new :name => 'b'
      c = Foo.new :key1 => 'val1', :key2 => 'val2'
      Neo4j::Relationship.new(:friend, a, b, :since => '2001-01-01')

Creations of nodes and relationships inside the block will use the batch inserter API instead.
Yielded parameter b is the raw Java BatchInserter object, which you can use to get better performance
(using Neo4j::Node.new will cost a little bit in performance).

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Neo4j.rb is a graph database framework for JRuby.

It provides:

* Mapping of ruby objects to nodes in networks rather than in tables.
* Storage of ruby object to a file system.
* Fast traversal of relationships between nodes in a hugh node space.
* Transaction with rollbacks support.
* Indexing and quering of ruby objects.
* Integration with Rails

People watching this ticket

Referenced by