neo4j 6.0.0.alpha.7 → 6.0.0.alpha.8

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: b0ca6a12d1708b86d03c1c5932a4f251e365c005
4
- data.tar.gz: 26bc7938b51f0c998ab7065df9db84cccf60a9dc
3
+ metadata.gz: 715265763c28f04acb9e54f3dc25dbffc1257df8
4
+ data.tar.gz: 4947537ea67beca1ffa59d22837079129425562b
5
5
  SHA512:
6
- metadata.gz: 75f1ec8c3a3c26a6047d0257da2652f0e51c4b198cffeff15bd847797cd5a94928788e5010f9c57a3a81693628b5ec7ac0e4fa16190b9d8b58b39b2b61e2e6c5
7
- data.tar.gz: ba64cd70f047f933e47a0aed2d9daa4b1b39876589fe432537c20c85bdf6f13fdd74e14794d53a9304aaf5a44df573dac7e9933455ccccb28204f9fae4b73330
6
+ metadata.gz: 8d6b66ede21482b9183f5276654c66e88daedae44f20befa26b6b8c4206f6ed9e49c76e2fdf7ff88f4c2bafbba521ac25b29194368f7dccaddf25c6ee01736e5
7
+ data.tar.gz: 6caec430e130b5810a20c57c5fe8874b97d77e295cda0e191cdd08d362d8f10a6359b517889af7dcfad5f2d769e8979ce713f3faff702005970be3da349cfab0
@@ -3,9 +3,20 @@ 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
+ ## [Unreleased]
7
+
8
+ ### Added
9
+
10
+ - `rel_order` method for association chaining
11
+
6
12
  ## [6.0.0.alpha.7] - 10-19-2015
7
13
 
14
+ ### Changed
15
+
8
16
  - Remove uniqueness validation for `id_property` because we already have Neo4j constraints
17
+
18
+ ### Added
19
+
9
20
  - Support `config/neo4j.ya?ml`
10
21
 
11
22
  ## [6.0.0.alpha.6] - 10-18-2015
@@ -138,13 +138,14 @@ module Neo4j
138
138
  @model.current_scope = previous
139
139
  end
140
140
 
141
- METHODS = %w(where where_not rel_where order skip limit)
141
+ METHODS = %w(where where_not rel_where rel_order order skip limit)
142
142
 
143
143
  METHODS.each do |method|
144
144
  define_method(method) { |*args| build_deeper_query_proxy(method.to_sym, args) }
145
145
  end
146
- # Since there is a rel_where method, it seems only natural for there to be node_where
146
+ # Since there are rel_where and rel_order methods, it seems only natural for there to be node_where and node_order
147
147
  alias_method :node_where, :where
148
+ alias_method :node_order, :order
148
149
  alias_method :offset, :skip
149
150
  alias_method :order_by, :order
150
151
 
@@ -208,8 +209,7 @@ module Neo4j
208
209
 
209
210
  def _create_relationship(other_node_or_nodes, properties)
210
211
  _session.query(context: @options[:context])
211
- .match(:start, :end)
212
- .where(start: {neo_id: @start_object}, end: {neo_id: other_node_or_nodes})
212
+ .match(:start, :end).match_nodes(start: @start_object, end: other_node_or_nodes)
213
213
  .send(association.create_method, "start#{_association_arrow(properties, true)}end").exec
214
214
  end
215
215
 
@@ -80,6 +80,10 @@ module Neo4j
80
80
  end
81
81
  end
82
82
 
83
+ def for_rel_order_clause(arg, _)
84
+ [new(:order, ->(_, v) { arg.is_a?(String) ? arg : {v => arg} })]
85
+ end
86
+
83
87
  def for_order_clause(arg, _)
84
88
  [new(:order, ->(v, _) { arg.is_a?(String) ? arg : {v => arg} })]
85
89
  end
@@ -55,7 +55,7 @@ module Neo4j
55
55
  end
56
56
 
57
57
  def default_session_type
58
- if ENV['NEO4J_PATH']
58
+ if ENV['NEO4J_TYPE']
59
59
  :embedded_db
60
60
  else
61
61
  config_data[:type] || :server_db
@@ -1,3 +1,3 @@
1
1
  module Neo4j
2
- VERSION = '6.0.0.alpha.7'
2
+ VERSION = '6.0.0.alpha.8'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neo4j
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.0.alpha.7
4
+ version: 6.0.0.alpha.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andreas Ronge, Brian Underwood, Chris Grigg