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 = 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.
58 59 60 61 62 63 |
# File 'lib/sequel/plugins/prepared_statements_safe.rb', line 58 def before_create if v = model.prepared_statements_column_defaults @values = Hash[v].merge!(values) end super end |
#save_changes(opts = OPTS) ⇒ Object
Always do a full save of all columns to reduce the number of prepared statements that can be used.
67 68 69 |
# File 'lib/sequel/plugins/prepared_statements_safe.rb', line 67 def save_changes(opts=OPTS) save(opts) || false if modified? end |