Sha256: a98053561a20ab4158db2349c6f17b20a3c88ca8a98f7442abe0967cf80f39cf
Contents?: true
Size: 716 Bytes
Versions: 34
Compression:
Stored size: 716 Bytes
Contents
require "rubygems" require "bundler/setup" require 'fileutils' require 'neo4j' #FileUtils.rm_rf Neo4j::Config[:storage_path] class FooNode < Neo4j::Model property :user_id index :user_id has_n(:contacts) def to_s "FooNode #{user_id}" end end node1 = FooNode.create(:user_id => 1) for x in 1..5 do for node_id in 2..2700 # node = FooNode.create(:user_id => node_id) # node.contacts << node1 # node.save! found = FooNode.find_by_user_id(node_id) puts "Found #{found}" # Neo4j::Transaction.run do # found.del # end Neo4j::Rails::Model.close_lucene_connections # puts "node_id=#{node_id} #{node.contacts.include?(node1)}" #if (node_id % 50) == 2 end end puts "FINISHED" Neo4j.shutdown
Version data entries
34 entries across 34 versions & 1 rubygems