Class: OCI8::Metadata::Collection
Overview
Metadata for a collection.
This is returned by:
-
OCI8::Metadata::Type.collection_element
Instance Method Summary collapse
-
#charset_form ⇒ Object
character set form, if the type attribute is of a string/character type.
-
#charset_id ⇒ Object
character set id if the type attribute is of a string/character type.
-
#charset_name ⇒ Object
character set name if the type attribute is of a string/character type.
-
#data_size ⇒ Object
The maximum size of the type attribute.
-
#data_type ⇒ Object
the datatype of the type.
-
#inspect ⇒ Object
:nodoc:.
-
#num_elems ⇒ Object
the number of elements in an array.
-
#precision ⇒ Object
The precision of numeric type attributes.
-
#scale ⇒ Object
The scale of numeric type attributes.
-
#schema_name ⇒ Object
schema name where the type has been created.
-
#type_metadata ⇒ Object
to type metadata if possible.
-
#type_name ⇒ Object
A string which is the type name.
-
#typecode ⇒ Object
typecode.
Methods inherited from Base
#obj_id, #obj_link, #obj_name, #obj_schema
Instance Method Details
#charset_form ⇒ Object
character set form, if the type attribute is of a string/character type.
1211 1212 1213 |
# File 'lib/oci8/metadata.rb', line 1211 def charset_form __charset_form end |
#charset_id ⇒ Object
character set id if the type attribute is of a string/character type.
1206 1207 1208 |
# File 'lib/oci8/metadata.rb', line 1206 def charset_id attr_get_ub2(OCI_ATTR_CHARSET_ID) end |
#charset_name ⇒ Object
character set name if the type attribute is of a string/character type.
1216 1217 1218 |
# File 'lib/oci8/metadata.rb', line 1216 def charset_name __charset_name(charset_id) end |
#data_size ⇒ Object
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.
1150 1151 1152 |
# File 'lib/oci8/metadata.rb', line 1150 def data_size attr_get_ub2(OCI_ATTR_DATA_SIZE) end |
#data_type ⇒ Object
the datatype of the type
1160 1161 1162 |
# File 'lib/oci8/metadata.rb', line 1160 def data_type __data_type end |
#inspect ⇒ Object
:nodoc:
1220 1221 1222 |
# File 'lib/oci8/metadata.rb', line 1220 def inspect # :nodoc: "#<#{self.class.name}: #{__data_type_string}>" end |
#num_elems ⇒ Object
the number of elements in an array. It is only valid for collections that are arrays.
1166 1167 1168 |
# File 'lib/oci8/metadata.rb', line 1166 def num_elems attr_get_ub4(OCI_ATTR_NUM_ELEMS) end |
#precision ⇒ Object
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.
1174 1175 1176 |
# File 'lib/oci8/metadata.rb', line 1174 def precision __is_implicit? ? attr_get_sb2(OCI_ATTR_PRECISION) : attr_get_ub1(OCI_ATTR_PRECISION) end |
#scale ⇒ Object
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.
1182 1183 1184 |
# File 'lib/oci8/metadata.rb', line 1182 def scale attr_get_sb1(OCI_ATTR_SCALE) end |
#schema_name ⇒ Object
schema name where the type has been created.
1196 1197 1198 |
# File 'lib/oci8/metadata.rb', line 1196 def schema_name attr_get_string(OCI_ATTR_SCHEMA_NAME) end |
#type_metadata ⇒ Object
to type metadata if possible
1201 1202 1203 |
# File 'lib/oci8/metadata.rb', line 1201 def (OCI8::Metadata::Type) end |
#type_name ⇒ Object
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.
1191 1192 1193 |
# File 'lib/oci8/metadata.rb', line 1191 def type_name attr_get_string(OCI_ATTR_TYPE_NAME) end |
#typecode ⇒ Object
typecode
1155 1156 1157 |
# File 'lib/oci8/metadata.rb', line 1155 def typecode __typecode(OCI_ATTR_TYPECODE) end |