Module: Sequel::DatasetRun
- Defined in:
- lib/sequel/extensions/dataset_run.rb
Instance Method Summary collapse
-
#run ⇒ Object
Run the dataset’s SQL on the database.
Instance Method Details
#run ⇒ Object
Run the dataset’s SQL on the database. Returns NULL. This is useful when you want to run SQL without returning a result.
DB["GRANT SELECT ON ? TO ?", :table, :user].run
# GRANT SELECT ON "table" TO "user"
31 32 33 34 35 36 37 |
# File 'lib/sequel/extensions/dataset_run.rb', line 31 def run if server = @opts[:server] db.run(sql, :server=>server) else db.run(sql) end end |