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 13 13: def call(*args, &block) 14: sp = clone 15: sp.sproc_args = args 16: sp.run(&block) 17: 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 21 21: def inspect 22: "<#{self.class.name}/StoredProcedure name=#{@sproc_name}>" 23: end
Run the stored procedure with the current args on the database
# File lib/sequel/adapters/utils/stored_procedures.rb, line 26 26: def run(&block) 27: case @sproc_type 28: when :select, :all 29: all(&block) 30: when :first 31: first 32: when :insert 33: insert 34: when :update 35: update 36: when :delete 37: delete 38: end 39: end