| 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 62
62: def call_sproc(type, name, *args)
63: prepare_sproc(type, name).call(*args)
64: 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 68
68: def prepare_sproc(type, name)
69: sp = clone
70: prepare_extend_sproc(sp)
71: sp.sproc_type = type
72: sp.sproc_name = name
73: sp
74: end