Module: Sequel::Plugins::PreparedStatementsSafe::InstanceMethods
- Defined in:
- lib/sequel/plugins/prepared_statements_safe.rb
Instance Method Summary collapse
-
#before_create ⇒ Object
Merge the current values into the default values to reduce the number of free columns.
-
#save_changes(opts = {}) ⇒ Object
Always do a full save of all columns to reduce the number of prepared statements that can be used.
Instance Method Details
#before_create ⇒ Object
Merge the current values into the default values to reduce the number of free columns.
59 60 61 62 |
# File 'lib/sequel/plugins/prepared_statements_safe.rb', line 59 def before_create set_values(model.prepared_statements_column_defaults.merge(values)) super end |
#save_changes(opts = {}) ⇒ Object
Always do a full save of all columns to reduce the number of prepared statements that can be used.
66 67 68 |
# File 'lib/sequel/plugins/prepared_statements_safe.rb', line 66 def save_changes(opts={}) save(opts) || false if modified? end |