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.
69 70 71 72 |
# File 'lib/sequel/plugins/prepared_statements_safe.rb', line 69 def before_create @values = model.prepared_statements_column_defaults.merge(@values) 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.
76 77 78 |
# File 'lib/sequel/plugins/prepared_statements_safe.rb', line 76 def save_changes(opts=OPTS) save(opts) || false if modified? end |