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



95
96
97
# File 'lib/oci8/metadata.rb', line 95

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

#obj_idInteger 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.

Returns:

  • (Integer or nil)


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

def obj_id
  attr_get_ub4(OCI_ATTR_OBJ_ID)
end

#obj_nameString

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

Returns:



75
76
77
# File 'lib/oci8/metadata.rb', line 75

def obj_name
  attr_get_string(OCI_ATTR_OBJ_NAME)
end

#obj_schemaString

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

Returns:



83
84
85
# File 'lib/oci8/metadata.rb', line 83

def obj_schema
  attr_get_string(OCI_ATTR_OBJ_SCHEMA)
end