duck_record 0.0.9.1 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +13 -13
- data/lib/duck_record/associations/association.rb +15 -15
- data/lib/duck_record/associations/collection_association.rb +8 -8
- data/lib/duck_record/associations/collection_proxy.rb +1 -1
- data/lib/duck_record/associations/has_many_association.rb +0 -1
- data/lib/duck_record/associations/singular_association.rb +6 -6
- data/lib/duck_record/attribute/user_provided_default.rb +2 -2
- data/lib/duck_record/attribute.rb +70 -70
- data/lib/duck_record/attribute_assignment.rb +74 -74
- data/lib/duck_record/attribute_methods/before_type_cast.rb +9 -9
- data/lib/duck_record/attribute_methods/dirty.rb +29 -29
- data/lib/duck_record/attribute_methods/read.rb +27 -27
- data/lib/duck_record/attribute_methods/write.rb +20 -20
- data/lib/duck_record/attribute_methods.rb +8 -8
- data/lib/duck_record/attribute_mutation_tracker.rb +4 -4
- data/lib/duck_record/attribute_set/yaml_encoder.rb +5 -5
- data/lib/duck_record/attribute_set.rb +5 -5
- data/lib/duck_record/attributes.rb +14 -14
- data/lib/duck_record/base.rb +18 -18
- data/lib/duck_record/callbacks.rb +1 -1
- data/lib/duck_record/core.rb +35 -35
- data/lib/duck_record/inheritance.rb +25 -25
- data/lib/duck_record/model_schema.rb +10 -11
- data/lib/duck_record/nested_attributes.rb +149 -149
- data/lib/duck_record/reflection.rb +14 -14
- data/lib/duck_record/type/array.rb +6 -6
- data/lib/duck_record/type/registry.rb +21 -21
- data/lib/duck_record/type/serialized.rb +8 -8
- data/lib/duck_record/type/time.rb +0 -1
- data/lib/duck_record/type/unsigned_integer.rb +6 -6
- data/lib/duck_record/type.rb +16 -14
- data/lib/duck_record/validations/uniqueness_on_real_record.rb +45 -45
- data/lib/duck_record/validations.rb +6 -6
- data/lib/duck_record/version.rb +1 -1
- data/lib/duck_record.rb +7 -7
- metadata +7 -6
@@ -317,7 +317,7 @@ module DuckRecord
|
|
317
317
|
# # creates avatar_attributes= and posts_attributes=
|
318
318
|
# accepts_nested_attributes_for :avatar, :posts, allow_destroy: true
|
319
319
|
def accepts_nested_attributes_for(*attr_names)
|
320
|
-
options = {allow_destroy: false}
|
320
|
+
options = { allow_destroy: false }
|
321
321
|
options.update(attr_names.extract_options!)
|
322
322
|
options.assert_valid_keys(:reject_if, :limit, :allow_destroy)
|
323
323
|
options[:reject_if] = REJECT_ALL_BLANK_PROC if options[:reject_if] == :all_blank
|
@@ -340,19 +340,19 @@ module DuckRecord
|
|
340
340
|
|
341
341
|
private
|
342
342
|
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
343
|
+
# Generates a writer method for this association. Serves as a point for
|
344
|
+
# accessing the objects in the association. For example, this method
|
345
|
+
# could generate the following:
|
346
|
+
#
|
347
|
+
# def pirate_attributes=(attributes)
|
348
|
+
# assign_nested_attributes_for_one_to_one_association(:pirate, attributes)
|
349
|
+
# end
|
350
|
+
#
|
351
|
+
# This redirects the attempts to write objects in an association through
|
352
|
+
# the helper methods defined below. Makes it seem like the nested
|
353
|
+
# associations are just regular associations.
|
354
|
+
def generate_association_writer(association_name, type)
|
355
|
+
generated_association_methods.module_eval <<-eoruby, __FILE__, __LINE__ + 1
|
356
356
|
if method_defined?(:#{association_name}_attributes=)
|
357
357
|
remove_method(:#{association_name}_attributes=)
|
358
358
|
end
|
@@ -360,7 +360,7 @@ module DuckRecord
|
|
360
360
|
assign_nested_attributes_for_#{type}_association(:#{association_name}, attributes)
|
361
361
|
end
|
362
362
|
eoruby
|
363
|
-
|
363
|
+
end
|
364
364
|
end
|
365
365
|
|
366
366
|
# Marks this record to be destroyed as part of the parent's save transaction.
|
@@ -390,166 +390,166 @@ module DuckRecord
|
|
390
390
|
|
391
391
|
private
|
392
392
|
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
# Assigns the given attributes to the association.
|
398
|
-
#
|
399
|
-
# If an associated record does not yet exist, one will be instantiated. If
|
400
|
-
# an associated record already exists, the method's behavior depends on
|
401
|
-
# the value of the update_only option. If update_only is +false+ and the
|
402
|
-
# given attributes include an <tt>:id</tt> that matches the existing record's
|
403
|
-
# id, then the existing record will be modified. If no <tt>:id</tt> is provided
|
404
|
-
# it will be replaced with a new record. If update_only is +true+ the existing
|
405
|
-
# record will be modified regardless of whether an <tt>:id</tt> is provided.
|
406
|
-
#
|
407
|
-
# If the given attributes include a matching <tt>:id</tt> attribute, or
|
408
|
-
# update_only is true, and a <tt>:_destroy</tt> key set to a truthy value,
|
409
|
-
# then the existing record will be marked for destruction.
|
410
|
-
def assign_nested_attributes_for_one_to_one_association(association_name, attributes)
|
411
|
-
if attributes.respond_to?(:permitted?)
|
412
|
-
attributes = attributes.to_h
|
413
|
-
end
|
414
|
-
attributes = attributes.with_indifferent_access
|
415
|
-
existing_record = send(association_name)
|
393
|
+
# Attribute hash keys that should not be assigned as normal attributes.
|
394
|
+
# These hash keys are nested attributes implementation details.
|
395
|
+
UNASSIGNABLE_KEYS = %w( _destroy )
|
416
396
|
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
397
|
+
# Assigns the given attributes to the association.
|
398
|
+
#
|
399
|
+
# If an associated record does not yet exist, one will be instantiated. If
|
400
|
+
# an associated record already exists, the method's behavior depends on
|
401
|
+
# the value of the update_only option. If update_only is +false+ and the
|
402
|
+
# given attributes include an <tt>:id</tt> that matches the existing record's
|
403
|
+
# id, then the existing record will be modified. If no <tt>:id</tt> is provided
|
404
|
+
# it will be replaced with a new record. If update_only is +true+ the existing
|
405
|
+
# record will be modified regardless of whether an <tt>:id</tt> is provided.
|
406
|
+
#
|
407
|
+
# If the given attributes include a matching <tt>:id</tt> attribute, or
|
408
|
+
# update_only is true, and a <tt>:_destroy</tt> key set to a truthy value,
|
409
|
+
# then the existing record will be marked for destruction.
|
410
|
+
def assign_nested_attributes_for_one_to_one_association(association_name, attributes)
|
411
|
+
if attributes.respond_to?(:permitted?)
|
412
|
+
attributes = attributes.to_h
|
413
|
+
end
|
414
|
+
attributes = attributes.with_indifferent_access
|
415
|
+
existing_record = send(association_name)
|
421
416
|
|
422
|
-
if
|
423
|
-
|
417
|
+
if reject_new_record?(association_name, attributes)
|
418
|
+
send("#{association_name}=", nil)
|
424
419
|
else
|
425
|
-
|
426
|
-
|
427
|
-
|
420
|
+
assignable_attributes = attributes.except(*UNASSIGNABLE_KEYS)
|
421
|
+
|
422
|
+
if existing_record
|
423
|
+
existing_record.assign_attributes(assignable_attributes)
|
428
424
|
else
|
429
|
-
|
425
|
+
method = "build_#{association_name}"
|
426
|
+
if respond_to?(method)
|
427
|
+
send(method, assignable_attributes)
|
428
|
+
else
|
429
|
+
raise ArgumentError, "Cannot build association `#{association_name}'. Are you trying to build a polymorphic one-to-one association?"
|
430
|
+
end
|
430
431
|
end
|
431
432
|
end
|
432
433
|
end
|
433
|
-
end
|
434
434
|
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
435
|
+
# Assigns the given attributes to the collection association.
|
436
|
+
#
|
437
|
+
# Hashes with an <tt>:id</tt> value matching an existing associated record
|
438
|
+
# will update that record. Hashes without an <tt>:id</tt> value will build
|
439
|
+
# a new record for the association. Hashes with a matching <tt>:id</tt>
|
440
|
+
# value and a <tt>:_destroy</tt> key set to a truthy value will mark the
|
441
|
+
# matched record for destruction.
|
442
|
+
#
|
443
|
+
# For example:
|
444
|
+
#
|
445
|
+
# assign_nested_attributes_for_collection_association(:people, {
|
446
|
+
# '1' => { id: '1', name: 'Peter' },
|
447
|
+
# '2' => { name: 'John' },
|
448
|
+
# '3' => { id: '2', _destroy: true }
|
449
|
+
# })
|
450
|
+
#
|
451
|
+
# Will update the name of the Person with ID 1, build a new associated
|
452
|
+
# person with the name 'John', and mark the associated Person with ID 2
|
453
|
+
# for destruction.
|
454
|
+
#
|
455
|
+
# Also accepts an Array of attribute hashes:
|
456
|
+
#
|
457
|
+
# assign_nested_attributes_for_collection_association(:people, [
|
458
|
+
# { id: '1', name: 'Peter' },
|
459
|
+
# { name: 'John' },
|
460
|
+
# { id: '2', _destroy: true }
|
461
|
+
# ])
|
462
|
+
def assign_nested_attributes_for_collection_association(association_name, attributes_collection)
|
463
|
+
options = nested_attributes_options[association_name]
|
464
|
+
if attributes_collection.respond_to?(:permitted?)
|
465
|
+
attributes_collection = attributes_collection.to_h
|
466
|
+
end
|
467
467
|
|
468
|
-
|
469
|
-
|
470
|
-
|
468
|
+
unless attributes_collection.is_a?(Hash) || attributes_collection.is_a?(Array)
|
469
|
+
raise ArgumentError, "Hash or Array expected, got #{attributes_collection.class.name} (#{attributes_collection.inspect})"
|
470
|
+
end
|
471
471
|
|
472
|
-
|
472
|
+
check_record_limit!(options[:limit], attributes_collection)
|
473
473
|
|
474
|
-
|
475
|
-
|
476
|
-
|
474
|
+
if attributes_collection.is_a? Hash
|
475
|
+
attributes_collection = attributes_collection.values
|
476
|
+
end
|
477
477
|
|
478
|
-
|
478
|
+
association = association(association_name)
|
479
479
|
|
480
|
-
|
480
|
+
association.delete_all
|
481
481
|
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
482
|
+
attributes_collection.each do |attributes|
|
483
|
+
if attributes.respond_to?(:permitted?)
|
484
|
+
attributes = attributes.to_h
|
485
|
+
end
|
486
|
+
attributes = attributes.with_indifferent_access
|
487
487
|
|
488
|
-
|
489
|
-
|
488
|
+
unless reject_new_record?(association_name, attributes)
|
489
|
+
association.build(attributes.except(*UNASSIGNABLE_KEYS))
|
490
|
+
end
|
490
491
|
end
|
491
492
|
end
|
492
|
-
end
|
493
493
|
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
494
|
+
# Takes in a limit and checks if the attributes_collection has too many
|
495
|
+
# records. It accepts limit in the form of symbol, proc, or
|
496
|
+
# number-like object (anything that can be compared with an integer).
|
497
|
+
#
|
498
|
+
# Raises TooManyRecords error if the attributes_collection is
|
499
|
+
# larger than the limit.
|
500
|
+
def check_record_limit!(limit, attributes_collection)
|
501
|
+
if limit
|
502
|
+
limit = \
|
503
|
+
case limit
|
504
|
+
when Symbol
|
505
|
+
send(limit)
|
506
|
+
when Proc
|
507
|
+
limit.call
|
508
|
+
else
|
509
|
+
limit
|
510
|
+
end
|
511
|
+
|
512
|
+
if limit && attributes_collection.size > limit
|
513
|
+
raise TooManyRecords, "Maximum #{limit} records are allowed. Got #{attributes_collection.size} records instead."
|
510
514
|
end
|
511
|
-
|
512
|
-
if limit && attributes_collection.size > limit
|
513
|
-
raise TooManyRecords, "Maximum #{limit} records are allowed. Got #{attributes_collection.size} records instead."
|
514
515
|
end
|
515
516
|
end
|
516
|
-
end
|
517
|
-
|
518
|
-
# Determines if a hash contains a truthy _destroy key.
|
519
|
-
def has_destroy_flag?(hash)
|
520
|
-
Type::Boolean.new.cast(hash["_destroy"])
|
521
|
-
end
|
522
517
|
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
will_be_destroyed?(association_name, attributes) || call_reject_if(association_name, attributes)
|
528
|
-
end
|
518
|
+
# Determines if a hash contains a truthy _destroy key.
|
519
|
+
def has_destroy_flag?(hash)
|
520
|
+
Type::Boolean.new.cast(hash["_destroy"])
|
521
|
+
end
|
529
522
|
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
return false if will_be_destroyed?(association_name, attributes)
|
523
|
+
# Determines if a new record should be rejected by checking
|
524
|
+
# has_destroy_flag? or if a <tt>:reject_if</tt> proc exists for this
|
525
|
+
# association and evaluates to +true+.
|
526
|
+
def reject_new_record?(association_name, attributes)
|
527
|
+
will_be_destroyed?(association_name, attributes) || call_reject_if(association_name, attributes)
|
528
|
+
end
|
537
529
|
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
530
|
+
# Determines if a record with the particular +attributes+ should be
|
531
|
+
# rejected by calling the reject_if Symbol or Proc (if defined).
|
532
|
+
# The reject_if option is defined by +accepts_nested_attributes_for+.
|
533
|
+
#
|
534
|
+
# Returns false if there is a +destroy_flag+ on the attributes.
|
535
|
+
def call_reject_if(association_name, attributes)
|
536
|
+
return false if will_be_destroyed?(association_name, attributes)
|
537
|
+
|
538
|
+
case callback = nested_attributes_options[association_name][:reject_if]
|
539
|
+
when Symbol
|
540
|
+
method(callback).arity == 0 ? send(callback) : send(callback, attributes)
|
541
|
+
when Proc
|
542
|
+
callback.call(attributes)
|
543
|
+
end
|
543
544
|
end
|
544
|
-
end
|
545
545
|
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
546
|
+
# Only take into account the destroy flag if <tt>:allow_destroy</tt> is true
|
547
|
+
def will_be_destroyed?(association_name, attributes)
|
548
|
+
allow_destroy?(association_name) && has_destroy_flag?(attributes)
|
549
|
+
end
|
550
550
|
|
551
|
-
|
552
|
-
|
553
|
-
|
551
|
+
def allow_destroy?(association_name)
|
552
|
+
nested_attributes_options[association_name][:allow_destroy]
|
553
|
+
end
|
554
554
|
end
|
555
555
|
end
|
@@ -175,9 +175,9 @@ module DuckRecord
|
|
175
175
|
|
176
176
|
private
|
177
177
|
|
178
|
-
|
179
|
-
|
180
|
-
|
178
|
+
def derive_class_name
|
179
|
+
name.to_s.camelize
|
180
|
+
end
|
181
181
|
end
|
182
182
|
|
183
183
|
# Holds all the metadata about an association as it was specified in the
|
@@ -269,21 +269,21 @@ module DuckRecord
|
|
269
269
|
|
270
270
|
protected
|
271
271
|
|
272
|
-
|
273
|
-
|
274
|
-
|
272
|
+
def actual_source_reflection # FIXME: this is a horrible name
|
273
|
+
self
|
274
|
+
end
|
275
275
|
|
276
276
|
private
|
277
277
|
|
278
|
-
|
279
|
-
|
280
|
-
|
278
|
+
def calculate_constructable(macro, options)
|
279
|
+
true
|
280
|
+
end
|
281
281
|
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
282
|
+
def derive_class_name
|
283
|
+
class_name = name.to_s
|
284
|
+
class_name = class_name.singularize if collection?
|
285
|
+
class_name.camelize
|
286
|
+
end
|
287
287
|
end
|
288
288
|
|
289
289
|
class HasManyReflection < AssociationReflection # :nodoc:
|
@@ -24,13 +24,13 @@ module DuckRecord
|
|
24
24
|
|
25
25
|
private
|
26
26
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
27
|
+
def type_cast_array(value, method)
|
28
|
+
if value.is_a?(::Array)
|
29
|
+
value.map { |item| type_cast_array(item, method) }
|
30
|
+
else
|
31
|
+
@subtype.public_send(method, value)
|
32
|
+
end
|
32
33
|
end
|
33
|
-
end
|
34
34
|
end
|
35
35
|
end
|
36
36
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require
|
1
|
+
require "active_model/type/registry"
|
2
2
|
|
3
3
|
module DuckRecord
|
4
4
|
# :stopdoc:
|
@@ -10,15 +10,15 @@ module DuckRecord
|
|
10
10
|
|
11
11
|
private
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
def registration_klass
|
14
|
+
Registration
|
15
|
+
end
|
16
16
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
17
|
+
def find_registration(symbol, *args)
|
18
|
+
registrations
|
19
|
+
.select { |registration| registration.matches?(symbol, *args) }
|
20
|
+
.max
|
21
|
+
end
|
22
22
|
end
|
23
23
|
|
24
24
|
class Registration
|
@@ -48,15 +48,15 @@ module DuckRecord
|
|
48
48
|
# Workaround for Ruby 2.2 "private attribute?" warning.
|
49
49
|
protected
|
50
50
|
|
51
|
-
|
51
|
+
attr_reader :name, :block, :override
|
52
52
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
53
|
+
def priority
|
54
|
+
result = 0
|
55
|
+
if override
|
56
|
+
result |= 1
|
57
|
+
end
|
58
|
+
result
|
57
59
|
end
|
58
|
-
result
|
59
|
-
end
|
60
60
|
end
|
61
61
|
|
62
62
|
class DecorationRegistration < Registration
|
@@ -82,15 +82,15 @@ module DuckRecord
|
|
82
82
|
# Workaround for Ruby 2.2 "private attribute?" warning.
|
83
83
|
protected
|
84
84
|
|
85
|
-
|
85
|
+
attr_reader :options, :klass
|
86
86
|
|
87
87
|
private
|
88
88
|
|
89
|
-
|
90
|
-
|
91
|
-
|
89
|
+
def matches_options?(**kwargs)
|
90
|
+
options.all? do |key, value|
|
91
|
+
kwargs[key] == value
|
92
|
+
end
|
92
93
|
end
|
93
|
-
end
|
94
94
|
end
|
95
95
|
end
|
96
96
|
# :startdoc:
|
@@ -43,21 +43,21 @@ module DuckRecord
|
|
43
43
|
|
44
44
|
def assert_valid_value(value)
|
45
45
|
if coder.respond_to?(:assert_valid_value)
|
46
|
-
coder.assert_valid_value(value, action:
|
46
|
+
coder.assert_valid_value(value, action: "serialize")
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
50
50
|
private
|
51
51
|
|
52
|
-
|
53
|
-
|
54
|
-
|
52
|
+
def default_value?(value)
|
53
|
+
value == coder.load(nil)
|
54
|
+
end
|
55
55
|
|
56
|
-
|
57
|
-
|
58
|
-
|
56
|
+
def encoded(value)
|
57
|
+
unless default_value?(value)
|
58
|
+
coder.dump(value)
|
59
|
+
end
|
59
60
|
end
|
60
|
-
end
|
61
61
|
end
|
62
62
|
end
|
63
63
|
end
|
@@ -3,13 +3,13 @@ module DuckRecord
|
|
3
3
|
class UnsignedInteger < ActiveModel::Type::Integer # :nodoc:
|
4
4
|
private
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
def max_value
|
7
|
+
super * 2
|
8
|
+
end
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
def min_value
|
11
|
+
0
|
12
|
+
end
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
data/lib/duck_record/type.rb
CHANGED
@@ -1,17 +1,21 @@
|
|
1
|
-
require
|
1
|
+
require "active_model/type"
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
3
|
+
require "duck_record/type/internal/abstract_json"
|
4
|
+
require "duck_record/type/internal/timezone"
|
5
5
|
|
6
|
-
require
|
7
|
-
require
|
8
|
-
require
|
9
|
-
require
|
6
|
+
require "duck_record/type/date"
|
7
|
+
require "duck_record/type/date_time"
|
8
|
+
require "duck_record/type/time"
|
9
|
+
require "duck_record/type/json"
|
10
10
|
|
11
|
-
require
|
11
|
+
require "duck_record/type/array"
|
12
12
|
|
13
|
-
require
|
14
|
-
require
|
13
|
+
require "duck_record/type/unsigned_integer"
|
14
|
+
require "duck_record/type/decimal_without_scale"
|
15
|
+
require "duck_record/type/text"
|
16
|
+
|
17
|
+
require "duck_record/type/serialized"
|
18
|
+
require "duck_record/type/registry"
|
15
19
|
|
16
20
|
module DuckRecord
|
17
21
|
module Type
|
@@ -43,15 +47,13 @@ module DuckRecord
|
|
43
47
|
Binary = ActiveModel::Type::Binary
|
44
48
|
Boolean = ActiveModel::Type::Boolean
|
45
49
|
Decimal = ActiveModel::Type::Decimal
|
46
|
-
DecimalWithoutScale = ActiveModel::Type::DecimalWithoutScale
|
47
50
|
Float = ActiveModel::Type::Float
|
48
51
|
Integer = ActiveModel::Type::Integer
|
49
52
|
String = ActiveModel::Type::String
|
50
|
-
Text = ActiveModel::Type::Text
|
51
|
-
UnsignedInteger = ActiveModel::Type::UnsignedInteger
|
52
53
|
Value = ActiveModel::Type::Value
|
53
54
|
|
54
55
|
register(:big_integer, Type::BigInteger, override: false)
|
56
|
+
register(:decimal_without_scale)
|
55
57
|
register(:binary, Type::Binary, override: false)
|
56
58
|
register(:boolean, Type::Boolean, override: false)
|
57
59
|
register(:date, Type::Date, override: false)
|
@@ -64,6 +66,6 @@ module DuckRecord
|
|
64
66
|
register(:time, Type::Time, override: false)
|
65
67
|
register(:json, Type::JSON, override: false)
|
66
68
|
|
67
|
-
add_modifier({array: true}, Type::Array)
|
69
|
+
add_modifier({ array: true }, Type::Array)
|
68
70
|
end
|
69
71
|
end
|