Module | Sequel::Dataset::StoredProcedures |
In: |
lib/sequel/adapters/utils/stored_procedures.rb
|
For the given type (:select, :first, :insert, :update, or :delete), run the database stored procedure with the given name with the given arguments.
# File lib/sequel/adapters/utils/stored_procedures.rb, line 54 54: def call_sproc(type, name, *args) 55: prepare_sproc(type, name).call(*args) 56: end
Transform this dataset into a stored procedure that you can call multiple times with new arguments.
# File lib/sequel/adapters/utils/stored_procedures.rb, line 60 60: def prepare_sproc(type, name) 61: sp = clone 62: prepare_extend_sproc(sp) 63: sp.sproc_type = type 64: sp.sproc_name = name 65: sp 66: end