| Qore OracleSqlUtil Module Reference 1.4.3

Public Member Functions | Public Attributes | Protected Member Functions | List of all members
OracleSqlUtil::OracleTable Class Reference

represents an Oracle table More...

Inherits AbstractTable.

## Public Member Functions
bool | bindEmptyStringsAsNull ()
| returns True because Oracle treats empty strings like NULL on insert More...
string | getBaseType ()
| returns the base type of the underlying object (either "table" or `"view"`) More...
code | getBulkUpsertClosure (hash example_row, int upsert_strategy=AbstractTable::UpsertAuto, *hash opt)
| Oracle always supports bulk merging.
string | getColumnSqlName (string col)
| returns the column name for use in SQL strings; subclasses can return a special string in case the column name is a reserved word
list | getColumnSqlNames (softlist cols)
| returns a list of column names for use in SQL strings; subclasses can process the argument list in case a column name is a reserved word
*string | getComment ()
| returns any table comment or NOTHING if none is known
string | getSchemaName ()
| returns the schema name
string | getSqlName ()
| returns the schema and table name in dot notation
*string | getTablespaceName ()
| returns the data tablespace name for the table if any or NOTHING if none is known
code | getUpsertClosure (hash< auto > row, int upsert_strategy=UpsertAuto, *hash opt)
| returns a closure for performing upserts; if the upsert_strategy argument is UpsertInsertFirst or UpsertUpdateFirst, then this argument is ignored and a closure using an Oracle merge statement is returned
bool | hasArrayBind ()
| returns True because the oracle driver supports array binds / bulk DML operations
bool | isView ()
| This method can change itself or disappear in the near future. Do not use it.

## Public Attributes
const | OracleConstraintOptions = ...
| Oracle-specific constraint options. More...
const | OracleCopMap = ...
| column operator specializations for Oracle
const | OracleIndexOptions = ...
| Oracle-specific index options. More...
const | OracleIopMap = ...
| a hash of default value operator descriptions for Oracle
const | OracleOpMap = ...
| where operator specializations for Oracle
const | OraclePseudoColumnHash = ...
| a hash of valid pseudocolumns
const | OracleSelectOptions = ...
| Oracle select options. More...
const | OracleTableCreationOptions = ...
| Oracle table creation options.
const | OracleTruncDate = ...
| Map SqlUtil::cop_trunc_date() constants to Oracle internal masks.
const | OracleUopMap = ...
| a hash of default update operator definitions for Oracle
const | OraColumnDescOptions = AbstractTable::ColumnDescOptions + OraColumnOpts
| Oracle-specific column options. More...
const | OraColumnOptions = AbstractTable::ColumnOptions + OraColumnOpts
| Oracle-specific column options. More...
const | OraTypeMap = ...
| maps oracle type names to type descriptions
const | QoreTypeMap = ...
| maps qore type names to an oracle type

## Protected Member Functions
bool | asteriskRequiresPrefix ()
| returns True if the database requires a wildcard `"*"` to be prefixed with the table name when it appears with other column arguments in a select statement
bool | constraintsLinkedToIndexesImpl ()
| returns True if the database links constraints to indexes (ie dropping the constraint drops the index, etc)
| copyImpl (AbstractTable old)
| db-specific copy actions
| doSelectLimitOnlyUnlockedImpl (reference< string > sql, reference< list< auto >> args, *hash< auto > qh)
| processes a string for use in SQL select statements when there is a "limit" argument, but no "orderby" or "offset" arguments
hash< auto > | getColumnOperatorMapImpl ()
| returns the column operator map for this object
hash< auto > | getInsertOperatorMap ()
| returns the insert operator map for this object
AbstractDataProviderType | getNumericTypeImpl (string native_type, bool nullable, *hash< auto > options)
| returns the type for number / numeric columns for the database so that data conversions can be handled properly
*hash< auto > | getPseudoColumnHash ()
| returns a hash of valid pseudocolumns
hash< auto > | getRawUpdateOperatorMap ()
| returns the raw (default) update operator map for this object
AbstractSavepointHelper | getSavepointHelperImpl (*string savepoint)
| get DB-specific savepoint helper More...
hash< auto > | getSelectOptions ()
| override in subclasses to return driver-specific options
*string | getSqlValueImpl (auto v)
| returns a string for use in SQL queries representing the DB-specific value of the argument; returns NOTHING if the type cannot be converted to an SQL string
code | getUpsertInsertOnly (Columns cols, hash< auto > row, *hash opt)
| high-performance "insert only" upsert supporting bulk DML
code | getUpsertUpdateOnly (Columns cols, hash< auto > row, *hash opt)
| high-performance "update only" upsert supporting bulk DML
hash< auto > | getWhereOperatorMap ()
| returns the "where" operator map for this object
bool | isDuplicateRowErrorImpl (hash< ExceptionInfo > ex)
| Returns True if the exception was raised because of a duplicate row / key error. More...
bool | optimizedLimit (*hash< auto > qh)
| Returns True if the current connection supports optimized `limit` option handling. More...
bool | supportsTablespacesImpl ()
| returns True if the database support tablespaces
bool | uniqueIndexCreatesConstraintImpl ()
| returns True if the database automatically creates a unique constraint when a unique index is created (ex: mysql)

## Detailed Description

represents an Oracle table

this is the specialization of SqlUtil::AbstractTable

## Member Function Documentation

## ◆ bindEmptyStringsAsNull()

bool OracleSqlUtil::OracleTable::bindEmptyStringsAsNull | ( |  | ) |

returns True because Oracle treats empty strings like NULL on insert

Since
  OracleSqlUtil 1.2

## ◆ getBaseType()

string OracleSqlUtil::OracleTable::getBaseType | ( |  | ) |

returns the base type of the underlying object (either "table" or `"view"`)

Since
  OracleSqlUtil 1.2

## ◆ getSavepointHelperImpl()

AbstractSavepointHelper OracleSqlUtil::OracleTable::getSavepointHelperImpl | ( | *string | savepoint | ) |
| protected

get DB-specific savepoint helper

Parameters

  savepoint | the savepoint string, if not given a unique savepoint string will be generated

Since
  SqlUtil 1.6

## ◆ isDuplicateRowErrorImpl()

bool OracleSqlUtil::OracleTable::isDuplicateRowErrorImpl | ( | hash< ExceptionInfo > | ex | ) |
| protected

Returns True if the exception was raised because of a duplicate row / key error.

Since
  OracleSqlUtil 1.4.3

## ◆ optimizedLimit()

bool OracleSqlUtil::OracleTable::optimizedLimit | ( | *hash< auto > | qh | ) |
| protected

Returns True if the current connection supports optimized `limit` option handling.

Note
  `FETCH NEXT x ROWS ONLY` is not supported with `FOR UPDATE`

## Member Data Documentation

## ◆ OracleConstraintOptions

const OracleSqlUtil::OracleTable::OracleConstraintOptions = ...

Oracle-specific constraint options.

this constant extends OracleIndexOptions as returned by `OracleSqlUtil::OracleTable::getConstraintOptions()` with the following keys:

- `index:` adds "using index <indexname>" to the constraint creation string

## ◆ OracleIndexOptions

const OracleSqlUtil::OracleTable::OracleIndexOptions = ...

Oracle-specific index options.

this constant extends SqlUtil::AbstractTable::IndexOptions as returned by `OracleSqlUtil::OracleTable::getIndexOptions()` with the following keys:

- `compute_statistics:` adds "compute statistics" to index creation strings

## ◆ OracleSelectOptions

const OracleSqlUtil::OracleTable::OracleSelectOptions = ...

Oracle select options.

This constant extends SqlUtil::AbstractTable::SelectOptions with the following options as returned by OracleSqlUtil::OracleTable::getSelectOptions():

- `partition:` the partition name to use in a query (see Partition Support in Selects)

## ◆ OraColumnDescOptions

const OracleSqlUtil::OracleTable::OraColumnDescOptions = AbstractTable::ColumnDescOptions + OraColumnOpts

Oracle-specific column options.

this constant extends SqlUtil::AbstractTable::ColumnDescOptions as returned by `OracleSqlUtil::OracleTable::getColumnDescOptions()` with the following keys:

- `character_semantics:` to specify that applicable character columns use character semantics in the column definition

## ◆ OraColumnOptions

const OracleSqlUtil::OracleTable::OraColumnOptions = AbstractTable::ColumnOptions + OraColumnOpts

Oracle-specific column options.

this constant extends SqlUtil::AbstractTable::ColumnOptions as returned by `OracleSqlUtil::OracleTable::getColumnOptions()` with the following keys:

- `character_semantics:` adds "char" to the column type name for applicable character columns to use character semantics for the column