neo4j 7.0.0.rc.2 → 7.0.0.rc.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -0
- data/lib/neo4j/shared/declared_properties.rb +10 -1
- data/lib/neo4j/shared/type_converters.rb +18 -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: 8d5bc4e8f2bcb42f5e7747829c71fcb95428bf34
|
4
|
+
data.tar.gz: a0bfde6039373ffdcec00dafb52aad95011575f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d43b84a06a654cd8c35aaed5fb300690f9bfc3e626657f6aa459e0a124349ede4c3933449c2c0e16ec8fe98c30b1a55ac1c5abfb49e05dbe32367124358f0258
|
7
|
+
data.tar.gz: 5b4d1156d174b8c26c8d55f2fb16634b25698435af6532fbbf2b7fe19b55f48f8e6ae616be2b89e2fc9d5f0cfd139333b174c7a18727794d220574d67d441703
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,18 @@ 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.0.rc.2] - 03-08-2016
|
7
|
+
|
8
|
+
### Fixed
|
9
|
+
|
10
|
+
- Allow for array values when querying for enums (i.e. `where(enum_field: [:value1, :value2])`) (see #1150)
|
11
|
+
|
12
|
+
## [7.0.0.rc.2] - 03-08-2016
|
13
|
+
|
14
|
+
### Fixed
|
15
|
+
|
16
|
+
- Issue where creating relationships via `has_one` association created two relationships (forward ported from 6.0.7 / 6.1.9)
|
17
|
+
|
6
18
|
## [7.0.0.rc.1] - 03-08-2016
|
7
19
|
|
8
20
|
### Changed
|
@@ -32,6 +44,12 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
32
44
|
- All `call` class methods from Type Converters. Use `to_ruby` instead.
|
33
45
|
- `Neo4j::ActiveNode::Labels::InvalidQueryError`, since it's unused.
|
34
46
|
|
47
|
+
## [6.1.9] - 2016-03-08
|
48
|
+
|
49
|
+
### Fixed
|
50
|
+
|
51
|
+
- Issue where creating relationships via `has_one` association created two relationships (forward ported from 6.0.7)
|
52
|
+
|
35
53
|
## [6.1.8] - 2016-03-02
|
36
54
|
|
37
55
|
### Fixed
|
@@ -99,6 +117,12 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
99
117
|
- `config/neo4j.yml` now renders with an ERB step (thanks to mrstif via #1060)
|
100
118
|
- `#increment`, `#increment!` and `#concurrent_increment!` methods added to instances of ActiveNode and ActiveRel (thanks to ProGM in #1074)
|
101
119
|
|
120
|
+
## [6.0.7] - 03-08-2016
|
121
|
+
|
122
|
+
### Fixed
|
123
|
+
|
124
|
+
- Issue where creating relationships via `has_one` association created two relationships
|
125
|
+
|
102
126
|
## [6.0.6] - 01-20-2016
|
103
127
|
|
104
128
|
### Fixed
|
@@ -136,7 +136,12 @@ module Neo4j::Shared
|
|
136
136
|
def value_for_where(key, value)
|
137
137
|
return value unless prop = registered_properties[key]
|
138
138
|
return value_for_db(key, value) if prop.typecaster && prop.typecaster.convert_type == value.class
|
139
|
-
|
139
|
+
|
140
|
+
if should_convert_for_where?(key, value)
|
141
|
+
value_for_db(key, value)
|
142
|
+
else
|
143
|
+
value
|
144
|
+
end
|
140
145
|
end
|
141
146
|
|
142
147
|
def value_for_db(key, value)
|
@@ -165,6 +170,10 @@ module Neo4j::Shared
|
|
165
170
|
|
166
171
|
private
|
167
172
|
|
173
|
+
def should_convert_for_where?(key, value)
|
174
|
+
(value.is_a?(Array) && supports_array?(key)) || !EXCLUDED_TYPES.include?(value.class)
|
175
|
+
end
|
176
|
+
|
168
177
|
# @param [Symbol] key An undeclared property value found in the _persisted_obj.props hash.
|
169
178
|
# Typically, this is a node's id property, which will not be registered as other properties are.
|
170
179
|
# In the future, this should probably be reworked a bit. This class should either not know or care
|
@@ -17,6 +17,10 @@ module Neo4j::Shared
|
|
17
17
|
value.is_a?(db_type)
|
18
18
|
end
|
19
19
|
end
|
20
|
+
|
21
|
+
def supports_array?
|
22
|
+
false
|
23
|
+
end
|
20
24
|
end
|
21
25
|
|
22
26
|
class IntegerConverter < BaseConverter
|
@@ -274,6 +278,10 @@ module Neo4j::Shared
|
|
274
278
|
value.is_a?(db_type)
|
275
279
|
end
|
276
280
|
|
281
|
+
def supports_array?
|
282
|
+
true
|
283
|
+
end
|
284
|
+
|
277
285
|
def db_type
|
278
286
|
Integer
|
279
287
|
end
|
@@ -289,7 +297,11 @@ module Neo4j::Shared
|
|
289
297
|
alias_method :call, :to_ruby
|
290
298
|
|
291
299
|
def to_db(value)
|
292
|
-
|
300
|
+
if value.is_a?(Array)
|
301
|
+
value.map(&method(:to_db))
|
302
|
+
else
|
303
|
+
@enum_keys[value.to_s.to_sym] || 0
|
304
|
+
end
|
293
305
|
end
|
294
306
|
end
|
295
307
|
|
@@ -326,6 +338,11 @@ module Neo4j::Shared
|
|
326
338
|
converted_property(primitive_type(key.to_sym), value, direction)
|
327
339
|
end
|
328
340
|
|
341
|
+
def supports_array?(key)
|
342
|
+
type = primitive_type(key.to_sym)
|
343
|
+
type.respond_to?(:supports_array?) && type.supports_array?
|
344
|
+
end
|
345
|
+
|
329
346
|
def typecaster_for(value)
|
330
347
|
Neo4j::Shared::TypeConverters.typecaster_for(value)
|
331
348
|
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.0.rc.
|
4
|
+
version: 7.0.0.rc.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-03-
|
11
|
+
date: 2016-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: orm_adapter
|