Class: OCI8::Metadata::Collection

Inherits:
Base 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, #timestamp

Instance Method Details

#charset_formObject

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



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

def charset_form
  __charset_form
end

#charset_idObject

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



1212
1213
1214
# File 'lib/oci8/metadata.rb', line 1212

def charset_id
  __ub2(OCI_ATTR_CHARSET_ID)
end

#charset_nameObject

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



1222
1223
1224
# File 'lib/oci8/metadata.rb', line 1222

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.



1156
1157
1158
# File 'lib/oci8/metadata.rb', line 1156

def data_size
  __ub2_nc(OCI_ATTR_DATA_SIZE)
end

#data_typeObject

the datatype of the type



1166
1167
1168
# File 'lib/oci8/metadata.rb', line 1166

def data_type
  __data_type
end

#inspectObject

:nodoc:



1226
1227
1228
# File 'lib/oci8/metadata.rb', line 1226

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

#num_elemsObject

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



1172
1173
1174
# File 'lib/oci8/metadata.rb', line 1172

def num_elems
  __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.



1180
1181
1182
# File 'lib/oci8/metadata.rb', line 1180

def precision
  __is_implicit? ? __sb2(OCI_ATTR_PRECISION) : __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.



1188
1189
1190
# File 'lib/oci8/metadata.rb', line 1188

def scale
  __sb1(OCI_ATTR_SCALE)
end

#schema_nameObject

schema name where the type has been created.



1202
1203
1204
# File 'lib/oci8/metadata.rb', line 1202

def schema_name
  __text(OCI_ATTR_SCHEMA_NAME)
end

#type_metadataObject

to type metadata if possible



1207
1208
1209
# File 'lib/oci8/metadata.rb', line 1207

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.



1197
1198
1199
# File 'lib/oci8/metadata.rb', line 1197

def type_name
  __text(OCI_ATTR_TYPE_NAME)
end

#typecodeObject

typecode



1161
1162
1163
# File 'lib/oci8/metadata.rb', line 1161

def typecode
  __typecode(OCI_ATTR_TYPECODE)
end