Module Sequel::Dataset::StoredProcedureMethods
In: lib/sequel/adapters/utils/stored_procedures.rb

Methods

call   inspect   run   sproc_name  

Public Instance methods

Call the stored procedure with the given args

[Source]

    # 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.

[Source]

    # 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

[Source]

    # 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

The name of the stored procedure to call

[Source]

   # File lib/sequel/adapters/utils/stored_procedures.rb, line 7
7:       def sproc_name
8:         @opts[:sproc_name]
9:       end

[Validate]