class OCI8::Metadata::Schema

  • OCI8::Metadata::Database#schemas
    * OCI8#describe_schema(schema_name)
    This is returned by:
    Metadata for a schema.

def all_objects

This includes unusable objects.
array of objects in the schema.
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

def inspect # :nodoc:

:nodoc:
def inspect # :nodoc:
  "#<#{self.class.name}:(#{obj_id}) #{obj_schema}>"
end

def list_objects

def list_objects
  __param(OCI_ATTR_LIST_OBJECTS)
end

def objects

array of objects in the schema.
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