Module: Sequel::Dataset::StoredProcedures
- Included in:
- MySQL::MysqlMysql2::DatasetMethods
- Defined in:
- lib/sequel/adapters/utils/stored_procedures.rb
Instance Method Summary collapse
-
#call_sproc(type, name, *args) ⇒ Object
For the given type (:select, :first, :insert, :update, or :delete), run the database stored procedure with the given name with the given arguments.
-
#prepare_sproc(type, name) ⇒ Object
Transform this dataset into a stored procedure that you can call multiple times with new arguments.
Instance Method Details
#call_sproc(type, name, *args) ⇒ Object
For the given type (:select, :first, :insert, :update, or :delete), run the database stored procedure with the given name with the given arguments.
43 44 45 |
# File 'lib/sequel/adapters/utils/stored_procedures.rb', line 43 def call_sproc(type, name, *args) prepare_sproc(type, name).call(*args) end |
#prepare_sproc(type, name) ⇒ Object
Transform this dataset into a stored procedure that you can call multiple times with new arguments.
49 50 51 |
# File 'lib/sequel/adapters/utils/stored_procedures.rb', line 49 def prepare_sproc(type, name) prepare_extend_sproc(self).clone(:sproc_type=>type, :sproc_name=>name, :sql=>'') end |