Class: OCI8::Metadata::TypeAttr
Overview
Metadata for a type attribute.
This is returned by:
-
OCI8::Metadata::Type#type_attrs
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.
-
#fsprecision ⇒ Object
The fractional seconds precision of a datetime or interval.
-
#inspect ⇒ Object
:nodoc:.
-
#lfprecision ⇒ Object
The leading field precision of an interval.
-
#name ⇒ Object
the type attribute name.
-
#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_name, #obj_schema, #timestamp
Instance Method Details
#charset_form ⇒ Object
character set form, if the type attribute is of a string/character type.
997 998 999 |
# File 'lib/oci8/metadata.rb', line 997 def charset_form __charset_form end |
#charset_id ⇒ Object
character set id if the type attribute is of a string/character type.
992 993 994 |
# File 'lib/oci8/metadata.rb', line 992 def charset_id __ub2(OCI_ATTR_CHARSET_ID) end |
#charset_name ⇒ Object
character set name if the type attribute is of a string/character type.
1018 1019 1020 |
# File 'lib/oci8/metadata.rb', line 1018 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.
936 937 938 |
# File 'lib/oci8/metadata.rb', line 936 def data_size __ub2_nc(OCI_ATTR_DATA_SIZE) end |
#data_type ⇒ Object
the datatype of the type
946 947 948 |
# File 'lib/oci8/metadata.rb', line 946 def data_type __data_type end |
#fsprecision ⇒ Object
The fractional seconds precision of a datetime or interval.
(unavailable on Oracle 8.1 or lower)
1005 1006 1007 |
# File 'lib/oci8/metadata.rb', line 1005 def fsprecision __ub1(OCI_ATTR_FSPRECISION) end |
#inspect ⇒ Object
:nodoc:
1022 1023 1024 |
# File 'lib/oci8/metadata.rb', line 1022 def inspect # :nodoc: "#<#{self.class.name}: #{name} #{__type_string}>" end |
#lfprecision ⇒ Object
The leading field precision of an interval
(unavailable on Oracle 8.1 or lower)
1012 1013 1014 |
# File 'lib/oci8/metadata.rb', line 1012 def lfprecision __ub1(OCI_ATTR_LFPRECISION) end |
#name ⇒ Object
the type attribute name
951 952 953 |
# File 'lib/oci8/metadata.rb', line 951 def name __text(OCI_ATTR_NAME) 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.
959 960 961 |
# File 'lib/oci8/metadata.rb', line 959 def precision __is_implicit? ? __sb2(OCI_ATTR_PRECISION) : __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.
967 968 969 |
# File 'lib/oci8/metadata.rb', line 967 def scale __sb1(OCI_ATTR_SCALE) end |
#schema_name ⇒ Object
schema name where the type has been created.
982 983 984 |
# File 'lib/oci8/metadata.rb', line 982 def schema_name __text(OCI_ATTR_SCHEMA_NAME) end |
#type_metadata ⇒ Object
to type metadata if possible
987 988 989 |
# File 'lib/oci8/metadata.rb', line 987 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.
977 978 979 |
# File 'lib/oci8/metadata.rb', line 977 def type_name __text(OCI_ATTR_TYPE_NAME) end |
#typecode ⇒ Object
typecode
941 942 943 |
# File 'lib/oci8/metadata.rb', line 941 def typecode __typecode(OCI_ATTR_TYPECODE) end |