Class: OCI8::Cursor
- Inherits:
-
Object
- Object
- OCI8::Cursor
- Defined in:
- lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb
Overview
:nodoc:
Instance Method Summary collapse
- #define_a_column(i) ⇒ Object
-
#enhanced_define_a_column_pre_ar ⇒ Object
This OCI8 patch is required with the ruby-oci8 1.0.x or lower.
Instance Method Details
#define_a_column(i) ⇒ Object
354 355 356 357 358 359 360 361 362 363 364 365 366 |
# File 'lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb', line 354 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_ar ⇒ Object
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.
353 |
# File 'lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb', line 353 alias :enhanced_define_a_column_pre_ar :define_a_column |