pacer 1.5.3-java → 1.5.4-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3250ffeca5394098af589a4b4e286231cd953c98
4
- data.tar.gz: 95bd957a7bda47bcae60486902bd74ebe55a2228
3
+ metadata.gz: a36c9ff57450dc2a925ab700058f7e1dee0b2253
4
+ data.tar.gz: 4f0b8c63222025399b50a181b641adfd1be2936a
5
5
  SHA512:
6
- metadata.gz: e6d89ed6e9984ff592fd28c657c019fa8b8077689d7bad1b244d70b0eef05a6c74678535c66e1c7d4150a3c7f629ecfbcb3895d8a4286955e689673aebfda112
7
- data.tar.gz: 464ba4b8be3650aaf223eea4140994e7844496f9930b5399b0bcf55b83379773ddbdb39f7310f21824822d35497528575451757df0ad9f635171d8522c6c1342
6
+ metadata.gz: d870f3b0c7e2d191e1a58baf3db06d983fa2b46a7147c9f5b357647f7ca3067b6a5d7cb1391eabe85334224c2a44b489af86ca2423ac6aa56330e73872b46b6c
7
+ data.tar.gz: 716b3fb946400740c4cd637b588238967eadc8925e0d53c2424ca255ba76a18912c8071d3652819d639de4d3340cc3e6f802fabddd4326568d61e7914d2288a7
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Pacer is a JRuby library that enables very expressive graph traversals.
4
4
 
5
- It currently supports all of the major graph databases including [Neo4j](http://neo4j.org)
5
+ It currently supports all of the major graph databases including [OrientDB][http://orientdb.com], [Neo4j](http://neo4j.org)
6
6
  and [Dex](http://www.sparsity-technologies.com/dex) thanks to the
7
7
  [Tinkerpop](http://tinkerpop.com) graphdb stack. Plus there's a very
8
8
  convenient in-memory graph called TinkerGraph which is part of
@@ -62,6 +62,7 @@ supported so far:
62
62
  | Graph | Info | Gem Required | Gem address |
63
63
  |------------------------------------------------|------------------------------------------|---------------------------|-----------------------------------------------------------------|
64
64
  | TinkerGraph | In-memory graph db. Included with Pacer. | | |
65
+ | [OrientDB](http://orientdb.com) | A powerful and feature rich graph / document hybrid database. | `gem install --pre pacer-orient` | [pangloss/pacer-orient](https://github.com/pangloss/pacer-orient) |
65
66
  | [Neo4J](http://neo4j.org) | The industry-leading graph db. | `gem install pacer-neo4j` | [pangloss/pacer-neo4j](https://github.com/pangloss/pacer-neo4j) |
66
67
  | [Dex](http://sparsity-technologies.com) | A very fast, relatively new graph db. | `gem install pacer-dex` | [pangloss/pacer-dex](https://github.com/pangloss/pacer-dex) |
67
68
  | [Titan](http://thinkaurelius.github.io/titan/) | Built on top of a pluggable nosql backend store | `gem install pacer-titan` | [pacer-titan](https://github.com/mrbotch/pacer-titan) |
@@ -41,7 +41,7 @@ module Pacer
41
41
  commit, rollback = start_transaction! opts
42
42
  begin
43
43
  r = yield commit, rollback
44
- commit.call
44
+ commit.call(false)
45
45
  r
46
46
  rescue Exception => e
47
47
  rollback.call e.message
@@ -122,6 +122,7 @@ module Pacer
122
122
  graphs[blueprints_graph.object_id] ||= {}
123
123
  end
124
124
 
125
+ # NOTE pacer-orient reimplements this
125
126
  def start_transaction!(opts)
126
127
  tgi = threadlocal_graph_info
127
128
  tx_depth = tgi[:tx_depth] ||= 0
@@ -149,18 +150,21 @@ module Pacer
149
150
  end
150
151
  end
151
152
 
153
+ # NOTE pacer-orient reimplements this
152
154
  def finish_transaction!
153
155
  threadlocal_graph_info[:tx_depth] -= 1 rescue nil
154
156
  end
155
157
 
158
+ # NOTE pacer-orient reimplements this
156
159
  def base_tx_finalizers
157
160
  tx_id = threadlocal_graph_info[:tx_id] = rand
158
- commit = -> do
161
+ commit = ->(reopen = true) do
159
162
  if tx_id != threadlocal_graph_info[:tx_id]
160
163
  fail InternalError, 'Can not commit transaction outside its original block'
161
164
  end
162
165
  puts "transaction committed" if Pacer.verbose == :very
163
166
  blueprints_graph.commit
167
+ # reopen arg is ignored for graphs that automatically open their tx.
164
168
  reopen_read_transaction
165
169
  on_commit_block.call if on_commit_block
166
170
  end
@@ -173,7 +177,7 @@ module Pacer
173
177
  end
174
178
 
175
179
  def nested_tx_finalizers
176
- commit = -> do
180
+ commit = ->(reopen = true) do
177
181
  puts "nested transaction committed (noop)" if Pacer.verbose == :very
178
182
  end
179
183
  rollback = ->(message = 'Transaction Rolled Back') do
@@ -187,7 +191,7 @@ module Pacer
187
191
  end
188
192
 
189
193
  def mock_base_tx_finalizers
190
- commit = -> do
194
+ commit = ->(reopen = true) do
191
195
  puts "mock transaction committed" if Pacer.verbose == :very
192
196
  on_commit_block.call if on_commit_block
193
197
  end
@@ -202,7 +206,7 @@ module Pacer
202
206
  end
203
207
 
204
208
  def mock_nested_tx_finalizers
205
- commit = -> do
209
+ commit = ->(reopen = true) do
206
210
  puts "nested transaction committed (noop)" if Pacer.verbose == :very
207
211
  end
208
212
  rollback = ->(message = nil) do
@@ -367,6 +367,7 @@ module Pacer
367
367
 
368
368
  module KeyIndices
369
369
  def create_key_index(name, type = :vertex, opts = {})
370
+ return if key_indices(type).include? name.to_s
370
371
  params = build_key_index_parameters_from opts
371
372
  if features.supportsKeyIndices
372
373
  if element_type(type) == :vertex and features.supportsVertexKeyIndex
@@ -41,7 +41,8 @@ module Pacer::Transform
41
41
 
42
42
  def getPathToHere
43
43
  path = super
44
- path.remove path.size - 1
44
+ i = path.size - 1
45
+ path.remove path.size - 1 if i >= 0
45
46
  path.add currentEnd
46
47
  path
47
48
  end
data/lib/pacer/version.rb CHANGED
@@ -1,13 +1,13 @@
1
1
  module Pacer
2
2
  unless const_defined? :VERSION
3
- VERSION = "1.5.3"
3
+ VERSION = "1.5.4"
4
4
 
5
5
  JAR = "pacer-#{ VERSION }-standalone.jar"
6
6
  JAR_PATH = "lib/#{ JAR }"
7
7
 
8
8
  START_TIME = Time.now
9
9
 
10
- BLUEPRINTS_VERSION = "2.6.0-SNAPSHOT"
10
+ BLUEPRINTS_VERSION = "2.6.0"
11
11
  PIPES_VERSION = "2.5.0"
12
12
  end
13
13
  end
@@ -189,6 +189,13 @@ module Pacer::Wrappers
189
189
  element.payload if element.is_a? Pacer::Payload::Element
190
190
  end
191
191
 
192
+ def reload
193
+ if element.respond_to? :reload
194
+ element.reload
195
+ end
196
+ self
197
+ end
198
+
192
199
  protected
193
200
 
194
201
  def after_initialize
@@ -239,7 +239,9 @@ module Pacer::Wrappers
239
239
  labels = Set[]
240
240
  exts = []
241
241
  mixed.each do |obj|
242
- if obj.is_a? Symbol or obj.is_a? String
242
+ if obj.is_a? Symbol
243
+ labels << obj.to_s
244
+ elsif obj.is_a? String
243
245
  labels << obj
244
246
  else
245
247
  exts << obj
data/pom.xml CHANGED
@@ -7,8 +7,8 @@
7
7
  <artifactId>pacer</artifactId>
8
8
  <!-- NOTE: the following properties are automatically updated based on the values in lib/pacer-neo4j/version.rb -->
9
9
  <properties>
10
- <blueprints.version>2.6.0-SNAPSHOT</blueprints.version>
11
- <gem.version>1.5.3</gem.version>
10
+ <blueprints.version>2.6.0</blueprints.version>
11
+ <gem.version>1.5.4</gem.version>
12
12
  <pipes.version>2.5.0</pipes.version>
13
13
  </properties>
14
14
  <!-- NOTE: the following properties are automatically updated based on the values in lib/pacer-neo4j/version.rb -->
@@ -6,9 +6,11 @@ Run.all(:read_write) do
6
6
  describe '#property?' do
7
7
  before do
8
8
  setup_data
9
- graph.create_vertex other: 'hi'
10
- graph.create_vertex falsy: false
11
- graph.create_vertex zero: 0
9
+ graph.transaction(nesting: true) do
10
+ graph.create_vertex other: 'hi'
11
+ graph.create_vertex falsy: false
12
+ graph.create_vertex zero: 0
13
+ end
12
14
  end
13
15
 
14
16
  it 'should filter vertices that do not have the given property' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pacer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.3
4
+ version: 1.5.4
5
5
  platform: java
6
6
  authors:
7
7
  - Darrick Wiebe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-19 00:00:00.000000000 Z
11
+ date: 2014-10-04 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Pacer defines routes through a graph and then traverses them very quickly.
14
14
  email: darrick@innatesoftware.com
@@ -218,7 +218,7 @@ files:
218
218
  - spec/support/use_transactions.rb
219
219
  - spec/tackle/simple_mixin.rb
220
220
  - spec/tackle/tinkerpop_graph_mixins.rb
221
- - lib/pacer-1.5.3-standalone.jar
221
+ - lib/pacer-1.5.4-standalone.jar
222
222
  homepage: http://github.com/pangloss/pacer
223
223
  licenses:
224
224
  - MIT