neo4j-core 5.1.0.rc.3 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/neo4j-core/query.rb +6 -0
- data/lib/neo4j-core/query_clauses.rb +14 -5
- data/lib/neo4j-core/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 413db701027dd75c0757902fba22db6a5b289781
|
4
|
+
data.tar.gz: 59d07ba453f252c053fbd6b353b3604415cd3a0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf46b06d8cf1c4b4152fe7ce4f870ca019cdb475d06a2e2d902db223c7d6d2c8abf20b44cba5a352e3e3b4122d4e79e698bdc105a169e41fdc51bca506958474
|
7
|
+
data.tar.gz: 9dcdf5e2fdb993c3de4203a0e21029bc497fd6562096bdd6b76b761565c0e56206f16cccd2bc449d5625c8235931f4312810697ed2b547a41d3fb42286d98bb1
|
data/lib/neo4j-core/query.rb
CHANGED
@@ -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.
|
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
|
-
|
336
|
-
|
337
|
-
|
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
|
|
data/lib/neo4j-core/version.rb
CHANGED
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
|
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-
|
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:
|
312
|
+
version: '0'
|
313
313
|
requirements: []
|
314
314
|
rubyforge_project:
|
315
315
|
rubygems_version: 2.4.5
|