Class: OCI8::Cursor

Inherits:
Object
  • Object
show all
Defined in:
lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#define_a_column(i) ⇒ Object



215
216
217
218
219
220
221
222
223
224
225
226
227
# File 'lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb', line 215

def define_a_column(i)
  case do_ocicall(@ctx) { @parms[i - 1].attrGet(OCI_ATTR_DATA_TYPE) }
  when 8;   @stmt.defineByPos(i, String, 65535) # Read LONG values
  when 187; @stmt.defineByPos(i, OraDate) # Read TIMESTAMP values
  when 108
    if @parms[i - 1].attrGet(OCI_ATTR_TYPE_NAME) == 'XMLTYPE'
      @stmt.defineByPos(i, String, 65535)
    else
      raise 'unsupported datatype'
    end
  else enhanced_define_a_column_pre_ar i
  end
end

#enhanced_define_a_column_pre_arObject

This OCI8 patch is required with the ruby-oci8 1.0.x or lower. Set OCI8::BindType::Mapping[] to change the column type when using ruby-oci8 2.0.



214
# File 'lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb', line 214

alias :enhanced_define_a_column_pre_ar :define_a_column