Class: OCI8::Metadata::Collection

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

Overview

Metadata for a collection.

This is returned by:

  • OCI8::Metadata::Type.collection_element

Instance Method Summary collapse

Methods inherited from Base

#obj_id, #obj_name, #obj_schema

Instance Method Details

#charset_formObject

character set form, if the type attribute is of a string/character type.



1261
1262
1263
# File 'lib/oci8/metadata.rb', line 1261

def charset_form
  __charset_form
end

#charset_idObject

character set id if the type attribute is of a string/character type.



1256
1257
1258
# File 'lib/oci8/metadata.rb', line 1256

def charset_id
  attr_get_ub2(OCI_ATTR_CHARSET_ID)
end

#charset_nameObject

character set name if the type attribute is of a string/character type.



1266
1267
1268
# File 'lib/oci8/metadata.rb', line 1266

def charset_name
  __charset_name(charset_id)
end

#data_sizeObject

The maximum size of the type attribute. This length is returned in bytes and not characters for strings and raws. It returns 22 for NUMBERs.



1200
1201
1202
# File 'lib/oci8/metadata.rb', line 1200

def data_size
  attr_get_ub2(OCI_ATTR_DATA_SIZE)
end

#data_typeObject

the datatype of the type



1210
1211
1212
# File 'lib/oci8/metadata.rb', line 1210

def data_type
  __data_type
end

#inspectObject

:nodoc:



1270
1271
1272
# File 'lib/oci8/metadata.rb', line 1270

def inspect # :nodoc:
  "#<#{self.class.name}: #{__data_type_string}>"
end

#num_elemsObject

the number of elements in an array. It is only valid for collections that are arrays.



1216
1217
1218
# File 'lib/oci8/metadata.rb', line 1216

def num_elems
  attr_get_ub4(OCI_ATTR_NUM_ELEMS)
end

#precisionObject

The precision of numeric type attributes. If the precision is nonzero and scale is -127, then it is a FLOAT, else it is a NUMBER(precision, scale). For the case when precision is 0, NUMBER(precision, scale) can be represented simply as NUMBER.



1224
1225
1226
# File 'lib/oci8/metadata.rb', line 1224

def precision
  __is_implicit? ? attr_get_sb2(OCI_ATTR_PRECISION) : attr_get_ub1(OCI_ATTR_PRECISION)
end

#scaleObject

The scale of numeric type attributes. If the precision is nonzero and scale is -127, then it is a FLOAT, else it is a NUMBER(precision, scale). For the case when precision is 0, NUMBER(precision, scale) can be represented simply as NUMBER.



1232
1233
1234
# File 'lib/oci8/metadata.rb', line 1232

def scale
  attr_get_sb1(OCI_ATTR_SCALE)
end

#schema_nameObject

schema name where the type has been created.



1246
1247
1248
# File 'lib/oci8/metadata.rb', line 1246

def schema_name
  attr_get_string(OCI_ATTR_SCHEMA_NAME)
end

#type_metadataObject

to type metadata if possible



1251
1252
1253
# File 'lib/oci8/metadata.rb', line 1251

def 
  (OCI8::Metadata::Type)
end

#type_nameObject

A string which is the type name. The returned value will contain the type name if the datatype is :named_type or :ref. If the datatype is :named_type, the name of the named datatype’s type is returned. If the datatype is :ref, the type name of the named datatype pointed to by the REF is returned.



1241
1242
1243
# File 'lib/oci8/metadata.rb', line 1241

def type_name
  attr_get_string(OCI_ATTR_TYPE_NAME)
end

#typecodeObject

typecode



1205
1206
1207
# File 'lib/oci8/metadata.rb', line 1205

def typecode
  __typecode(OCI_ATTR_TYPECODE)
end