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



116
117
118
119
120
121
122
123
124
125
126
127
128
129
# File 'lib/oci8/bindtype.rb', line 116

def self.create(con, val, param, max_array_size)
  case param
  when Hash
    length = 400 # default length
    if param[:length]
      length = param[:length]
    elsif val.respond_to? :to_str and val.to_str.size > length
      length = val.to_str.size
    end
  when OCI8::Metadata::Base
    length = param.data_size
  end
  self.new(con, val, length, max_array_size)
end