Class: OCI8::Metadata::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/oci8/metadata.rb

Overview

Abstract super class of Metadata classes.

Instance Method Summary collapse

Instance Method Details

#inspectObject

The timestamp of the object - As far as I checked, it is current timestamp, not the object’s timestamp. Why? + def timestamp

attr_get_oradate(OCI_ATTR_TIMESTAMP)

end



98
99
100
# File 'lib/oci8/metadata.rb', line 98

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

#obj_idObject

call-seq:

obj_id -> integer or nil

Returns the object ID, which is the same as the value of the OBJECT_ID column from ALL_OBJECTS. It returns nil if the database object doesn’t have ID.



68
69
70
# File 'lib/oci8/metadata.rb', line 68

def obj_id
  attr_get_ub4(OCI_ATTR_OBJ_ID)
end

#obj_nameObject

call-seq:

obj_name -> string

Retruns the object name such as table name, view name, procedure name, and so on.



77
78
79
# File 'lib/oci8/metadata.rb', line 77

def obj_name
  attr_get_string(OCI_ATTR_OBJ_NAME)
end

#obj_schemaObject

call-seq:

obj_schema -> string

Retruns the schema name. It returns nil if the database object is not defined just under a schema.



86
87
88
# File 'lib/oci8/metadata.rb', line 86

def obj_schema
  attr_get_string(OCI_ATTR_OBJ_SCHEMA)
end