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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9c4675762c7abb2516c952ee03e3a63acffeb26a
4
- data.tar.gz: d7426b76070df3d775727258a36816611f61f4c5
3
+ metadata.gz: 534edfc82a5caaf58cec05f8d4c054b22a82f1f4
4
+ data.tar.gz: 4e008775dfb574afd49f90189de4e3cd5b36bd20
5
5
  SHA512:
6
- metadata.gz: 92a03b93fada5c5543d87e6501e23211ccd6bba8ae288e5f7985ffa7e694c8b741a957b25fc1b8b5147dfc17d981612ca8987f5a1ff463d0c5ab29db7cbc73c8
7
- data.tar.gz: e92567f08fb2761a93171af5ed156e2eae8e726fc149c843ad06bddfcd0025d2dbfcb376c146866b1e74f222f736163055d2f2a4c037135d3dd3f9b65ec08495
6
+ metadata.gz: 9c3290128ad3b8c47b14ba5230e310a2a1c242fb5949da9b21beedaa589d231ab842aab7ce1ae1f3d743bf173257fbb6c3fb45774d188769963c501389b8a396
7
+ data.tar.gz: ed202f3f7fc48e714bec41a98d783e0940cdf127a6541118e0a22284bec56a5bf2237ff0b79d11e8a0853f2fde794a43379961139a73adb4b8371012e874b329
@@ -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
@@ -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 has(n.#{id_property})").pluck('COUNT(n) AS ids').first
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 has(n.#{id_property})
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}]->#{graph_object.to_node_identifier}"
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
@@ -1,3 +1,3 @@
1
1
  module Neo4j
2
- VERSION = '7.0.2'
2
+ VERSION = '7.0.3'
3
3
  end
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.2
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-10 00:00:00.000000000 Z
11
+ date: 2016-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: orm_adapter