neo4j 7.0.2 → 7.0.3
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/CHANGELOG.md +6 -0
- data/lib/neo4j/active_node/query/query_proxy.rb +3 -3
- data/lib/neo4j/active_node/query/query_proxy_eager_loading.rb +1 -1
- data/lib/neo4j/active_node/query/query_proxy_link.rb +1 -1
- data/lib/neo4j/migration.rb +2 -2
- data/lib/neo4j/shared/query_factory.rb +1 -1
- data/lib/neo4j/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 534edfc82a5caaf58cec05f8d4c054b22a82f1f4
|
4
|
+
data.tar.gz: 4e008775dfb574afd49f90189de4e3cd5b36bd20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c3290128ad3b8c47b14ba5230e310a2a1c242fb5949da9b21beedaa589d231ab842aab7ce1ae1f3d743bf173257fbb6c3fb45774d188769963c501389b8a396
|
7
|
+
data.tar.gz: ed202f3f7fc48e714bec41a98d783e0940cdf127a6541118e0a22284bec56a5bf2237ff0b79d11e8a0853f2fde794a43379961139a73adb4b8371012e874b329
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file.
|
|
3
3
|
This file should follow the standards specified on [http://keepachangelog.com/]
|
4
4
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
5
5
|
|
6
|
+
## [7.0.3] - 04-28-2016
|
7
|
+
|
8
|
+
### Fixed
|
9
|
+
|
10
|
+
- Added parens to queries to support new required syntax in Neo4j 3.0
|
11
|
+
|
6
12
|
## [7.0.2] - 04-10-2016
|
7
13
|
|
8
14
|
### Fixed
|
@@ -105,7 +105,7 @@ module Neo4j
|
|
105
105
|
if @association
|
106
106
|
chain_var = _association_chain_var
|
107
107
|
(_association_query_start(chain_var) & _query).break.send(@match_type,
|
108
|
-
"#{chain_var}#{_association_arrow}(#{var}#{_model_label_string})")
|
108
|
+
"(#{chain_var})#{_association_arrow}(#{var}#{_model_label_string})")
|
109
109
|
else
|
110
110
|
starting_query ? starting_query : _query_model_as(var, with_labels)
|
111
111
|
end
|
@@ -287,9 +287,9 @@ module Neo4j
|
|
287
287
|
def _match_arg(var, with_labels)
|
288
288
|
if @model && with_labels != false
|
289
289
|
labels = @model.respond_to?(:mapped_label_names) ? _model_label_string : @model
|
290
|
-
{var => labels}
|
290
|
+
{var.to_sym => labels}
|
291
291
|
else
|
292
|
-
var
|
292
|
+
var.to_sym
|
293
293
|
end
|
294
294
|
end
|
295
295
|
|
@@ -51,7 +51,7 @@ module Neo4j
|
|
51
51
|
def with_association_query_part(base_query, association_name, previous_with_variables)
|
52
52
|
association = model.associations[association_name]
|
53
53
|
|
54
|
-
base_query.optional_match("#{identity}#{association.arrow_cypher}#{association_name}")
|
54
|
+
base_query.optional_match("(#{identity})#{association.arrow_cypher}(#{association_name})")
|
55
55
|
.where(association.target_where_clause)
|
56
56
|
.with(identity, "collect(#{association_name}) AS #{association_name}_collection", *with_associations_return_clause(previous_with_variables))
|
57
57
|
end
|
@@ -66,7 +66,7 @@ module Neo4j
|
|
66
66
|
fail ArgumentError, "Invalid value for '#{name}' condition" if not neo_id.is_a?(Integer)
|
67
67
|
|
68
68
|
[
|
69
|
-
new(:match, ->(v, _) { "#{v}#{model.associations[name].arrow_cypher}(#{n_string})" }),
|
69
|
+
new(:match, ->(v, _) { "(#{v})#{model.associations[name].arrow_cypher}(#{n_string})" }),
|
70
70
|
new(:where, ->(_, _) { {"ID(#{n_string})" => neo_id.to_i} })
|
71
71
|
]
|
72
72
|
end
|
data/lib/neo4j/migration.rb
CHANGED
@@ -75,7 +75,7 @@ MESSAGE
|
|
75
75
|
end
|
76
76
|
|
77
77
|
def idless_count(label, id_property)
|
78
|
-
Neo4j::Session.query.match(n: label).where("NOT
|
78
|
+
Neo4j::Session.query.match(n: label).where("NOT EXISTS(n.#{id_property})").pluck('COUNT(n) AS ids').first
|
79
79
|
end
|
80
80
|
|
81
81
|
def print_status(last_time_taken, max_per_batch, nodes_left)
|
@@ -94,7 +94,7 @@ MESSAGE
|
|
94
94
|
def id_batch_set(label, id_property, new_ids, count)
|
95
95
|
tx = Neo4j::Transaction.new
|
96
96
|
|
97
|
-
Neo4j::Session.query("MATCH (n:`#{label}`) WHERE NOT
|
97
|
+
Neo4j::Session.query("MATCH (n:`#{label}`) WHERE NOT EXISTS(n.#{id_property})
|
98
98
|
with COLLECT(n) as nodes, #{new_ids} as ids
|
99
99
|
FOREACH(i in range(0,#{count - 1})|
|
100
100
|
FOREACH(node in [nodes[i]]|
|
@@ -95,7 +95,7 @@ module Neo4j::Shared
|
|
95
95
|
end
|
96
96
|
|
97
97
|
def query_string
|
98
|
-
"#{graph_object.from_node_identifier}-[#{identifier}:`#{graph_object.type}` {#{identifier}_create_props}]
|
98
|
+
"(#{graph_object.from_node_identifier})-[#{identifier}:`#{graph_object.type}` {#{identifier}_create_props}]->(#{graph_object.to_node_identifier})"
|
99
99
|
end
|
100
100
|
end
|
101
101
|
end
|
data/lib/neo4j/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: neo4j
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.0.
|
4
|
+
version: 7.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andreas Ronge, Brian Underwood, Chris Grigg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: orm_adapter
|