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_link, #obj_name, #obj_schema
Instance Method Details
#all_objects ⇒ Object
array of objects in the schema. This includes unusable objects.
1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 |
# File 'lib/oci8/metadata.rb', line 1737 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:
1785 1786 1787 |
# File 'lib/oci8/metadata.rb', line 1785 def inspect # :nodoc: "#<#{self.class.name}:(#{obj_id}) #{obj_schema}>" end |
#objects ⇒ Object
array of objects in the schema.
1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 |
# File 'lib/oci8/metadata.rb', line 1767 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 |