class OCI8::Metadata::Column

  • OCI8::Metadata::Table#columns
    This is returned by:
    Metadata for a sequence.

def char_size

OCI8::Metadata::Column#data_size which gets the byte length.
characters allowed in the column. It is the counterpart of
returns the column character length which is the number of
def char_size
  attr_get_ub2(OCI_ATTR_CHAR_SIZE)
end

def char_used?

[:char] character-length semantics.
[:byte] byte-length semantics
returns the type of length semantics of the column.
def char_used?
  attr_get_ub1(OCI_ATTR_CHAR_USED) != 0
end

def charset_form

The character set form, if the column is of a string/character type
def charset_form
  __charset_form
end

def charset_id

The character set id, if the column is of a string/character type
def charset_id
  attr_get_ub2(OCI_ATTR_CHARSET_ID)
end

def charset_name

The character set name, if the column is of a string/character type
def charset_name
  __charset_name(charset_id)
end

def data_size

or upper.
character-length semantics columns when using Oracle 9i
This returns character length multiplied by NLS ratio for
returned in bytes and not characters for strings and raws.
The maximum size of the column. This length is
def data_size
  attr_get_ub2(OCI_ATTR_DATA_SIZE)
end

def data_type

the datatype of the column.
def data_type
  __data_type
end

def data_type_string

def data_type_string
  __data_type_string
end

def fsprecision

The fractional seconds precision of a datetime or interval.
def fsprecision
  attr_get_ub1(OCI_ATTR_FSPRECISION)
end

def inspect # :nodoc:

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

def lfprecision

The leading field precision of an interval
def lfprecision
  attr_get_ub1(OCI_ATTR_LFPRECISION)
end

def name

column name
def name
  attr_get_string(OCI_ATTR_NAME)
end

def nullable?

Returns 0 if null values are not permitted for the column
def nullable?
  __boolean(OCI_ATTR_IS_NULL)
end

def precision

NUMBER(precision, scale) can be represented simply as NUMBER.
NUMBER(precision, scale). For the case when precision is 0,
and scale is -127, then it is a FLOAT, else it is a
The precision of numeric columns. If the precision is nonzero
def precision
  __is_implicit? ? attr_get_sb2(OCI_ATTR_PRECISION) : attr_get_ub1(OCI_ATTR_PRECISION)
end

def scale

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

def schema_name

Returns a string with the schema name under which the type has been created
def schema_name
  rv = attr_get_string(OCI_ATTR_SCHEMA_NAME)
  rv.length == 0 ? nil : rv
end

def to_s

def to_s
  %Q{"#{name}" #{__data_type_string}}
end

def type_metadata

to type metadata if possible
def type_metadata
  case attr_get_ub2(OCI_ATTR_DATA_TYPE)
  when 108, 110 # named_type or ref
    __type_metadata(OCI8::Metadata::Type)
  else
    nil
  end
end

def type_name

returned
type name of the named datatype pointed to by the REF is
datatype's type is returned. If the datatype is :ref, the
:ref. If the datatype is :named_type, the name of the named
will contain the type name if the datatype is :named_type or
Returns a string which is the type name. The returned value
def type_name
  rv = attr_get_string(OCI_ATTR_TYPE_NAME)
  rv.length == 0 ? nil : rv
end