| 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 52
52: def call_sproc(type, name, *args)
53: prepare_sproc(type, name).call(*args)
54: 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 58
58: def prepare_sproc(type, name)
59: sp = clone
60: prepare_extend_sproc(sp)
61: sp.sproc_type = type
62: sp.sproc_name = name
63: sp
64: end