Module Sequel::Plugins::AutoValidations::ClassMethods
In: lib/sequel/plugins/auto_validations.rb

Methods

Attributes

auto_validate_explicit_not_null_columns  [R]  The columns with automatic not_null validations for columns present in the values.
auto_validate_not_null_columns  [R]  The columns with automatic not_null validations
auto_validate_unique_columns  [R]  The columns or sets of columns with automatic unique validations

Public Instance methods

Whether to use a presence validation for not null columns

[Source]

    # File lib/sequel/plugins/auto_validations.rb, line 81
81:         def auto_validate_presence?
82:           @auto_validate_presence
83:         end

Whether to automatically validate schema types for all columns

[Source]

    # File lib/sequel/plugins/auto_validations.rb, line 86
86:         def auto_validate_types?
87:           @auto_validate_types
88:         end

Skip automatic validations for the given validation type (:not_null, :types, :unique). If :all is given as the type, skip all auto validations.

[Source]

     # File lib/sequel/plugins/auto_validations.rb, line 92
 92:         def skip_auto_validations(type)
 93:           if type == :all
 94:             [:not_null, :types, :unique].each{|v| skip_auto_validations(v)}
 95:           elsif type == :types
 96:             @auto_validate_types = false
 97:           else
 98:             send("auto_validate_#{type}_columns").clear
 99:           end
100:         end

[Validate]