neo4j 1.2.6-java → 2.0.0.alpha.3-java
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +30 -0
- data/CONTRIBUTORS +1 -0
- data/Gemfile +16 -4
- data/README.rdoc +25 -3
- data/bin/neo4j-jars +15 -8
- data/bin/neo4j-shell +0 -1
- data/bin/neo4j-upgrade +72 -0
- data/config/neo4j/config.yml +5 -4
- data/lib/neo4j/algo/algo.rb +0 -1
- data/lib/neo4j/batch/inserter.rb +5 -0
- data/lib/neo4j/database.rb +18 -12
- data/lib/neo4j/event_handler.rb +76 -9
- data/lib/neo4j/has_list/class_methods.rb +1 -1
- data/lib/neo4j/has_list/mapping.rb +13 -33
- data/lib/neo4j/has_n/decl_relationship_dsl.rb +17 -13
- data/lib/neo4j/has_n/mapping.rb +6 -23
- data/lib/neo4j/identity_map.rb +0 -3
- data/lib/neo4j/index/class_methods.rb +9 -3
- data/lib/neo4j/index/index.rb +2 -1
- data/lib/neo4j/index/indexer.rb +3 -2
- data/lib/neo4j/index/indexer_registry.rb +1 -1
- data/lib/neo4j/index/lucene_query.rb +52 -33
- data/lib/neo4j/neo4j.rb +19 -0
- data/lib/neo4j/node.rb +42 -36
- data/lib/neo4j/node_mixin/node_mixin.rb +9 -5
- data/lib/neo4j/paginated.rb +23 -0
- data/lib/neo4j/rails/accept_id.rb +66 -0
- data/lib/neo4j/rails/attributes.rb +14 -9
- data/lib/neo4j/rails/compositions.rb +9 -1
- data/lib/neo4j/rails/finders.rb +5 -1
- data/lib/neo4j/rails/mapping/property.rb +41 -28
- data/lib/neo4j/rails/model.rb +2 -0
- data/lib/neo4j/rails/observer.rb +61 -2
- data/lib/neo4j/rails/persistence.rb +57 -57
- data/lib/neo4j/rails/rails.rb +1 -0
- data/lib/neo4j/rails/railtie.rb +4 -1
- data/lib/neo4j/rails/rel_persistence.rb +11 -12
- data/lib/neo4j/rails/relationship.rb +9 -4
- data/lib/neo4j/rails/relationships/node_dsl.rb +15 -5
- data/lib/neo4j/rails/relationships/relationships.rb +42 -2
- data/lib/neo4j/rails/relationships/rels_dsl.rb +60 -3
- data/lib/neo4j/rails/relationships/storage.rb +43 -5
- data/lib/neo4j/rails/validations/uniqueness.rb +1 -0
- data/lib/neo4j/rails/versioning/versioning.rb +64 -9
- data/lib/neo4j/relationship.rb +79 -73
- data/lib/neo4j/rule/event_listener.rb +7 -1
- data/lib/neo4j/rule/functions/count.rb +6 -0
- data/lib/neo4j/rule/rule.rb +20 -5
- data/lib/neo4j/rule/rule_node.rb +33 -20
- data/lib/neo4j/to_java.rb +5 -0
- data/lib/neo4j/traversal/traverser.rb +38 -1
- data/lib/neo4j/type_converters/type_converters.rb +56 -5
- data/lib/neo4j/version.rb +1 -1
- data/lib/neo4j.rb +3 -49
- data/neo4j.gemspec +2 -2
- metadata +191 -216
- data/bin/neo4j-shell~ +0 -108
- data/lib/Gemfile~ +0 -3
- data/lib/config2.yml~ +0 -86
- data/lib/neo4j/jars/core/geronimo-jta_1.1_spec-1.1.1.jar +0 -0
- data/lib/neo4j/jars/core/lucene-core-3.1.0.jar +0 -0
- data/lib/neo4j/jars/core/neo4j-backup-1.4.1.jar +0 -0
- data/lib/neo4j/jars/core/neo4j-graph-algo-1.4.1.jar +0 -0
- data/lib/neo4j/jars/core/neo4j-index-1.3-1.3.M01.jar +0 -0
- data/lib/neo4j/jars/core/neo4j-kernel-1.4.1.jar +0 -0
- data/lib/neo4j/jars/core/neo4j-lucene-index-1.4.1.jar +0 -0
- data/lib/neo4j/jars/ha/log4j-1.2.16.jar +0 -0
- data/lib/neo4j/jars/ha/neo4j-com-1.4.1.jar +0 -0
- data/lib/neo4j/jars/ha/neo4j-ha-1.4.1.jar +0 -0
- data/lib/neo4j/jars/ha/neo4j-jmx-1.4.1.jar +0 -0
- data/lib/neo4j/jars/ha/neo4j-management-1.4.1.jar +0 -0
- data/lib/neo4j/jars/ha/neo4j-shell-1.4.1.jar +0 -0
- data/lib/neo4j/jars/ha/netty-3.2.1.Final.jar +0 -0
- data/lib/neo4j/jars/ha/org.apache.servicemix.bundles.jline-0.9.94_1.jar +0 -0
- data/lib/neo4j/jars/ha/zookeeper-3.3.2.jar +0 -0
- data/lib/neo4j/paginate.rb +0 -25
- data/lib/perf.rb~ +0 -36
- data/lib/test.rb~ +0 -2
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/lib/neo4j/paginate.rb
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
module Neo4j
|
2
|
-
module Paginate
|
3
|
-
def self.included(base)
|
4
|
-
base.send(:include, WillPaginate::Finders::Base)
|
5
|
-
end
|
6
|
-
|
7
|
-
|
8
|
-
def wp_query(options, pager, args, &block) #:nodoc:
|
9
|
-
page = pager.current_page || 1
|
10
|
-
per_page = pager.per_page
|
11
|
-
to = per_page * page
|
12
|
-
from = to - per_page
|
13
|
-
i = 0
|
14
|
-
res = []
|
15
|
-
each do |node|
|
16
|
-
res << node.wrapper if i >= from
|
17
|
-
i += 1
|
18
|
-
break if i >= to
|
19
|
-
end
|
20
|
-
pager.replace res
|
21
|
-
pager.total_entries ||= count
|
22
|
-
end
|
23
|
-
|
24
|
-
end
|
25
|
-
end
|
data/lib/perf.rb~
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
require "rubygems"
|
2
|
-
require "bundler/setup"
|
3
|
-
require 'fileutils'
|
4
|
-
require 'neo4j'
|
5
|
-
|
6
|
-
#FileUtils.rm_rf Neo4j::Config[:storage_path]
|
7
|
-
|
8
|
-
|
9
|
-
class FooNode < Neo4j::Model
|
10
|
-
property :user_id
|
11
|
-
index :user_id
|
12
|
-
has_n(:contacts)
|
13
|
-
def to_s
|
14
|
-
"FooNode #{user_id}"
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
node1 = FooNode.create(:user_id => 1)
|
19
|
-
|
20
|
-
for x in 1..5 do
|
21
|
-
for node_id in 2..2700
|
22
|
-
# node = FooNode.create(:user_id => node_id)
|
23
|
-
# node.contacts << node1
|
24
|
-
# node.save!
|
25
|
-
|
26
|
-
found = FooNode.find_by_user_id(node_id)
|
27
|
-
puts "Found #{found}"
|
28
|
-
# Neo4j::Transaction.run do
|
29
|
-
# found.del
|
30
|
-
# end
|
31
|
-
Neo4j::Rails::Model.close_lucene_connections
|
32
|
-
# puts "node_id=#{node_id} #{node.contacts.include?(node1)}" #if (node_id % 50) == 2
|
33
|
-
end
|
34
|
-
end
|
35
|
-
puts "FINISHED"
|
36
|
-
Neo4j.shutdown
|
data/lib/test.rb~
DELETED