neo4j-core 5.1.0.rc.3 → 5.1.0

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: 1fa6e58a631fd5216cb95ee1dca33d669319c11a
4
- data.tar.gz: c338b5f870060e01b55f244ac5926c1b04ad76e7
3
+ metadata.gz: 413db701027dd75c0757902fba22db6a5b289781
4
+ data.tar.gz: 59d07ba453f252c053fbd6b353b3604415cd3a0f
5
5
  SHA512:
6
- metadata.gz: 616be6bd796ccfb17b78f19a1072a54f24e23c09dac380aa004fc568b5da0aa5d69bfe5f79bd5568c9e84822a1fb9c40099096479ddcc455bbc3182058d1af1b
7
- data.tar.gz: 76881a1e2a7b57faaceed8083939b67ca063d3e78d5515b62331d245941d1032b69220376588c88cd7ed56f80f001c2df2fb7cac6f3c2d1e3de4ce7f32a7f435
6
+ metadata.gz: cf46b06d8cf1c4b4152fe7ce4f870ca019cdb475d06a2e2d902db223c7d6d2c8abf20b44cba5a352e3e3b4122d4e79e698bdc105a169e41fdc51bca506958474
7
+ data.tar.gz: 9dcdf5e2fdb993c3de4203a0e21029bc497fd6562096bdd6b76b761565c0e56206f16cccd2bc449d5625c8235931f4312810697ed2b547a41d3fb42286d98bb1
@@ -141,6 +141,12 @@ module Neo4j
141
141
  query.order(*args)
142
142
  end
143
143
 
144
+ # Works the same as the #where method, but the clause is surrounded by a
145
+ # Cypher NOT() function
146
+ def where_not(*args)
147
+ build_deeper_query(WhereClause, args, not: true)
148
+ end
149
+
144
150
  # Works the same as the #set method, but when given a nested array it will set properties rather than setting entire objects
145
151
  # @example
146
152
  # # Creates a query representing the cypher: MATCH (n:Person) SET n.age = 19
@@ -16,6 +16,7 @@ module Neo4j
16
16
  AND = ' AND '
17
17
 
18
18
  attr_accessor :params, :arg
19
+ attr_reader :options
19
20
 
20
21
  def initialize(arg, options = {})
21
22
  @arg = arg
@@ -276,7 +277,11 @@ module Neo4j
276
277
 
277
278
  class << self
278
279
  def clause_strings(clauses)
279
- clauses.map!(&:value).tap(&:flatten!).map! { |value| "(#{value})" }
280
+ clauses.flat_map do |clause|
281
+ Array(clause.value).map do |v|
282
+ (clause.options[:not] ? 'NOT' : '') + "(#{v})"
283
+ end
284
+ end
280
285
  end
281
286
 
282
287
  def clause_join
@@ -332,14 +337,18 @@ module Neo4j
332
337
  end
333
338
 
334
339
  def question_mark_params_param
335
- result = "question_mark_param#{@question_mark_param_index}"
336
- @question_mark_param_index += 1
337
- result
340
+ "question_mark_param#{question_mark_param_index}"
341
+ end
342
+
343
+ def question_mark_param_index
344
+ @question_mark_param_index ||= 1
345
+ @question_mark_param_index.tap do
346
+ @question_mark_param_index += 1
347
+ end
338
348
  end
339
349
  end
340
350
  end
341
351
 
342
-
343
352
  class MatchClause < Clause
344
353
  KEYWORD = 'MATCH'
345
354
 
@@ -1,5 +1,5 @@
1
1
  module Neo4j
2
2
  module Core
3
- VERSION = '5.1.0.rc.3'
3
+ VERSION = '5.1.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neo4j-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.0.rc.3
4
+ version: 5.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andreas Ronge, Chris Grigg, Brian Underwood
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-14 00:00:00.000000000 Z
11
+ date: 2015-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -307,9 +307,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
307
307
  version: 1.9.3
308
308
  required_rubygems_version: !ruby/object:Gem::Requirement
309
309
  requirements:
310
- - - ">"
310
+ - - ">="
311
311
  - !ruby/object:Gem::Version
312
- version: 1.3.1
312
+ version: '0'
313
313
  requirements: []
314
314
  rubyforge_project:
315
315
  rubygems_version: 2.4.5