Module Sequel::Plugins::PreparedStatementsSafe::ClassMethods
In: lib/sequel/plugins/prepared_statements_safe.rb

Methods

Attributes

prepared_statements_column_defaults  [R]  A hash with column symbol keys and default values. Instance‘s values are merged into this hash before creating to reduce the number of free columns (columns that may or may not be present in the INSERT statement), as the number of prepared statements that can be created is 2^N (where N is the number of free columns).

Public Instance methods

[Source]

    # File lib/sequel/plugins/prepared_statements_safe.rb, line 36
36:         def inherited(subclass)
37:           super
38:           subclass.instance_variable_set(:@prepared_statements_column_defaults, @prepared_statements_column_defaults) if @prepared_statements_column_defaults && !subclass.prepared_statements_column_defaults
39:         end

Set the column defaults to use when creating on the subclass.

[Source]

    # File lib/sequel/plugins/prepared_statements_safe.rb, line 42
42:         def set_dataset(*)
43:           x = super
44:           set_prepared_statements_column_defaults
45:           x
46:         end

[Validate]