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