neo4j 5.0.1 → 5.0.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f494789056a2cf7cdf67ad93320d087aec27ef9
|
4
|
+
data.tar.gz: d20cf2ef3016d84ecf8ddc85a68b3224518a424e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 059712836b2762ba02ea73fa4c0581a24cea4d9c10e87da127c0be60a8288c0a4e4b376f7b87836e8277ff78f6be1b44b8bff7832db96a320d738ac5ddde976d
|
7
|
+
data.tar.gz: 34a29e62bee5492358d3ab93ac3b18c06455480d4c3cd3d54b0fa5f78875c792d2aaee0f6b73c9cdba8254c6d8a31276960b3078213f9db14ebed915b4595300
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,13 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
5
5
|
|
6
6
|
## [Unreleased][unreleased]
|
7
7
|
|
8
|
+
## [5.0.2] - 2015-06-30
|
9
|
+
|
10
|
+
### Fixed
|
11
|
+
- Fix error when calling `#empty?` or `#blank?` on a query chain with on `order` specified
|
12
|
+
- Make `#find_each` and `#find_in_batches` return the actual objects rather than the result objects
|
13
|
+
- Query logging on console should be to STDOUT with `puts`. Using `Rails.logger` outputs to the file in the `log` directory
|
14
|
+
|
8
15
|
## [5.0.1] - 2015-06-23
|
9
16
|
|
10
17
|
### Fixed
|
@@ -4,13 +4,13 @@ module Neo4j
|
|
4
4
|
module QueryProxyFindInBatches
|
5
5
|
def find_in_batches(options = {})
|
6
6
|
query.return(identity).find_in_batches(identity, @model.primary_key, options) do |batch|
|
7
|
-
yield batch
|
7
|
+
yield batch.map(&:identity)
|
8
8
|
end
|
9
9
|
end
|
10
10
|
|
11
11
|
def find_each(options = {})
|
12
12
|
query.return(identity).find_each(identity, @model.primary_key, options) do |result|
|
13
|
-
yield result
|
13
|
+
yield result.send(identity)
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
@@ -75,10 +75,18 @@ module Neo4j
|
|
75
75
|
|
76
76
|
alias_method :blank?, :empty?
|
77
77
|
|
78
|
+
# @param [Neo4j::ActiveNode, Neo4j::Node, String] other An instance of a Neo4j.rb model, a Neo4j-core node, or a string uuid
|
79
|
+
# @param [String, Symbol] target An identifier of a link in the Cypher chain
|
80
|
+
# @return [Boolean]
|
78
81
|
def include?(other, target = nil)
|
79
|
-
fail(InvalidParameterError, ':include? only accepts nodes') unless other.respond_to?(:neo_id)
|
80
82
|
query_with_target(target) do |var|
|
81
|
-
|
83
|
+
where_filter = if other.respond_to?(:neo_id)
|
84
|
+
"ID(#{var}) = {other_node_id}"
|
85
|
+
else
|
86
|
+
"#{var}.#{association_id_key} = {other_node_id}"
|
87
|
+
end
|
88
|
+
node_id = other.respond_to?(:neo_id) ? other.neo_id : other
|
89
|
+
self.where(where_filter).params(other_node_id: node_id).query.return("count(#{var}) as count").first.count > 0
|
82
90
|
end
|
83
91
|
end
|
84
92
|
|
@@ -86,7 +94,7 @@ module Neo4j
|
|
86
94
|
fail(InvalidParameterError, ':exists? only accepts neo_ids') unless node_condition.is_a?(Integer) || node_condition.is_a?(Hash) || node_condition.nil?
|
87
95
|
query_with_target(target) do |var|
|
88
96
|
start_q = exists_query_start(node_condition, var)
|
89
|
-
start_q.query.return("COUNT(#{var}) AS count").first.count > 0
|
97
|
+
start_q.query.reorder.return("COUNT(#{var}) AS count").first.count > 0
|
90
98
|
end
|
91
99
|
end
|
92
100
|
|
data/lib/neo4j/railtie.rb
CHANGED
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: 5.0.
|
4
|
+
version: 5.0.2
|
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: 2015-06-
|
11
|
+
date: 2015-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: orm_adapter
|
@@ -313,7 +313,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
313
313
|
version: '0'
|
314
314
|
requirements: []
|
315
315
|
rubyforge_project: neo4j
|
316
|
-
rubygems_version: 2.4.
|
316
|
+
rubygems_version: 2.4.5
|
317
317
|
signing_key:
|
318
318
|
specification_version: 4
|
319
319
|
summary: A graph database for Ruby
|