Class: OCI8::Metadata::ArgBase
Overview
Abstract super class of Argument, TypeArgument and TypeResult.
Direct Known Subclasses
Instance Method Summary collapse
-
#arguments ⇒ Object
The list of arguments at the next level (when the argument is of a record or table type).
-
#charset_form ⇒ Object
Returns the character set form if the argument is of a string/character type.
-
#charset_id ⇒ Object
Returns the character set ID if the argument is of a string/character type.
-
#charset_name ⇒ Object
Returns the character set name if the argument is of a string/character type.
-
#data_size ⇒ Object
The size of the datatype of the argument.
-
#data_type ⇒ Object
the datatype of the argument.
- #has_default ⇒ 1 or 0 deprecated Deprecated.
-
#has_default? ⇒ true or false
Indicates whether an argument has a default.
-
#inspect ⇒ Object
:nodoc:.
-
#iomode ⇒ Object
Indicates the argument mode.
-
#level ⇒ Object
The datatype levels.
-
#link ⇒ Object
For
:named_type
or:ref
, returns a string with the database link name of the database on which the type exists. -
#name ⇒ Object
the argument name.
-
#position ⇒ Object
the position of the argument in the argument list.
-
#precision ⇒ Object
The precision of numeric arguments.
-
#radix ⇒ Object
Returns a radix (if number type).
-
#scale ⇒ Object
The scale of numeric arguments.
-
#schema_name ⇒ Object
For
:named_type
or:ref
, returns a string with the schema name under which the type was created, or under which the package was created in the case of package local types. -
#sub_name ⇒ Object
For
:named_type
or:ref
, returns a string with the type name, in the case of package local types. -
#type_metadata ⇒ Object
to type metadata if possible.
-
#type_name ⇒ Object
Returns a string which is the type name, or the package name in the case of package local types.
-
#typecode ⇒ Object
typecode.
Methods inherited from Base
#obj_id, #obj_link, #obj_name, #obj_schema
Instance Method Details
#arguments ⇒ Object
The list of arguments at the next level (when the argument is of a record or table type).
1610 1611 1612 |
# File 'lib/oci8/metadata.rb', line 1610 def arguments @arguments ||= list_arguments.to_a end |
#charset_form ⇒ Object
Returns the character set form if the argument is of a string/character type
1598 1599 1600 |
# File 'lib/oci8/metadata.rb', line 1598 def charset_form __charset_form end |
#charset_id ⇒ Object
Returns the character set ID if the argument is of a string/character type
1592 1593 1594 |
# File 'lib/oci8/metadata.rb', line 1592 def charset_id attr_get_ub2(OCI_ATTR_CHARSET_ID) end |
#charset_name ⇒ Object
Returns the character set name if the argument is of a string/character type
1604 1605 1606 |
# File 'lib/oci8/metadata.rb', line 1604 def charset_name __charset_name(charset_id) end |
#data_size ⇒ Object
The size of the datatype of the argument. This length is returned in bytes and not characters for strings and raws. It returns 22 for NUMBERs.
1486 1487 1488 |
# File 'lib/oci8/metadata.rb', line 1486 def data_size attr_get_ub2(OCI_ATTR_DATA_SIZE) end |
#data_type ⇒ Object
the datatype of the argument
1479 1480 1481 |
# File 'lib/oci8/metadata.rb', line 1479 def data_type __data_type end |
#has_default ⇒ 1 or 0
Indicates whether an argument has a default
1515 1516 1517 |
# File 'lib/oci8/metadata.rb', line 1515 def has_default attr_get_ub1(OCI_ATTR_HAS_DEFAULT) end |
#has_default? ⇒ true or false
Indicates whether an argument has a default
1523 1524 1525 |
# File 'lib/oci8/metadata.rb', line 1523 def has_default? __boolean(OCI_ATTR_HAS_DEFAULT) end |
#inspect ⇒ Object
:nodoc:
1614 1615 1616 |
# File 'lib/oci8/metadata.rb', line 1614 def inspect # :nodoc: "#<#{self.class.name}: #{name} #{__data_type_string}>" end |
#iomode ⇒ Object
Indicates the argument mode. Values are :in
, :out
or :inout
1536 1537 1538 1539 1540 1541 1542 |
# File 'lib/oci8/metadata.rb', line 1536 def iomode case attr_get_ub4(OCI_ATTR_IOMODE) when 0; :in when 1; :out when 2; :inout end end |
#level ⇒ Object
The datatype levels. This attribute always returns zero.
1507 1508 1509 |
# File 'lib/oci8/metadata.rb', line 1507 def level attr_get_ub2(OCI_ATTR_LEVEL) end |
#link ⇒ Object
For :named_type
or :ref
, returns a string with the database link name of the database on which the type exists. This can happen only in the case of package local types, when the package is remote.
1581 1582 1583 |
# File 'lib/oci8/metadata.rb', line 1581 def link attr_get_string(OCI_ATTR_LINK) end |
#name ⇒ Object
the argument name
1464 1465 1466 |
# File 'lib/oci8/metadata.rb', line 1464 def name attr_get_string(OCI_ATTR_NAME) end |
#position ⇒ Object
the position of the argument in the argument list.
1469 1470 1471 |
# File 'lib/oci8/metadata.rb', line 1469 def position attr_get_ub2(OCI_ATTR_POSITION) end |
#precision ⇒ Object
The precision of numeric arguments. 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.
1494 1495 1496 |
# File 'lib/oci8/metadata.rb', line 1494 def precision __is_implicit? ? attr_get_sb2(OCI_ATTR_PRECISION) : attr_get_ub1(OCI_ATTR_PRECISION) end |
#radix ⇒ Object
Returns a radix (if number type)
1545 1546 1547 |
# File 'lib/oci8/metadata.rb', line 1545 def radix attr_get_ub1(OCI_ATTR_RADIX) end |
#scale ⇒ Object
The scale of numeric arguments. 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.
1502 1503 1504 |
# File 'lib/oci8/metadata.rb', line 1502 def scale attr_get_sb1(OCI_ATTR_SCALE) end |
#schema_name ⇒ Object
For :named_type
or :ref
, returns a string with the schema name under which the type was created, or under which the package was created in the case of package local types
1567 1568 1569 |
# File 'lib/oci8/metadata.rb', line 1567 def schema_name attr_get_string(OCI_ATTR_SCHEMA_NAME) end |
#sub_name ⇒ Object
For :named_type
or :ref
, returns a string with the type name, in the case of package local types
1573 1574 1575 |
# File 'lib/oci8/metadata.rb', line 1573 def sub_name attr_get_string(OCI_ATTR_SUB_NAME) end |
#type_metadata ⇒ Object
to type metadata if possible
1586 1587 1588 |
# File 'lib/oci8/metadata.rb', line 1586 def (OCI8::Metadata::Type) end |
#type_name ⇒ Object
Returns a string which is the type name, or the package name in the case of package local types. 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.
1560 1561 1562 |
# File 'lib/oci8/metadata.rb', line 1560 def type_name attr_get_string(OCI_ATTR_TYPE_NAME) end |
#typecode ⇒ Object
typecode
1474 1475 1476 |
# File 'lib/oci8/metadata.rb', line 1474 def typecode __typecode(OCI_ATTR_TYPECODE) end |