module Sequel::Plugins::PreparedStatements::InstanceMethods
Private Instance Methods
_delete_without_checking()
click to toggle source
Use a prepared statement to delete the row.
Calls superclass method
# File lib/sequel/plugins/prepared_statements.rb, line 156 def _delete_without_checking if use_prepared_statements_for?(:delete) model.send(:prepared_delete).call(pk_hash) else super end end
_insert_raw(ds)
click to toggle source
Use a prepared statement to insert the values into the model's dataset.
Calls superclass method
# File lib/sequel/plugins/prepared_statements.rb, line 165 def _insert_raw(ds) if use_prepared_statements_for?(:insert) model.send(:prepared_insert, @values.keys).call(@values) else super end end
_insert_select_raw(ds)
click to toggle source
Use a prepared statement to insert the values into the model's dataset and return the new column values.
Calls superclass method
# File lib/sequel/plugins/prepared_statements.rb, line 175 def _insert_select_raw(ds) if use_prepared_statements_for?(:insert_select) if ps = model.send(:prepared_insert_select, @values.keys) ps.call(@values) end else super end end
_refresh_get(ds)
click to toggle source
Use a prepared statement to refresh this model's column values.
Calls superclass method
# File lib/sequel/plugins/prepared_statements.rb, line 186 def _refresh_get(ds) if use_prepared_statements_for?(:refresh) model.send(:prepared_refresh).call(pk_hash) else super end end
_update_without_checking(columns)
click to toggle source
Use a prepared statement to update this model's columns in the database.
Calls superclass method
# File lib/sequel/plugins/prepared_statements.rb, line 195 def _update_without_checking(columns) if use_prepared_statements_for?(:update) model.send(:prepared_update, columns.keys).call(columns.merge(pk_hash)) else super end end