torque-postgresql 4.0.1 → 4.1.0
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/Rakefile +24 -0
- data/lib/torque/postgresql/adapter/database_statements.rb +89 -7
- data/lib/torque/postgresql/adapter/inheritance_statements.rb +297 -0
- data/lib/torque/postgresql/adapter/oid/array.rb +17 -0
- data/lib/torque/postgresql/adapter/oid/box.rb +1 -1
- data/lib/torque/postgresql/adapter/oid/circle.rb +1 -1
- data/lib/torque/postgresql/adapter/oid/composite.rb +116 -0
- data/lib/torque/postgresql/adapter/oid/line.rb +1 -1
- data/lib/torque/postgresql/adapter/oid/lquery.rb +53 -0
- data/lib/torque/postgresql/adapter/oid/ltree.rb +53 -0
- data/lib/torque/postgresql/adapter/oid/segment.rb +1 -1
- data/lib/torque/postgresql/adapter/oid/struct.rb +150 -0
- data/lib/torque/postgresql/adapter/oid/struct_list.rb +52 -0
- data/lib/torque/postgresql/adapter/oid/struct_set.rb +38 -0
- data/lib/torque/postgresql/adapter/quoting.rb +11 -2
- data/lib/torque/postgresql/adapter/schema_definitions.rb +46 -0
- data/lib/torque/postgresql/adapter/schema_dumper.rb +26 -0
- data/lib/torque/postgresql/adapter/schema_statements.rb +207 -0
- data/lib/torque/postgresql/adapter.rb +2 -5
- data/lib/torque/postgresql/arel/nodes.rb +63 -1
- data/lib/torque/postgresql/arel/visitors.rb +19 -8
- data/lib/torque/postgresql/associations/join_dependency.rb +55 -0
- data/lib/torque/postgresql/associations.rb +3 -0
- data/lib/torque/postgresql/attributes/base.rb +94 -0
- data/lib/torque/postgresql/attributes/composite.rb +102 -0
- data/lib/torque/postgresql/attributes/enum.rb +13 -2
- data/lib/torque/postgresql/attributes/lquery.rb +180 -0
- data/lib/torque/postgresql/attributes/ltree.rb +169 -0
- data/lib/torque/postgresql/attributes/simple_enum.rb +72 -0
- data/lib/torque/postgresql/attributes/struct.rb +137 -0
- data/lib/torque/postgresql/base.rb +17 -14
- data/lib/torque/postgresql/config.rb +81 -14
- data/lib/torque/postgresql/inheritance/expander.rb +66 -0
- data/lib/torque/postgresql/inheritance/record.rb +52 -0
- data/lib/torque/postgresql/inheritance.rb +138 -65
- data/lib/torque/postgresql/migration/command_recorder.rb +76 -0
- data/lib/torque/postgresql/predicate_builder/composite_handler.rb +109 -0
- data/lib/torque/postgresql/predicate_builder/ltree_handler.rb +44 -0
- data/lib/torque/postgresql/predicate_builder/struct_handler.rb +68 -0
- data/lib/torque/postgresql/predicate_builder.rb +26 -0
- data/lib/torque/postgresql/predicate_table.rb +61 -0
- data/lib/torque/postgresql/railtie.rb +35 -0
- data/lib/torque/postgresql/relation/inheritance.rb +146 -28
- data/lib/torque/postgresql/relation/merger.rb +21 -5
- data/lib/torque/postgresql/relation.rb +12 -11
- data/lib/torque/postgresql/schema_cache.rb +1 -0
- data/lib/torque/postgresql/validations.rb +29 -0
- data/lib/torque/postgresql/version.rb +1 -1
- data/lib/torque/postgresql/versioned_commands/command_migration.rb +1 -1
- data/lib/torque/postgresql.rb +6 -0
- data/spec/initialize.rb +20 -2
- data/spec/mocks/cache_query.rb +12 -0
- data/spec/models/author.rb +1 -1
- data/spec/models/comment.rb +2 -0
- data/spec/models/place.rb +2 -0
- data/spec/models/profile.rb +31 -0
- data/spec/schema.rb +33 -4
- data/spec/tests/arel_spec.rb +5 -3
- data/spec/tests/composite_spec.rb +800 -0
- data/spec/tests/ltree_spec.rb +552 -0
- data/spec/tests/struct_spec.rb +968 -0
- data/spec/tests/table_inheritance_spec.rb +1027 -56
- metadata +47 -2
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: torque-postgresql
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.0
|
|
4
|
+
version: 4.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Carlos Silva
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 2026-08-14 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: rails
|
|
@@ -37,6 +37,20 @@ dependencies:
|
|
|
37
37
|
- - ">="
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
39
|
version: '1.2'
|
|
40
|
+
- !ruby/object:Gem::Dependency
|
|
41
|
+
name: ostruct
|
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - ">="
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: '0.6'
|
|
47
|
+
type: :runtime
|
|
48
|
+
prerelease: false
|
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
50
|
+
requirements:
|
|
51
|
+
- - ">="
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: '0.6'
|
|
40
54
|
- !ruby/object:Gem::Dependency
|
|
41
55
|
name: rake
|
|
42
56
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -142,16 +156,23 @@ files:
|
|
|
142
156
|
- lib/torque/postgresql.rb
|
|
143
157
|
- lib/torque/postgresql/adapter.rb
|
|
144
158
|
- lib/torque/postgresql/adapter/database_statements.rb
|
|
159
|
+
- lib/torque/postgresql/adapter/inheritance_statements.rb
|
|
145
160
|
- lib/torque/postgresql/adapter/oid.rb
|
|
146
161
|
- lib/torque/postgresql/adapter/oid/array.rb
|
|
147
162
|
- lib/torque/postgresql/adapter/oid/box.rb
|
|
148
163
|
- lib/torque/postgresql/adapter/oid/circle.rb
|
|
164
|
+
- lib/torque/postgresql/adapter/oid/composite.rb
|
|
149
165
|
- lib/torque/postgresql/adapter/oid/enum.rb
|
|
150
166
|
- lib/torque/postgresql/adapter/oid/enum_set.rb
|
|
151
167
|
- lib/torque/postgresql/adapter/oid/interval.rb
|
|
152
168
|
- lib/torque/postgresql/adapter/oid/line.rb
|
|
169
|
+
- lib/torque/postgresql/adapter/oid/lquery.rb
|
|
170
|
+
- lib/torque/postgresql/adapter/oid/ltree.rb
|
|
153
171
|
- lib/torque/postgresql/adapter/oid/range.rb
|
|
154
172
|
- lib/torque/postgresql/adapter/oid/segment.rb
|
|
173
|
+
- lib/torque/postgresql/adapter/oid/struct.rb
|
|
174
|
+
- lib/torque/postgresql/adapter/oid/struct_list.rb
|
|
175
|
+
- lib/torque/postgresql/adapter/oid/struct_set.rb
|
|
155
176
|
- lib/torque/postgresql/adapter/quoting.rb
|
|
156
177
|
- lib/torque/postgresql/adapter/schema_creation.rb
|
|
157
178
|
- lib/torque/postgresql/adapter/schema_definitions.rb
|
|
@@ -172,19 +193,26 @@ files:
|
|
|
172
193
|
- lib/torque/postgresql/associations/builder/belongs_to_many.rb
|
|
173
194
|
- lib/torque/postgresql/associations/builder/has_many.rb
|
|
174
195
|
- lib/torque/postgresql/associations/foreign_association.rb
|
|
196
|
+
- lib/torque/postgresql/associations/join_dependency.rb
|
|
175
197
|
- lib/torque/postgresql/associations/preloader.rb
|
|
176
198
|
- lib/torque/postgresql/associations/preloader/association.rb
|
|
177
199
|
- lib/torque/postgresql/associations/preloader/loader_query.rb
|
|
178
200
|
- lib/torque/postgresql/attributes.rb
|
|
201
|
+
- lib/torque/postgresql/attributes/base.rb
|
|
179
202
|
- lib/torque/postgresql/attributes/builder.rb
|
|
180
203
|
- lib/torque/postgresql/attributes/builder/enum.rb
|
|
181
204
|
- lib/torque/postgresql/attributes/builder/full_text_search.rb
|
|
182
205
|
- lib/torque/postgresql/attributes/builder/period.rb
|
|
206
|
+
- lib/torque/postgresql/attributes/composite.rb
|
|
183
207
|
- lib/torque/postgresql/attributes/enum.rb
|
|
184
208
|
- lib/torque/postgresql/attributes/enum_set.rb
|
|
185
209
|
- lib/torque/postgresql/attributes/full_text_search.rb
|
|
186
210
|
- lib/torque/postgresql/attributes/lazy.rb
|
|
211
|
+
- lib/torque/postgresql/attributes/lquery.rb
|
|
212
|
+
- lib/torque/postgresql/attributes/ltree.rb
|
|
187
213
|
- lib/torque/postgresql/attributes/period.rb
|
|
214
|
+
- lib/torque/postgresql/attributes/simple_enum.rb
|
|
215
|
+
- lib/torque/postgresql/attributes/struct.rb
|
|
188
216
|
- lib/torque/postgresql/autosave_association.rb
|
|
189
217
|
- lib/torque/postgresql/auxiliary_statement.rb
|
|
190
218
|
- lib/torque/postgresql/auxiliary_statement/recursive.rb
|
|
@@ -196,14 +224,20 @@ files:
|
|
|
196
224
|
- lib/torque/postgresql/geometry_builder.rb
|
|
197
225
|
- lib/torque/postgresql/i18n.rb
|
|
198
226
|
- lib/torque/postgresql/inheritance.rb
|
|
227
|
+
- lib/torque/postgresql/inheritance/expander.rb
|
|
228
|
+
- lib/torque/postgresql/inheritance/record.rb
|
|
199
229
|
- lib/torque/postgresql/insert_all.rb
|
|
200
230
|
- lib/torque/postgresql/migration.rb
|
|
201
231
|
- lib/torque/postgresql/migration/command_recorder.rb
|
|
202
232
|
- lib/torque/postgresql/predicate_builder.rb
|
|
203
233
|
- lib/torque/postgresql/predicate_builder/arel_attribute_handler.rb
|
|
204
234
|
- lib/torque/postgresql/predicate_builder/array_handler.rb
|
|
235
|
+
- lib/torque/postgresql/predicate_builder/composite_handler.rb
|
|
205
236
|
- lib/torque/postgresql/predicate_builder/enumerator_lazy_handler.rb
|
|
237
|
+
- lib/torque/postgresql/predicate_builder/ltree_handler.rb
|
|
206
238
|
- lib/torque/postgresql/predicate_builder/regexp_handler.rb
|
|
239
|
+
- lib/torque/postgresql/predicate_builder/struct_handler.rb
|
|
240
|
+
- lib/torque/postgresql/predicate_table.rb
|
|
207
241
|
- lib/torque/postgresql/railtie.rb
|
|
208
242
|
- lib/torque/postgresql/reflection.rb
|
|
209
243
|
- lib/torque/postgresql/reflection/abstract_reflection.rb
|
|
@@ -224,6 +258,7 @@ files:
|
|
|
224
258
|
- lib/torque/postgresql/schema_cache/inheritance.rb
|
|
225
259
|
- lib/torque/postgresql/schema_cache/schema_reflection.rb
|
|
226
260
|
- lib/torque/postgresql/table_name.rb
|
|
261
|
+
- lib/torque/postgresql/validations.rb
|
|
227
262
|
- lib/torque/postgresql/version.rb
|
|
228
263
|
- lib/torque/postgresql/versioned_commands.rb
|
|
229
264
|
- lib/torque/postgresql/versioned_commands/command_migration.rb
|
|
@@ -263,7 +298,9 @@ files:
|
|
|
263
298
|
- spec/models/guest_comment.rb
|
|
264
299
|
- spec/models/internal/user.rb
|
|
265
300
|
- spec/models/item.rb
|
|
301
|
+
- spec/models/place.rb
|
|
266
302
|
- spec/models/post.rb
|
|
303
|
+
- spec/models/profile.rb
|
|
267
304
|
- spec/models/question.rb
|
|
268
305
|
- spec/models/question_select.rb
|
|
269
306
|
- spec/models/tag.rb
|
|
@@ -277,6 +314,7 @@ files:
|
|
|
277
314
|
- spec/tests/auxiliary_statement_spec.rb
|
|
278
315
|
- spec/tests/belongs_to_many_spec.rb
|
|
279
316
|
- spec/tests/collector_spec.rb
|
|
317
|
+
- spec/tests/composite_spec.rb
|
|
280
318
|
- spec/tests/distinct_on_spec.rb
|
|
281
319
|
- spec/tests/enum_set_spec.rb
|
|
282
320
|
- spec/tests/enum_spec.rb
|
|
@@ -287,11 +325,13 @@ files:
|
|
|
287
325
|
- spec/tests/insert_all_spec.rb
|
|
288
326
|
- spec/tests/interval_spec.rb
|
|
289
327
|
- spec/tests/lazy_spec.rb
|
|
328
|
+
- spec/tests/ltree_spec.rb
|
|
290
329
|
- spec/tests/period_spec.rb
|
|
291
330
|
- spec/tests/predicate_builder_spec.rb
|
|
292
331
|
- spec/tests/quoting_spec.rb
|
|
293
332
|
- spec/tests/relation_spec.rb
|
|
294
333
|
- spec/tests/schema_spec.rb
|
|
334
|
+
- spec/tests/struct_spec.rb
|
|
295
335
|
- spec/tests/table_inheritance_spec.rb
|
|
296
336
|
- spec/tests/versioned_commands_spec.rb
|
|
297
337
|
homepage: https://github.com/crashtech/torque-postgresql
|
|
@@ -354,7 +394,9 @@ test_files:
|
|
|
354
394
|
- spec/models/guest_comment.rb
|
|
355
395
|
- spec/models/internal/user.rb
|
|
356
396
|
- spec/models/item.rb
|
|
397
|
+
- spec/models/place.rb
|
|
357
398
|
- spec/models/post.rb
|
|
399
|
+
- spec/models/profile.rb
|
|
358
400
|
- spec/models/question.rb
|
|
359
401
|
- spec/models/question_select.rb
|
|
360
402
|
- spec/models/tag.rb
|
|
@@ -368,6 +410,7 @@ test_files:
|
|
|
368
410
|
- spec/tests/auxiliary_statement_spec.rb
|
|
369
411
|
- spec/tests/belongs_to_many_spec.rb
|
|
370
412
|
- spec/tests/collector_spec.rb
|
|
413
|
+
- spec/tests/composite_spec.rb
|
|
371
414
|
- spec/tests/distinct_on_spec.rb
|
|
372
415
|
- spec/tests/enum_set_spec.rb
|
|
373
416
|
- spec/tests/enum_spec.rb
|
|
@@ -378,10 +421,12 @@ test_files:
|
|
|
378
421
|
- spec/tests/insert_all_spec.rb
|
|
379
422
|
- spec/tests/interval_spec.rb
|
|
380
423
|
- spec/tests/lazy_spec.rb
|
|
424
|
+
- spec/tests/ltree_spec.rb
|
|
381
425
|
- spec/tests/period_spec.rb
|
|
382
426
|
- spec/tests/predicate_builder_spec.rb
|
|
383
427
|
- spec/tests/quoting_spec.rb
|
|
384
428
|
- spec/tests/relation_spec.rb
|
|
385
429
|
- spec/tests/schema_spec.rb
|
|
430
|
+
- spec/tests/struct_spec.rb
|
|
386
431
|
- spec/tests/table_inheritance_spec.rb
|
|
387
432
|
- spec/tests/versioned_commands_spec.rb
|