Class: ODPI::BindType::Raw

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

Constant Summary collapse

TYPES =
[:raw, :bytes]

Instance Attribute Summary

Attributes inherited from Base

#raw_var

Instance Method Summary collapse

Methods inherited from Base

#[], #[]=, convert_in, convert_out, #get, #set, to_bindclass

Constructor Details

#initialize(conn, value, type, params, array_size, is_array) ⇒ Raw

Returns a new instance of Raw.


288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
# File 'lib/odpi/bindtype.rb', line 288

def initialize(conn, value, type, params, array_size, is_array)
  if params.is_a? Hash
    size = params[:length]
    if size.nil?
      if is_array
        size = value.collect(&:bytesize).max
      else
        size = value.bytesize
      end
    end
  else
    size = params.client_size_in_bytes
  end
  super(conn, array_size, size, true, is_array, nil)
end