Class: OCI8::BindType::RAW

Inherits:
Object
  • Object
show all
Defined in:
lib/oci8/bindtype.rb

Direct Known Subclasses

LongRaw

Class Method Summary collapse

Class Method Details

.create(con, val, param, max_array_size) ⇒ Object



157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# File 'lib/oci8/bindtype.rb', line 157

def self.create(con, val, param, max_array_size)
  case param
  when Hash
    unless param[:length]
      if val.respond_to? :to_str
        val = val.to_str
        param[:length] = val.bytesize
      else
        param[:length] = 400
      end
    end
  when OCI8::Metadata::Base
    param = {:length => param.data_size}
  end
  self.new(con, val, param, max_array_size)
end