Module: Sequel::Settable
- Defined in:
- lib/sequel/extensions/settable.rb
Overview
The Settable module provides database configuration functionality through
SET statements. When loaded as an extension, it adds the set method to
database connections.
Instance Method Summary collapse
-
#set(opts = {}) ⇒ void
Execute SET statements for the given options hash.
Instance Method Details
#set(opts = {}) ⇒ void
This method returns an undefined value.
Execute SET statements for the given options hash.
Each key-value pair in the options hash is converted to a SET statement and executed against the database. Multiple options result in multiple SET statements being executed in sequence.
54 55 56 57 58 |
# File 'lib/sequel/extensions/settable.rb', line 54 def set(opts = {}) set_sql(opts).each do |sql| run(sql) end end |