graphoid 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/graphoid/drivers/mongoid.rb +11 -11
- data/lib/graphoid/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f060ce3dc46c8bf367aeec184daa225ebbe3d33471a37492f668b61a917e23d
|
4
|
+
data.tar.gz: a62c8e9a0abd9c10b0a8842bdb5ca75a8cf8050fba088db794f723376a966f27
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d183869e672db7ccb37a72e9c3fea49db92add12130e4a59c1e1cfa3f69d04db60fcad8141e99f0b8167ab2b3eb068eefde7c768be71e096001fd5117af7f470
|
7
|
+
data.tar.gz: f5f2fa9be4b6052c10b036f9b5bc2f9c9dd59025b14aa2ecdf09c9885072686b3ebe09442dd47daf842c888a7323c4c52ce2b2717acad15f136e0544af9bb4be
|
@@ -56,13 +56,13 @@ module Graphoid
|
|
56
56
|
|
57
57
|
def class_of(relation)
|
58
58
|
{
|
59
|
-
Mongoid::
|
60
|
-
Mongoid::
|
61
|
-
Mongoid::
|
62
|
-
Mongoid::
|
63
|
-
Mongoid::
|
64
|
-
Mongoid::
|
65
|
-
Mongoid::
|
59
|
+
Mongoid::Association::Referenced::HasAndBelongsToMany => ManyToMany,
|
60
|
+
Mongoid::Association::Referenced::HasMany => HasMany,
|
61
|
+
Mongoid::Association::Referenced::HasOne => HasOne,
|
62
|
+
Mongoid::Association::Referenced::BelongsTo => BelongsTo,
|
63
|
+
Mongoid::Association::Embedded::EmbedsMany => EmbedsMany,
|
64
|
+
Mongoid::Association::Embedded::EmbedsOne => EmbedsOne,
|
65
|
+
Mongoid::Association::Embedded::EmbeddedIn => Relation
|
66
66
|
}[relation.relation] || Relation
|
67
67
|
end
|
68
68
|
|
@@ -88,10 +88,10 @@ module Graphoid
|
|
88
88
|
|
89
89
|
def eager_load(selection, model)
|
90
90
|
referenced_relations = [
|
91
|
-
Mongoid::
|
92
|
-
Mongoid::
|
93
|
-
Mongoid::
|
94
|
-
Mongoid::
|
91
|
+
Mongoid::Association::Referenced::HasAndBelongsToMany,
|
92
|
+
Mongoid::Association::Referenced::HasMany,
|
93
|
+
Mongoid::Association::Referenced::HasOne,
|
94
|
+
Mongoid::Association::Referenced::BelongsTo
|
95
95
|
]
|
96
96
|
|
97
97
|
properties = Graphoid::Queries::Processor.children_of(selection)
|
data/lib/graphoid/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graphoid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maximiliano Perez Coto
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04-
|
11
|
+
date: 2019-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|