| Module | Sequel::Dataset::StoredProcedureMethods |
| In: |
lib/sequel/adapters/utils/stored_procedures.rb
|
Call the stored procedure with the given args
# File lib/sequel/adapters/utils/stored_procedures.rb, line 12
12: def call(*args, &block)
13: clone(:sproc_args=>args).run(&block)
14: end
Programmer friendly string showing this is a stored procedure, showing the name of the procedure.
# File lib/sequel/adapters/utils/stored_procedures.rb, line 18
18: def inspect
19: "<#{self.class.name}/StoredProcedure name=#{@sproc_name}>"
20: end
Run the stored procedure with the current args on the database
# File lib/sequel/adapters/utils/stored_procedures.rb, line 23
23: def run(&block)
24: case @opts[:sproc_type]
25: when :select, :all
26: all(&block)
27: when :first
28: first
29: when :insert
30: insert
31: when :update
32: update
33: when :delete
34: delete
35: end
36: end