Qore OracleSqlUtil Module Reference  1.2
OracleSqlUtil::OracleDatabase Class Reference

the Oracle specialization for SqlUtil::AbstractDatabase More...

Inheritance diagram for OracleSqlUtil::OracleDatabase:

Public Member Functions

private computeStatisticsImpl (*hash options)
 compute statistics implementation. See SqlUtil::AbstractDatabase::computeStatistics()
 
private computeStatisticsSchemaImpl (*hash options)
 compute statistics for schema - a helper method
 
private computeStatisticsTablesImpl (*hash options)
 compute statistics for table(s) - a helper method
 
 constructor (AbstractDatasource nds, *hash opts)
 creates the object from the arguments given
 
private hash getAlignSchemaOptions ()
 returns driver-specific options to the base abstract class
 
private hash getComputeStatisticsOptions ()
 returns driver-specific options to the base abstract class
 
private hash getCreationOptions ()
 returns driver-specific options to the base abstract class
 
private softint getCurrentSequenceValueImpl (string name)
 returns the last value issued for the given sequence in the current session
 
*OracleMaterializedView getMaterializedView (string name)
 returns an OracleMaterializedView object for the package name given or NOTHING if the object does not exist or is not accessible
 
private softint getNextSequenceValueImpl (string name)
 returns the next value in the given sequence
 
*OraclePackage getPackage (string name)
 returns an OraclePackage object for the package name given or NOTHING if the object does not exist or is not accessible
 
private hash getRebuildIndexOptions ()
 returns driver-specific options to the base abstract class
 
private hash getSchemaDescriptionOptions ()
 returns driver-specific options to the base abstract class
 
*OracleType getType (string name)
 returns an OracleType object for the package name given or NOTHING if the object does not exist or is not accessible
 
list listMaterializedViews ()
 returns a list of string materialized view names in the database
 
list listPackages ()
 returns a list of string package names in the database
 
list listSynonyms ()
 returns a list of string synonym names in the database
 
list listTypes ()
 returns a list of string type names in the database
 
ListIterator materializedViewIterator ()
 returns an iterator listing the string materialized view names in the database
 
ListIterator packageIterator ()
 returns an iterator listing the string package names in the database
 
bool rebuildIndexAnalyze (AbstractIndex index, int maxh, int maxleaf)
 analyze index with ALTER INDEX ANAYZE. Then it checks INDEX_STATS for advices to rebuild. More...
 
bool rebuildIndexAnalyze (string name, int maxh, int maxleaf)
 analyze index with ALTER INDEX ANAYZE. Then it checks INDEX_STATS for advices to rebuild. More...
 
private bool rebuildIndexImpl (string name, *hash options)
 rebuild index implementation. See SqlUtil::AbstractDatabase::rebuildIndex()
 
private reclaimSpaceImpl (*hash options)
 reclaim space implementation. See SqlUtil::AbstractDatabase::reclaimSpace()
 
private bool supportsPackagesImpl ()
 returns True if the database supports packages
 
private bool supportsSequencesImpl ()
 returns True if the database supports sequences
 
private bool supportsTypesImpl ()
 returns True if the database supports named types
 
ListIterator synonymIterator ()
 returns an iterator listing the string synonym names in the database
 
ListIterator typeIterator ()
 returns an iterator listing the string type names in the database
 

Public Attributes

const OracleAlignSchemaOptions
 oracle-specific schema description / alignment options
 
const OracleComputeStatisticsOptions
 Options for computeStatistics()
 
const OracleCreationOptions
 oracle-specific generic creation options
 
const OracleMaterializedViewDescriptionOptions
 oracle-specific materialized view description options
 
const OraclePackageDescriptionOptions
 oracle-specific package description options
 
const OracleRebuildIndexOptions
 Options for rebuildIndex()
 
const OracleReservedWords
 hash of reserved words
 
const OracleSchemaDescriptionOptions
 oracle-specific schema description keys More...
 

Detailed Description

the Oracle specialization for SqlUtil::AbstractDatabase

Member Function Documentation

bool OracleSqlUtil::OracleDatabase::rebuildIndexAnalyze ( AbstractIndex  index,
int  maxh,
int  maxleaf 
)

analyze index with ALTER INDEX ANAYZE. Then it checks INDEX_STATS for advices to rebuild.

Outputs of this method are hints only. Real investigation of index is strongly recommended.

Warning
content of this method can be changed anytime when there will be any better way how to analyze indexes.
Parameters
indexan AbstractIndex to analyze
maxhmaximum oracle index height before rebuilding index
maxleafmaximum oracle percentage of deleted leaf nodes before rebuilding index
Returns
bool True for "suggested for rebuilding", False for "no action needed"
Exceptions
ANALYZE-INDEX-ERRORif there are no data in INDEX_STATS table
bool OracleSqlUtil::OracleDatabase::rebuildIndexAnalyze ( string  name,
int  maxh,
int  maxleaf 
)

analyze index with ALTER INDEX ANAYZE. Then it checks INDEX_STATS for advices to rebuild.

Outputs of this method are hints only. Real investigation of index is strongly recommended.

Warning
content of this method can be changed anytime when there will be any better way how to analyze indexes.
Parameters
nameindex name
maxhmaximum oracle index height before rebuilding index
maxleafmaximum oracle percentage of deleted leaf nodes before rebuilding index
Returns
bool True for "suggested for rebuilding", False for "no action needed"
Exceptions
ANALYZE-INDEX-ERRORif there are no data in INDEX_STATS table

Member Data Documentation

const OracleSqlUtil::OracleDatabase::OracleSchemaDescriptionOptions
Initial value:
= AbstractDatabase::SchemaDescriptionOptions + (
"types": Type::Hash,
"type_map": Type::Hash,
"packages": Type::Hash,
"package_map": Type::Hash,
"materialized_views": Type::Hash,
"materialized_view_map": Type::Hash,
)

oracle-specific schema description keys

This constant extends SqlUtil::AbstractDatabase::SchemaDescriptionOptions as returned by OracleSqlUtil::OracleTable::getSchemaDescriptionOptions with the following Oracle-specific keys:

  • types: for Oracle type definitions
  • type_map: to automatically renaming Oracle types during schema alignment
  • packages: for Oracle package descriptions
  • package_map: for automatically renaming Oracle types during schema alignment
  • materialized_views: for Oracle materialized view descriptions
  • materialized_view_map: for automatically renaming Oracle materialized views during schema alignment