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
251 252 253 254 255 256 257 258 259 260 261 262 263 |
# File 'lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb', line 251 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.
250 |
# File 'lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb', line 250 alias :enhanced_define_a_column_pre_ar :define_a_column |