Class: OCI8::Metadata::Schema
Overview
Metadata for a schema.
This is returned by:
-
OCI8#describe_schema(schema_name)
-
OCI8::Metadata::Database#schemas
Instance Method Summary collapse
-
#all_objects ⇒ Object
array of objects in the schema.
-
#inspect ⇒ Object
:nodoc:.
-
#objects ⇒ Object
array of objects in the schema.
Methods inherited from Base
#obj_id, #obj_name, #obj_schema
Instance Method Details
#all_objects ⇒ Object
array of objects in the schema. This includes unusable objects.
1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 |
# File 'lib/oci8/metadata.rb', line 1687 def all_objects @all_objects ||= begin begin objs = list_objects rescue OCIError => exc if exc.code != -1 raise end # describe again. objs = __con.describe_schema(obj_schema).list_objects end objs.to_a.collect! do |elem| case elem when OCI8::Metadata::Type # to avoid a segmentation fault begin __con.describe_type(elem.obj_schema + '.' + elem.obj_name) rescue OCIError # ignore ORA-24372: invalid object for describe raise if $!.code != 24372 end else elem end end.compact end end |
#inspect ⇒ Object
:nodoc:
1735 1736 1737 |
# File 'lib/oci8/metadata.rb', line 1735 def inspect # :nodoc: "#<#{self.class.name}:(#{obj_id}) #{obj_schema}>" end |
#objects ⇒ Object
array of objects in the schema.
1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 |
# File 'lib/oci8/metadata.rb', line 1717 def objects @objects ||= all_objects.reject do |obj| case obj when Unknown true when Synonym begin obj.objid false rescue OCIError true end else false end end end |