panko_serializer 0.8.3 → 0.8.4
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/.github/workflows/database_matrix.yml +85 -0
- data/.github/workflows/docs.yml +1 -1
- data/.github/workflows/lint.yml +3 -3
- data/.github/workflows/tests.yml +34 -0
- data/Appraisals +15 -16
- data/Gemfile +1 -0
- data/README.md +4 -4
- data/docs/docs/associations.md +13 -13
- data/docs/docs/attributes.md +24 -17
- data/docs/docs/design-choices.md +17 -17
- data/docs/docs/getting-started.md +4 -4
- data/docs/docs/introduction.md +4 -4
- data/docs/docs/performance.md +4 -4
- data/docs/docs/response-bag.md +5 -5
- data/docs/docusaurus.config.js +2 -2
- data/docs/package-lock.json +5769 -3891
- data/docs/package.json +4 -7
- data/ext/panko_serializer/attributes_writer/active_record.c +2 -29
- data/ext/panko_serializer/attributes_writer/type_cast/type_cast.c +1 -1
- data/gemfiles/7.2.0.gemfile +3 -1
- data/gemfiles/7.2.0.gemfile.lock +101 -78
- data/gemfiles/8.0.0.gemfile +3 -1
- data/gemfiles/8.0.0.gemfile.lock +108 -88
- data/gemfiles/{7.0.0.gemfile → 8.1.0.gemfile} +6 -4
- data/gemfiles/8.1.0.gemfile.lock +248 -0
- data/lib/panko/version.rb +1 -1
- metadata +7 -12
- data/.github/workflows/ruby.yml +0 -51
- data/gemfiles/7.0.0.gemfile.lock +0 -176
- data/gemfiles/7.1.0.gemfile +0 -39
- data/gemfiles/7.1.0.gemfile.lock +0 -198
data/docs/package.json
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"examples": "docusaurus-examples",
|
|
4
4
|
"start": "docusaurus start",
|
|
5
5
|
"build": "docusaurus build",
|
|
6
|
+
"serve": "docusaurus serve",
|
|
6
7
|
"write-translations": "docusaurus-write-translations",
|
|
7
8
|
"version": "docusaurus-version",
|
|
8
9
|
"rename-version": "docusaurus-rename-version",
|
|
@@ -10,12 +11,8 @@
|
|
|
10
11
|
"deploy": "docusaurus deploy",
|
|
11
12
|
"docusaurus": "docusaurus"
|
|
12
13
|
},
|
|
13
|
-
"devDependencies": {},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@docusaurus/core": "3.
|
|
16
|
-
"@docusaurus/preset-classic": "3.
|
|
17
|
-
"clsx": "^1.1.1",
|
|
18
|
-
"react": "^17.0.2",
|
|
19
|
-
"react-dom": "^17.0.2"
|
|
15
|
+
"@docusaurus/core": "^3.9.2",
|
|
16
|
+
"@docusaurus/preset-classic": "^3.9.2"
|
|
20
17
|
}
|
|
21
|
-
}
|
|
18
|
+
}
|
|
@@ -11,31 +11,6 @@ static ID type_id;
|
|
|
11
11
|
|
|
12
12
|
static ID fetch_id;
|
|
13
13
|
|
|
14
|
-
// ActiveRecord::Result::IndexedRow
|
|
15
|
-
static VALUE ar_result_indexed_row = Qundef;
|
|
16
|
-
static int fetched_ar_result_indexed_row = 0;
|
|
17
|
-
|
|
18
|
-
VALUE fetch_ar_result_indexed_row_type() {
|
|
19
|
-
if (fetched_ar_result_indexed_row == 1) {
|
|
20
|
-
return ar_result_indexed_row;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
fetched_ar_result_indexed_row = 1;
|
|
24
|
-
|
|
25
|
-
VALUE ar, ar_result;
|
|
26
|
-
|
|
27
|
-
ar = rb_const_get_at(rb_cObject, rb_intern("ActiveRecord"));
|
|
28
|
-
|
|
29
|
-
// ActiveRecord::Result
|
|
30
|
-
ar_result = rb_const_get_at(ar, rb_intern("Result"));
|
|
31
|
-
|
|
32
|
-
if (rb_const_defined_at(ar_result, rb_intern("IndexedRow")) == (int)Qtrue) {
|
|
33
|
-
ar_result_indexed_row = rb_const_get_at(ar_result, rb_intern("IndexedRow"));
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return ar_result_indexed_row;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
14
|
struct attributes {
|
|
40
15
|
// Hash
|
|
41
16
|
VALUE attributes_hash;
|
|
@@ -67,13 +42,11 @@ struct attributes init_context(VALUE obj) {
|
|
|
67
42
|
.attributes_hash =
|
|
68
43
|
PANKO_EMPTY_HASH(attributes_hash) ? Qnil : attributes_hash,
|
|
69
44
|
.attributes_hash_size = 0,
|
|
70
|
-
|
|
71
45
|
.types = rb_ivar_get(attributes_set, types_id),
|
|
72
46
|
.additional_types = rb_ivar_get(attributes_set, additional_types_id),
|
|
73
47
|
.tryToReadFromAdditionalTypes =
|
|
74
48
|
PANKO_EMPTY_HASH(rb_ivar_get(attributes_set, additional_types_id)) ==
|
|
75
49
|
false,
|
|
76
|
-
|
|
77
50
|
.values = rb_ivar_get(attributes_set, values_id),
|
|
78
51
|
.is_indexed_row = false,
|
|
79
52
|
.indexed_row_column_indexes = Qnil,
|
|
@@ -84,10 +57,10 @@ struct attributes init_context(VALUE obj) {
|
|
|
84
57
|
attrs.attributes_hash_size = RHASH_SIZE(attrs.attributes_hash);
|
|
85
58
|
}
|
|
86
59
|
|
|
87
|
-
if (CLASS_OF(attrs.values)
|
|
60
|
+
if (strcmp(rb_class2name(CLASS_OF(attrs.values)),
|
|
61
|
+
"ActiveRecord::Result::IndexedRow") == 0) {
|
|
88
62
|
volatile VALUE indexed_row_column_indexes =
|
|
89
63
|
rb_ivar_get(attrs.values, rb_intern("@column_indexes"));
|
|
90
|
-
|
|
91
64
|
volatile VALUE indexed_row_row =
|
|
92
65
|
rb_ivar_get(attrs.values, rb_intern("@row"));
|
|
93
66
|
|
|
@@ -288,7 +288,7 @@ VALUE cast_date_time_type(VALUE value) {
|
|
|
288
288
|
return Qundef;
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
-
VALUE rescue_func() { return Qfalse; }
|
|
291
|
+
VALUE rescue_func(VALUE _arg, VALUE _data) { return Qfalse; }
|
|
292
292
|
|
|
293
293
|
VALUE parse_json(VALUE value) {
|
|
294
294
|
return rb_funcall(oj_type, oj_sc_parse_id, 2, rb_cObject, value);
|
data/gemfiles/7.2.0.gemfile
CHANGED
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
source "https://rubygems.org"
|
|
4
4
|
|
|
5
|
-
gem "sqlite3", "~> 1.4"
|
|
6
5
|
gem "activesupport", "~> 7.2.0"
|
|
7
6
|
gem "activemodel", "~> 7.2.0"
|
|
8
7
|
gem "activerecord", "~> 7.2.0", group: :test
|
|
8
|
+
gem "trilogy"
|
|
9
|
+
gem "sqlite3", "~> 1.4"
|
|
9
10
|
|
|
10
11
|
group :benchmarks do
|
|
11
12
|
gem "vernier"
|
|
@@ -19,6 +20,7 @@ end
|
|
|
19
20
|
|
|
20
21
|
group :test do
|
|
21
22
|
gem "faker"
|
|
23
|
+
gem "temping"
|
|
22
24
|
end
|
|
23
25
|
|
|
24
26
|
group :development do
|
data/gemfiles/7.2.0.gemfile.lock
CHANGED
|
@@ -8,35 +8,37 @@ PATH
|
|
|
8
8
|
GEM
|
|
9
9
|
remote: https://rubygems.org/
|
|
10
10
|
specs:
|
|
11
|
-
actionpack (7.2.
|
|
12
|
-
actionview (= 7.2.
|
|
13
|
-
activesupport (= 7.2.
|
|
11
|
+
actionpack (7.2.3)
|
|
12
|
+
actionview (= 7.2.3)
|
|
13
|
+
activesupport (= 7.2.3)
|
|
14
|
+
cgi
|
|
14
15
|
nokogiri (>= 1.8.5)
|
|
15
16
|
racc
|
|
16
|
-
rack (>= 2.2.4, < 3.
|
|
17
|
+
rack (>= 2.2.4, < 3.3)
|
|
17
18
|
rack-session (>= 1.0.1)
|
|
18
19
|
rack-test (>= 0.6.3)
|
|
19
20
|
rails-dom-testing (~> 2.2)
|
|
20
21
|
rails-html-sanitizer (~> 1.6)
|
|
21
22
|
useragent (~> 0.16)
|
|
22
|
-
actionview (7.2.
|
|
23
|
-
activesupport (= 7.2.
|
|
23
|
+
actionview (7.2.3)
|
|
24
|
+
activesupport (= 7.2.3)
|
|
24
25
|
builder (~> 3.1)
|
|
26
|
+
cgi
|
|
25
27
|
erubi (~> 1.11)
|
|
26
28
|
rails-dom-testing (~> 2.2)
|
|
27
29
|
rails-html-sanitizer (~> 1.6)
|
|
28
|
-
active_model_serializers (0.10.
|
|
30
|
+
active_model_serializers (0.10.15)
|
|
29
31
|
actionpack (>= 4.1)
|
|
30
32
|
activemodel (>= 4.1)
|
|
31
33
|
case_transform (>= 0.2)
|
|
32
34
|
jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
|
|
33
|
-
activemodel (7.2.
|
|
34
|
-
activesupport (= 7.2.
|
|
35
|
-
activerecord (7.2.
|
|
36
|
-
activemodel (= 7.2.
|
|
37
|
-
activesupport (= 7.2.
|
|
35
|
+
activemodel (7.2.3)
|
|
36
|
+
activesupport (= 7.2.3)
|
|
37
|
+
activerecord (7.2.3)
|
|
38
|
+
activemodel (= 7.2.3)
|
|
39
|
+
activesupport (= 7.2.3)
|
|
38
40
|
timeout (>= 0.4.0)
|
|
39
|
-
activesupport (7.2.
|
|
41
|
+
activesupport (7.2.3)
|
|
40
42
|
base64
|
|
41
43
|
benchmark (>= 0.3)
|
|
42
44
|
bigdecimal
|
|
@@ -52,122 +54,141 @@ GEM
|
|
|
52
54
|
bundler
|
|
53
55
|
rake
|
|
54
56
|
thor (>= 0.14.0)
|
|
55
|
-
ast (2.4.
|
|
56
|
-
base64 (0.
|
|
57
|
-
benchmark (0.
|
|
57
|
+
ast (2.4.3)
|
|
58
|
+
base64 (0.3.0)
|
|
59
|
+
benchmark (0.5.0)
|
|
58
60
|
benchmark-ips (2.14.0)
|
|
59
|
-
bigdecimal (3.1
|
|
61
|
+
bigdecimal (3.3.1)
|
|
60
62
|
builder (3.3.0)
|
|
61
|
-
byebug (
|
|
63
|
+
byebug (12.0.0)
|
|
62
64
|
case_transform (0.2)
|
|
63
65
|
activesupport
|
|
64
|
-
|
|
65
|
-
|
|
66
|
+
cgi (0.5.0)
|
|
67
|
+
concurrent-ruby (1.3.5)
|
|
68
|
+
connection_pool (2.5.4)
|
|
66
69
|
crass (1.0.6)
|
|
67
|
-
diff-lcs (1.
|
|
68
|
-
drb (2.2.
|
|
69
|
-
erubi (1.13.
|
|
70
|
-
faker (3.5.
|
|
70
|
+
diff-lcs (1.6.2)
|
|
71
|
+
drb (2.2.3)
|
|
72
|
+
erubi (1.13.1)
|
|
73
|
+
faker (3.5.2)
|
|
71
74
|
i18n (>= 1.8.11, < 2)
|
|
72
|
-
i18n (1.14.
|
|
75
|
+
i18n (1.14.7)
|
|
73
76
|
concurrent-ruby (~> 1.0)
|
|
74
|
-
json (2.
|
|
77
|
+
json (2.13.2)
|
|
75
78
|
jsonapi-renderer (0.2.2)
|
|
76
|
-
language_server-protocol (3.17.0.
|
|
79
|
+
language_server-protocol (3.17.0.5)
|
|
77
80
|
lint_roller (1.1.0)
|
|
78
|
-
logger (1.
|
|
79
|
-
loofah (2.
|
|
81
|
+
logger (1.7.0)
|
|
82
|
+
loofah (2.24.1)
|
|
80
83
|
crass (~> 1.0.2)
|
|
81
84
|
nokogiri (>= 1.12.0)
|
|
82
85
|
memory_profiler (1.1.0)
|
|
83
|
-
|
|
84
|
-
|
|
86
|
+
mini_portile2 (2.8.9)
|
|
87
|
+
minitest (5.26.2)
|
|
88
|
+
nokogiri (1.18.9-arm64-darwin)
|
|
85
89
|
racc (~> 1.4)
|
|
86
|
-
|
|
90
|
+
nokogiri (1.18.9-x86_64-linux-gnu)
|
|
91
|
+
racc (~> 1.4)
|
|
92
|
+
oj (3.16.11)
|
|
87
93
|
bigdecimal (>= 3.0)
|
|
88
94
|
ostruct (>= 0.2)
|
|
89
|
-
ostruct (0.6.
|
|
90
|
-
parallel (1.
|
|
91
|
-
parser (3.3.
|
|
95
|
+
ostruct (0.6.3)
|
|
96
|
+
parallel (1.27.0)
|
|
97
|
+
parser (3.3.9.0)
|
|
92
98
|
ast (~> 2.4.1)
|
|
93
99
|
racc
|
|
94
|
-
pg (1.
|
|
100
|
+
pg (1.6.1-arm64-darwin)
|
|
101
|
+
pg (1.6.1-x86_64-linux)
|
|
102
|
+
prism (1.4.0)
|
|
95
103
|
racc (1.8.1)
|
|
96
|
-
rack (3.1.
|
|
97
|
-
rack-session (2.
|
|
104
|
+
rack (3.1.16)
|
|
105
|
+
rack-session (2.1.1)
|
|
106
|
+
base64 (>= 0.1.0)
|
|
98
107
|
rack (>= 3.0.0)
|
|
99
|
-
rack-test (2.
|
|
108
|
+
rack-test (2.2.0)
|
|
100
109
|
rack (>= 1.3)
|
|
101
|
-
rails-dom-testing (2.
|
|
110
|
+
rails-dom-testing (2.3.0)
|
|
102
111
|
activesupport (>= 5.0.0)
|
|
103
112
|
minitest
|
|
104
113
|
nokogiri (>= 1.6)
|
|
105
|
-
rails-html-sanitizer (1.6.
|
|
114
|
+
rails-html-sanitizer (1.6.2)
|
|
106
115
|
loofah (~> 2.21)
|
|
107
|
-
nokogiri (
|
|
116
|
+
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
|
|
108
117
|
rainbow (3.1.1)
|
|
109
|
-
rake (13.
|
|
110
|
-
rake-compiler (1.
|
|
118
|
+
rake (13.3.0)
|
|
119
|
+
rake-compiler (1.3.0)
|
|
111
120
|
rake
|
|
112
|
-
regexp_parser (2.
|
|
113
|
-
rspec (3.13.
|
|
121
|
+
regexp_parser (2.11.2)
|
|
122
|
+
rspec (3.13.1)
|
|
114
123
|
rspec-core (~> 3.13.0)
|
|
115
124
|
rspec-expectations (~> 3.13.0)
|
|
116
125
|
rspec-mocks (~> 3.13.0)
|
|
117
|
-
rspec-core (3.13.
|
|
126
|
+
rspec-core (3.13.5)
|
|
118
127
|
rspec-support (~> 3.13.0)
|
|
119
|
-
rspec-expectations (3.13.
|
|
128
|
+
rspec-expectations (3.13.5)
|
|
120
129
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
121
130
|
rspec-support (~> 3.13.0)
|
|
122
|
-
rspec-mocks (3.13.
|
|
131
|
+
rspec-mocks (3.13.5)
|
|
123
132
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
124
133
|
rspec-support (~> 3.13.0)
|
|
125
|
-
rspec-support (3.13.
|
|
126
|
-
rubocop (1.
|
|
134
|
+
rspec-support (3.13.5)
|
|
135
|
+
rubocop (1.75.8)
|
|
127
136
|
json (~> 2.3)
|
|
128
|
-
language_server-protocol (
|
|
137
|
+
language_server-protocol (~> 3.17.0.2)
|
|
138
|
+
lint_roller (~> 1.1.0)
|
|
129
139
|
parallel (~> 1.10)
|
|
130
140
|
parser (>= 3.3.0.2)
|
|
131
141
|
rainbow (>= 2.2.2, < 4.0)
|
|
132
|
-
regexp_parser (>= 2.
|
|
133
|
-
rubocop-ast (>= 1.
|
|
142
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
|
143
|
+
rubocop-ast (>= 1.44.0, < 2.0)
|
|
134
144
|
ruby-progressbar (~> 1.7)
|
|
135
|
-
unicode-display_width (>= 2.4.0, <
|
|
136
|
-
rubocop-ast (1.
|
|
137
|
-
parser (>= 3.3.
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
rubocop (
|
|
145
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
|
146
|
+
rubocop-ast (1.46.0)
|
|
147
|
+
parser (>= 3.3.7.2)
|
|
148
|
+
prism (~> 1.4)
|
|
149
|
+
rubocop-performance (1.25.0)
|
|
150
|
+
lint_roller (~> 1.1)
|
|
151
|
+
rubocop (>= 1.75.0, < 2.0)
|
|
152
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
|
153
|
+
rubocop-rspec (3.6.0)
|
|
154
|
+
lint_roller (~> 1.1)
|
|
155
|
+
rubocop (~> 1.72, >= 1.72.1)
|
|
143
156
|
ruby-progressbar (1.13.0)
|
|
144
|
-
securerandom (0.4.
|
|
145
|
-
sqlite3 (1.7.3
|
|
146
|
-
|
|
147
|
-
|
|
157
|
+
securerandom (0.4.1)
|
|
158
|
+
sqlite3 (1.7.3)
|
|
159
|
+
mini_portile2 (~> 2.8.0)
|
|
160
|
+
stackprof (0.2.27)
|
|
161
|
+
standard (1.50.0)
|
|
148
162
|
language_server-protocol (~> 3.17.0.2)
|
|
149
163
|
lint_roller (~> 1.0)
|
|
150
|
-
rubocop (~> 1.
|
|
164
|
+
rubocop (~> 1.75.5)
|
|
151
165
|
standard-custom (~> 1.0.0)
|
|
152
|
-
standard-performance (~> 1.
|
|
166
|
+
standard-performance (~> 1.8)
|
|
153
167
|
standard-custom (1.0.2)
|
|
154
168
|
lint_roller (~> 1.0)
|
|
155
169
|
rubocop (~> 1.50)
|
|
156
|
-
standard-performance (1.
|
|
170
|
+
standard-performance (1.8.0)
|
|
157
171
|
lint_roller (~> 1.1)
|
|
158
|
-
rubocop-performance (~> 1.
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
172
|
+
rubocop-performance (~> 1.25.0)
|
|
173
|
+
temping (4.3.0)
|
|
174
|
+
activerecord (>= 6.0, < 8.1)
|
|
175
|
+
activesupport (>= 6.0, < 8.1)
|
|
176
|
+
terminal-table (4.0.0)
|
|
177
|
+
unicode-display_width (>= 1.1.1, < 4)
|
|
178
|
+
thor (1.4.0)
|
|
179
|
+
timeout (0.4.4)
|
|
180
|
+
trilogy (2.9.0)
|
|
163
181
|
tzinfo (2.0.6)
|
|
164
182
|
concurrent-ruby (~> 1.0)
|
|
165
|
-
unicode-display_width (
|
|
166
|
-
|
|
167
|
-
|
|
183
|
+
unicode-display_width (3.1.5)
|
|
184
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
|
185
|
+
unicode-emoji (4.0.4)
|
|
186
|
+
useragent (0.16.11)
|
|
187
|
+
vernier (1.8.0)
|
|
168
188
|
|
|
169
189
|
PLATFORMS
|
|
170
190
|
arm64-darwin
|
|
191
|
+
x86_64-linux
|
|
171
192
|
|
|
172
193
|
DEPENDENCIES
|
|
173
194
|
active_model_serializers (~> 0.10)
|
|
@@ -191,8 +212,10 @@ DEPENDENCIES
|
|
|
191
212
|
stackprof
|
|
192
213
|
standard
|
|
193
214
|
standard-performance
|
|
215
|
+
temping
|
|
194
216
|
terminal-table
|
|
217
|
+
trilogy
|
|
195
218
|
vernier
|
|
196
219
|
|
|
197
220
|
BUNDLED WITH
|
|
198
|
-
2.
|
|
221
|
+
2.7.2
|
data/gemfiles/8.0.0.gemfile
CHANGED
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
source "https://rubygems.org"
|
|
4
4
|
|
|
5
|
-
gem "sqlite3", ">= 2.1"
|
|
6
5
|
gem "activesupport", "~> 8.0.0"
|
|
7
6
|
gem "activemodel", "~> 8.0.0"
|
|
8
7
|
gem "activerecord", "~> 8.0.0", group: :test
|
|
8
|
+
gem "trilogy"
|
|
9
|
+
gem "sqlite3", ">= 2.1"
|
|
9
10
|
|
|
10
11
|
group :benchmarks do
|
|
11
12
|
gem "vernier"
|
|
@@ -19,6 +20,7 @@ end
|
|
|
19
20
|
|
|
20
21
|
group :test do
|
|
21
22
|
gem "faker"
|
|
23
|
+
gem "temping"
|
|
22
24
|
end
|
|
23
25
|
|
|
24
26
|
group :development do
|