Class: OCI8::TDO::Attr

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(con, metadata, val_offset, ind_offset) ⇒ Attr

Returns a new instance of Attr.



506
507
508
509
510
511
512
513
# File 'lib/oci8/object.rb', line 506

def initialize(con, , val_offset, ind_offset)
  if .respond_to? :name
    @name = .name.downcase.intern
  end
  @datatype, @typeinfo, @val_size, @ind_size, @alignment, @set_proc, @get_proc, = OCI8::TDO.(con, )
  @val_offset = (val_offset + @alignment - 1) & ~(@alignment - 1)
  @ind_offset = ind_offset
end

Instance Attribute Details

#alignmentObject (readonly)

Returns the value of attribute alignment.



501
502
503
# File 'lib/oci8/object.rb', line 501

def alignment
  @alignment
end

#datatypeObject (readonly)

Returns the value of attribute datatype.



502
503
504
# File 'lib/oci8/object.rb', line 502

def datatype
  @datatype
end

#get_procObject (readonly)

Returns the value of attribute get_proc.



505
506
507
# File 'lib/oci8/object.rb', line 505

def get_proc
  @get_proc
end

#ind_offsetObject (readonly)

Returns the value of attribute ind_offset.



500
501
502
# File 'lib/oci8/object.rb', line 500

def ind_offset
  @ind_offset
end

#nameObject (readonly)

Returns the value of attribute name.



498
499
500
# File 'lib/oci8/object.rb', line 498

def name
  @name
end

#set_procObject (readonly)

Returns the value of attribute set_proc.



504
505
506
# File 'lib/oci8/object.rb', line 504

def set_proc
  @set_proc
end

#typeinfoObject (readonly)

Returns the value of attribute typeinfo.



503
504
505
# File 'lib/oci8/object.rb', line 503

def typeinfo
  @typeinfo
end

#val_offsetObject (readonly)

Returns the value of attribute val_offset.



499
500
501
# File 'lib/oci8/object.rb', line 499

def val_offset
  @val_offset
end

Instance Method Details

#next_offsetObject



514
515
516
# File 'lib/oci8/object.rb', line 514

def next_offset
  [@val_offset + @val_size, @ind_offset + @ind_size]
end