activecypher 0.15.2 → 0.15.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/lib/active_cypher/relation.rb +9 -1
- data/lib/active_cypher/relationship.rb +3 -0
- data/lib/active_cypher/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 56141506fc5e406952855cadb4f82b23c33e74ba37f9a08c16122e185fb86b15
|
|
4
|
+
data.tar.gz: f36c6bf8fcd4d5676a32db4d3c0089c570c51bc3789bc0a1a0277d8fa34e3792
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 94aa83fe31cf9f3650697ccb69a7907d15f4b1ef7b95d7372a7d4a3defd9db7bea7d01870692b35067ac56190470b4a36b1979d1348e7b84dc88f9abf1ec865d
|
|
7
|
+
data.tar.gz: 56a1c811bbda6765296e9990c7dbf91c12c0afc5afeb9705ee0066efa7d175dc178736eda020e4827928b2e8e3a5a58feaf57008fb5966fcf246187baa6648a5
|
|
@@ -39,7 +39,15 @@ module ActiveCypher
|
|
|
39
39
|
case conditions
|
|
40
40
|
when Hash
|
|
41
41
|
conditions.each do |key, value|
|
|
42
|
-
|
|
42
|
+
if value.is_a?(Array)
|
|
43
|
+
expr = Cyrel::Expression::Comparison.new(
|
|
44
|
+
Cyrel.prop(node_alias, key),
|
|
45
|
+
:IN,
|
|
46
|
+
value
|
|
47
|
+
)
|
|
48
|
+
else
|
|
49
|
+
expr = Cyrel.prop(node_alias, key).eq(value)
|
|
50
|
+
end
|
|
43
51
|
new_query = new_query.where(expr)
|
|
44
52
|
end
|
|
45
53
|
when Cyrel::Expression::Base
|
|
@@ -29,6 +29,9 @@ require 'active_support/core_ext/hash/indifferent_access'
|
|
|
29
29
|
|
|
30
30
|
module ActiveCypher
|
|
31
31
|
class Relationship
|
|
32
|
+
# Define connects_to_mappings as a class attribute to match ActiveCypher::Base ?
|
|
33
|
+
# class_attribute :connects_to_mappings, default: { reading: :primary, writing: :primary }
|
|
34
|
+
|
|
32
35
|
# --------------------------------------------------------------
|
|
33
36
|
# Mix‑ins
|
|
34
37
|
# --------------------------------------------------------------
|