Class: OCI8::Cursor
- Inherits:
-
Object
- Object
- OCI8::Cursor
- Defined in:
- lib/oracle_raw.rb
Overview
OCI8::Cursor class is enhanced with helper methods.
Please refer to ruby-oci8.rubyforge.org/en/ for more information about the OCI8 library.
Instance Method Summary collapse
-
#bind_parameters(params) ⇒ Object
This method binds all parameters given in an array.
-
#exec_with_prefetch(amount = 5000) ⇒ Object
This method performs exec and prefetch.
Instance Method Details
#bind_parameters(params) ⇒ Object
This method binds all parameters given in an array. The first value is the name given in the sql string, the second is the value to be bound, the third is the type of the value, and the fourth is the maximum length of the value.
15 16 17 18 19 20 21 22 23 |
# File 'lib/oracle_raw.rb', line 15 def bind_parameters(params) params.each do |p| if p[1].is_a?(Array) self.bind_param_array(p[0], p[1], p[2], p[3]) else self.bind_param(p[0], p[1], p[2], p[3]) end end if params end |
#exec_with_prefetch(amount = 5000) ⇒ Object
This method performs exec and prefetch.
27 28 29 30 |
# File 'lib/oracle_raw.rb', line 27 def exec_with_prefetch(amount = 5000) self.exec self.prefetch_rows = amount end |