pakyow-data 1.0.0.rc2 → 1.0.0.rc3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pakyow/data/adapters/sql/differ.rb +1 -0
- data/lib/pakyow/data/adapters/sql/migrator/adapter_methods.rb +1 -0
- data/lib/pakyow/data/adapters/sql/migrator.rb +1 -0
- data/lib/pakyow/data/adapters/sql/migrators/automator.rb +1 -0
- data/lib/pakyow/data/adapters/sql/migrators/finalizer.rb +1 -0
- data/lib/pakyow/data/adapters/sql/runner.rb +1 -0
- data/lib/pakyow/data/adapters/sql.rb +1 -0
- data/lib/pakyow/data/behavior/serialization.rb +2 -1
- data/lib/pakyow/data/container.rb +1 -0
- data/lib/pakyow/data/migrator.rb +2 -0
- data/lib/pakyow/data/object.rb +1 -0
- data/lib/pakyow/data/sources/abstract.rb +1 -0
- data/lib/pakyow/data/sources/relational/association.rb +4 -0
- data/lib/pakyow/data/sources/relational/associations/belongs_to.rb +1 -0
- data/lib/pakyow/data/sources/relational/associations/has_many.rb +1 -0
- data/lib/pakyow/data/sources/relational/associations/has_one.rb +1 -0
- data/lib/pakyow/data/sources/relational/associations/through.rb +1 -0
- data/lib/pakyow/data/sources/relational/command.rb +1 -1
- data/lib/pakyow/data/subscribers.rb +1 -1
- data/lib/pakyow/validations/unique.rb +0 -1
- metadata +20 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc46a555cdeabd3e92057164c7d73eb709e65b249d712a21efab9ac3d823d6b7
|
4
|
+
data.tar.gz: de17be63f229e13b4c71dee1c2f688023722390b33ff2b629579049ba464d2ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 515d09959682792f090f2a1584bdfe55bd3a711a3fc486052354141c46ce0087f001bb3d6b6ec1f640601e99b0fc82895d45d00af88220534aa73d35fb76c7bc
|
7
|
+
data.tar.gz: c23f714272f8e8e514faa0b8163bb932e211d34c385a29f1c170c21671a13896002ca6c1eff1671f6a0b936990a8f8c1557071fbf7cfc4bd11a5fe0d1c4c8e82
|
data/lib/pakyow/data/migrator.rb
CHANGED
data/lib/pakyow/data/object.rb
CHANGED
@@ -6,6 +6,7 @@ module Pakyow
|
|
6
6
|
module Data
|
7
7
|
module Sources
|
8
8
|
class Relational
|
9
|
+
# @api private
|
9
10
|
class Association
|
10
11
|
attr_reader :name, :query, :source, :associated_source_name, :associated_source
|
11
12
|
|
@@ -25,14 +26,17 @@ module Pakyow
|
|
25
26
|
@internal = false
|
26
27
|
end
|
27
28
|
|
29
|
+
# @api private
|
28
30
|
def dependent_source_names
|
29
31
|
[@associated_source_name]
|
30
32
|
end
|
31
33
|
|
34
|
+
# @api private
|
32
35
|
def internal?
|
33
36
|
@internal == true
|
34
37
|
end
|
35
38
|
|
39
|
+
# @api private
|
36
40
|
def internal!
|
37
41
|
@internal = true
|
38
42
|
end
|
@@ -118,7 +118,7 @@ module Pakyow
|
|
118
118
|
when Object
|
119
119
|
if association.result_type == :one
|
120
120
|
if association_value.originating_source
|
121
|
-
if association_value.originating_source == association.associated_source
|
121
|
+
if association_value.originating_source.__object_name.name == association.associated_source.__object_name.name
|
122
122
|
if association.associated_source.instance.send(:"by_#{association.associated_source.primary_key_field}", association_value[association.associated_source.primary_key_field]).count == 0
|
123
123
|
raise ConstraintViolation.new_with_message(
|
124
124
|
:associate_missing,
|
@@ -131,7 +131,7 @@ module Pakyow
|
|
131
131
|
end
|
132
132
|
end
|
133
133
|
|
134
|
-
QUALIFIABLE_TYPES = [Hash, Support::IndifferentHash]
|
134
|
+
QUALIFIABLE_TYPES = [Hash, Support::IndifferentHash].freeze
|
135
135
|
def qualified?(qualifications, changed_values, changed_results, original_results)
|
136
136
|
qualifications.all? do |key, value|
|
137
137
|
(QUALIFIABLE_TYPES.include?(changed_values.class) && changed_values.to_h[key] == value) || qualified_result?(key, value, changed_results, original_results)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pakyow-data
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.rc3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bryan Powell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-07-
|
11
|
+
date: 2019-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pakyow-core
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.0.0.
|
19
|
+
version: 1.0.0.rc3
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.0.0.
|
26
|
+
version: 1.0.0.rc3
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: pakyow-support
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.0.0.
|
33
|
+
version: 1.0.0.rc3
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.0.0.
|
40
|
+
version: 1.0.0.rc3
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: concurrent-ruby
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '1.1'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: redis
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '4.1'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '4.1'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: sequel
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|