436 constructor(AbstractDatasource ds, *
string savepoint =
'x' + get_random_string(29)) ;
482 constructor(
string n,
string nt, *
string qt, softint sz,
bool nul, *
string dv, *
string cm,
bool is_char = False,
bool cu = False, softint bs, *
int scale)
551 constructor(
string n,
string nt, *
string qt, softint sz,
bool nul, *
string dv, *
string cm, softint bs, softint
scale = 0) ;
589 constructor(
string n, Columns c, ForeignConstraintTarget t,
bool e) ;
592 string getCreateSql(
string table_name, *hash opt);
595 softlist getRenameSql(
string table_name,
string new_name);
614 constructor(
string n,
string n_src,
bool e = True) ;
617 string getCreateSql(
string table_name, *hash opt);
620 softlist getRenameSql(
string table_name,
string new_name);
645 constructor(
string n, hash n_cols,
bool e = True, *
string ts) ;
668 bool setIndexBase(
string ix);
675 string getCreateSql(
string table_name, *hash opts);
678 softlist getRenameSql(
string table_name,
string new_name);
711 constructor(
string n, *hash c, *
string ts) ;
734 bool setIndexBase(
string ix);
741 string getCreateSql(
string table_name, *hash opts);
744 softlist getRenameSql(
string table_name,
string new_name);
767 constructor(
string n_name, number n_start = 1, number n_increment = 1, *softnumber n_end) ;
801 constructor(
string n_name,
string n_src, *
string n_schema, *
string n_type_text, *
string n_oid_text, *
string n_view_type_owner, *
string n_view_type, *
string n_superview_name,
bool n_updatable,
bool n_container_data)
825 constructor(
string n,
string n_src,
bool en = True) ;
828 softlist getCreateSql(
string table_name, *hash opt);
977 constructor(
string n,
string n_src,
bool n_logging = True,
bool n_use_index = True, *
string n_tablespace) ;
984 bool equalImpl(AbstractFunctionBase t);
1048 list<string> featuresImpl();
1053 OracleSequence makeSequenceImpl(
string name, number start = 1, number increment = 1, *softnumber end, *hash
opts);
1058 getSchemaName(reference<string> name, reference<string> schema);
1063 *AbstractSequence getSequenceImpl(
string name);
1068 *AbstractView getViewImpl(
string name);
1098 OracleMaterializedView makeMaterializedView(
string name,
string src,
bool logging = True,
bool use_index = True, *
string tablespace, *hash
opts);
1108 list<auto> getDropSchemaSqlImpl(hash<auto> schema_hash, *hash<auto> opt);
1113 list getAlignSqlImpl(hash schema_hash, *hash opt);
1140 *
string getSource(
string type,
string name);
1145 checkSource(
string type,
string name, reference<string> src);
1182 list<string> listTablesImpl();
1187 list<string> listFunctionsImpl();
1192 list<string> listProceduresImpl();
1197 list<string> listSequencesImpl();
1202 list<string> listViewsImpl();
1207 list<string> getListIntern(
string type);
1212 list<string> getListIntern(list<auto>
l);
1217 string getCreateSqlImpl(list
l);
1221 static string getCreateSql(list
l);
1352 oracleErrorCallback(
int ac,
string type,
string name, *
string table, *
string new_name, *
string info,
string sql, hash<ExceptionInfo> ex);
1365 "number": (
"qore": Type::Number,
"size": SZ_NUM,
"size_range": (1, 38),
"scale_range": (-84, 127)),
1367 "qore": Type::String,
1369 "size_range": (1, 4000),
1371 "default_size": AbstractColumn::DefaultVarcharSize,
1374 "qore": Type::String,
1376 "size_range": (1, 4000),
1378 "default_size": AbstractColumn::DefaultVarcharSize,
1380 "date": (
"qore": Type::Date,),
1381 "timestamp": (
"qore": Type::Date,
"size": SZ_OPT,
"size_range": (0, 9)),
1382 "timestamp with time zone": (
"qore": Type::Date,
"size": SZ_OPT,
"size_range": (0, 9)),
1383 "timestamp with local time zone": (
"qore": Type::Date,
"size": SZ_OPT,
"size_range": (0, 9)),
1384 "interval year to month": (
"qore": Type::Date,),
1385 "interval day to second": (
"qore": Type::Date,),
1386 "timestamp(0)": (
"qore": Type::Date,),
1387 "timestamp(1)": (
"qore": Type::Date,),
1388 "timestamp(2)": (
"qore": Type::Date,),
1389 "timestamp(3)": (
"qore": Type::Date,),
1390 "timestamp(4)": (
"qore": Type::Date,),
1391 "timestamp(5)": (
"qore": Type::Date,),
1392 "timestamp(6)": (
"qore": Type::Date,),
1393 "timestamp(7)": (
"qore": Type::Date,),
1394 "timestamp(8)": (
"qore": Type::Date,),
1395 "timestamp(9)": (
"qore": Type::Date,),
1396 "timestamp(0) with time zone": (
"qore": Type::Date,),
1397 "timestamp(1) with time zone": (
"qore": Type::Date,),
1398 "timestamp(2) with time zone": (
"qore": Type::Date,),
1399 "timestamp(3) with time zone": (
"qore": Type::Date,),
1400 "timestamp(4) with time zone": (
"qore": Type::Date,),
1401 "timestamp(5) with time zone": (
"qore": Type::Date,),
1402 "timestamp(6) with time zone": (
"qore": Type::Date,),
1403 "timestamp(7) with time zone": (
"qore": Type::Date,),
1404 "timestamp(8) with time zone": (
"qore": Type::Date,),
1405 "timestamp(9) with time zone": (
"qore": Type::Date,),
1406 "timestamp(0) with local time zone": (
"qore": Type::Date,),
1407 "timestamp(1) with local time zone": (
"qore": Type::Date,),
1408 "timestamp(2) with local time zone": (
"qore": Type::Date,),
1409 "timestamp(3) with local time zone": (
"qore": Type::Date,),
1410 "timestamp(4) with local time zone": (
"qore": Type::Date,),
1411 "timestamp(5) with local time zone": (
"qore": Type::Date,),
1412 "timestamp(6) with local time zone": (
"qore": Type::Date,),
1413 "timestamp(7) with local time zone": (
"qore": Type::Date,),
1414 "timestamp(8) with local time zone": (
"qore": Type::Date,),
1415 "timestamp(9) with local time zone": (
"qore": Type::Date,),
1416 "interval year(0) to month": (
"qore": Type::Date,),
1417 "interval year(1) to month": (
"qore": Type::Date,),
1418 "interval year(2) to month": (
"qore": Type::Date,),
1419 "interval year(3) to month": (
"qore": Type::Date,),
1420 "interval year(4) to month": (
"qore": Type::Date,),
1421 "interval year(5) to month": (
"qore": Type::Date,),
1422 "interval year(6) to month": (
"qore": Type::Date,),
1423 "interval year(7) to month": (
"qore": Type::Date,),
1424 "interval year(8) to month": (
"qore": Type::Date,),
1425 "interval year(9) to month": (
"qore": Type::Date,),
1426 "interval day(0) to second(0)": (
"qore": Type::Date,),
1427 "interval day(0) to second(1)": (
"qore": Type::Date,),
1428 "interval day(0) to second(2)": (
"qore": Type::Date,),
1429 "interval day(0) to second(3)": (
"qore": Type::Date,),
1430 "interval day(0) to second(4)": (
"qore": Type::Date,),
1431 "interval day(0) to second(5)": (
"qore": Type::Date,),
1432 "interval day(0) to second(6)": (
"qore": Type::Date,),
1433 "interval day(0) to second(7)": (
"qore": Type::Date,),
1434 "interval day(0) to second(8)": (
"qore": Type::Date,),
1435 "interval day(0) to second(9)": (
"qore": Type::Date,),
1436 "interval day(1) to second(0)": (
"qore": Type::Date,),
1437 "interval day(1) to second(1)": (
"qore": Type::Date,),
1438 "interval day(1) to second(2)": (
"qore": Type::Date,),
1439 "interval day(1) to second(3)": (
"qore": Type::Date,),
1440 "interval day(1) to second(4)": (
"qore": Type::Date,),
1441 "interval day(1) to second(5)": (
"qore": Type::Date,),
1442 "interval day(1) to second(6)": (
"qore": Type::Date,),
1443 "interval day(1) to second(7)": (
"qore": Type::Date,),
1444 "interval day(1) to second(8)": (
"qore": Type::Date,),
1445 "interval day(1) to second(9)": (
"qore": Type::Date,),
1446 "interval day(2) to second(0)": (
"qore": Type::Date,),
1447 "interval day(2) to second(1)": (
"qore": Type::Date,),
1448 "interval day(2) to second(2)": (
"qore": Type::Date,),
1449 "interval day(2) to second(3)": (
"qore": Type::Date,),
1450 "interval day(2) to second(4)": (
"qore": Type::Date,),
1451 "interval day(2) to second(5)": (
"qore": Type::Date,),
1452 "interval day(2) to second(6)": (
"qore": Type::Date,),
1453 "interval day(2) to second(7)": (
"qore": Type::Date,),
1454 "interval day(2) to second(8)": (
"qore": Type::Date,),
1455 "interval day(2) to second(9)": (
"qore": Type::Date,),
1456 "clob": (
"qore": Type::String,),
1457 "blob": (
"qore": Type::Binary,),
1458 "long": (
"qore": Type::Binary,),
1459 "raw": (
"qore": Type::Binary,
"size": SZ_MAND,
"size_range": (1, 2000)),
1460 "bfile": (
"qore": Type::Binary,),
1461 "binary_float": (
"qore": Type::Float,),
1462 "binary_double": (
"qore": Type::Float,),
1463 "rowid": (
"qore": Type::String,),
1464 "urowid": (
"qore": Type::String,
"size": SZ_OPT,
"size_range": (1, 4000)),
1469 "integer":
"number",
1472 "string":
"varchar2",
1473 "date":
"timestamp(6)",
1480 const OraColumnOpts = {
1481 "character_semantics": Type::Boolean,
1501 "compute_statistics": Type::Boolean,
1509 "index": Type::String,
1524 "partition": Type::String,
1529 OP_SUBSTR: DefaultExpressionMap{OP_SUBSTR} + {
1530 "code":
string sub (reference<hash<QueryInfo>> info,
int role, list<auto> args) {
1531 string exp0 = info.table.getExpressionArg(\info, role, args[0],
1532 AbstractDataProviderTypeMap.
"string");
1533 string exp1 = info.table.getExpressionArg(\info, role, args[1],
1534 AbstractDataProviderTypeMap.
"int");
1535 if (!exists args[2]) {
1536 return sprintf(
"substr(%s,%s)", exp0, exp1);
1538 return sprintf(
"substr(%s,%s,%s)", exp0, exp1,
1539 info.table.getExpressionArg(\info, role, args[2], AbstractDataProviderTypeMap.
"int"));
1543 "exp": <DataProviderExpressionInfo>{
1544 "type": DET_Operator,
1547 "desc":
"cast operator",
1550 DataProviderSignatureAnyType,
1551 DataProviderSignatureStringValueType,
1552 DataProviderSignatureOptionalIntValueType,
1553 DataProviderSignatureOptionalIntValueType,
1555 "return_type": AbstractDataProviderTypeMap.
"any",
1557 "code":
string sub (reference<hash<QueryInfo>> info,
int role, list<auto> args) {
1558 string exp0 = info.table.getExpressionArg(\info, role, args[0],
1559 AbstractDataProviderTypeMap.
"any");
1562 string sql = sprintf (
"cast (%s as %s", exp0,
name);
1563 if (desc.size == SZ_MAND) {
1564 if (!exists args[1] && !exists desc.size_range)
1565 throw "OPERATOR-ERROR", sprintf (
"cast operator missing size for type %s",
1567 sql += sprintf(
"(%d)", args[1] ?? desc.size_range[1]);
1568 }
else if (desc.size == SZ_NUM && exists args[1]) {
1569 sql += sprintf(
"(%d", args[1]);
1570 sql += exists args[2] ? sprintf(
",%d)", args[2]) :
")";
1571 }
else if (desc.size == SZ_OPT && exists args[1]) {
1572 sql += sprintf(
"(%d)", args[1]);
1579 "exp": <DataProviderExpressionInfo>{
1580 "type": DET_Operator,
1583 "desc":
"returns the year component of a date as a string (ex: `2022`)",
1586 DataProviderSignatureDateType,
1588 "return_type": AbstractDataProviderTypeMap.
"string",
1590 "code":
string sub (reference<hash<QueryInfo>> info,
int role, list<auto> args) {
1591 string exp0 = info.table.getExpressionArg(\info, role, args[0],
1592 AbstractDataProviderTypeMap.
"date");
1593 return sprintf(
"to_char(%s, 'YYYY')", exp0);
1597 "exp": <DataProviderExpressionInfo>{
1598 "type": DET_Operator,
1599 "label": COP_YEAR_MONTH,
1600 "name": COP_YEAR_MONTH,
1601 "desc":
"returns the year and month components of a date as a string (ex: `2022-06`)",
1602 "symbol": COP_YEAR_MONTH,
1604 DataProviderSignatureDateType,
1606 "return_type": AbstractDataProviderTypeMap.
"string",
1608 "code":
string sub (reference<hash<QueryInfo>> info,
int role, list<auto> args) {
1609 string exp0 = info.table.getExpressionArg(\info, role, args[0],
1610 AbstractDataProviderTypeMap.
"date");
1611 return sprintf(
"to_char(%s, 'YYYY-MM')", exp0);
1615 "exp": <DataProviderExpressionInfo>{
1616 "type": DET_Operator,
1617 "label": COP_YEAR_DAY,
1618 "name": COP_YEAR_DAY,
1619 "desc":
"returns the year, month, and day components of a date as a string (ex: `2022-06-29`)",
1620 "symbol": COP_YEAR_DAY,
1622 DataProviderSignatureDateType,
1624 "return_type": AbstractDataProviderTypeMap.
"string",
1626 "code":
string sub (reference<hash<QueryInfo>> info,
int role, list<auto> args) {
1627 string exp0 = info.table.getExpressionArg(\info, role, args[0],
1628 AbstractDataProviderTypeMap.
"date");
1629 return sprintf(
"to_char(%s, 'YYYY-MM-DD')", exp0);
1633 "exp": <DataProviderExpressionInfo>{
1634 "type": DET_Operator,
1635 "label": COP_YEAR_HOUR,
1636 "name": COP_YEAR_HOUR,
1637 "desc":
"returns the year, month, day, and hour components of a date as a string "
1638 "(ex: `2022-06-29 15`)",
1639 "symbol": COP_YEAR_HOUR,
1641 DataProviderSignatureDateType,
1643 "return_type": AbstractDataProviderTypeMap.
"string",
1645 "code":
string sub (reference<hash<QueryInfo>> info,
int role, list<auto> args) {
1646 string exp0 = info.table.getExpressionArg(\info, role, args[0],
1647 AbstractDataProviderTypeMap.
"date");
1648 return sprintf(
"to_char(%s, 'YYYY-MM-DD HH24')", exp0);
1652 "exp": <DataProviderExpressionInfo>{
1653 "type": DET_Operator,
1654 "label": COP_TRUNC_DATE,
1655 "name": COP_TRUNC_DATE,
1656 "desc":
"truncates the given date to the given resolution; args: date, string code: Y: year, "
1657 "M: month, D: day, H: hour, m: minute, S: second",
1658 "symbol": COP_TRUNC_DATE,
1660 DataProviderSignatureDateType,
1661 DataProviderSignatureStringValueType,
1663 "return_type": AbstractDataProviderTypeMap.
"date",
1665 "code":
string sub(reference<hash<QueryInfo>> info,
int role, list<auto> args) {
1668 throw "TRUNC-DATE-ERROR", sprintf(
"unknown date truncation format argument %y; "
1669 "supported date format arguments: %y", args[1], keys
OracleTruncDate);
1671 string exp0 = info.table.getExpressionArg(\info, role, args[0],
1672 AbstractDataProviderTypeMap.
"date");
1674 return sprintf(
"trunc(%s, %s)", exp0, str);
1677 return sprintf(
"cast (%s as date)", exp0);
1681 "exp": <DataProviderExpressionInfo>{
1682 "type": DET_Operator,
1685 "desc":
"returns True if the first value is in the list of following values",
1688 DataProviderSignatureAnyType,
1689 DataProviderSignatureAnyType,
1692 "return_type": AbstractDataProviderTypeMap.
"bool",
1694 "code":
string sub (reference<hash<QueryInfo>> info,
int role, list<auto> args) {
1696 auto val = shift args;
1697 # Qorus bug #989 SqlUtil: oracle op_in can fail in large amount of input elements
1698 # There is no support for CLOBs in WHERE clause in Oracle at all.
1699 # Binding large strings (over 4000 chars is performed by a CLOB in Qore driver.
1700 # Result of op_in operator can be "ORA-00932: inconsistent datatypes" if is
1701 # the list longer or if it contains large items with:
1702 # return cn + " in (select regexp_substr(%v,'[^,]+', 1, level) from dual connect by
1703 # regexp_substr(%v, '[^,]+', 1, level) is not null)";
1705 # determine list members type. Let's assume the 1st non NULL/NOTHING
1706 # element gives the type code for all elements.
1707 ListIterator it(args);
1708 # get list type code
1711 switch (it.getValue().typeCode()) {
1720 ltype = it.getValue().typeCode();
1723 throw "ORACLE-IN-OPERATOR-ERROR", sprintf(
"the \"in\" operator unexpected list "
1724 "element type: %s; only simple types are supported", it.getValue().type());
1731 # Split long array to chunks of no more than 32767 elements due to Oracle limitation
1732 # "ORA-22165: OCI-22165: given index [32767] must be in the range of [0] to [32766]"
1736 list<auto> chunk = extract args, 0, 32767;
1738 # Bind to Oracle by expected type
1741 info.args += bindOracleCollection(
"SYS.ODCIDATELIST", chunk);
1746 info.args += bindOracleCollection(
"SYS.ODCINUMBERLIST", chunk);
1749 info.args += bindOracleCollection(
"SYS.ODCIVARCHAR2LIST", chunk);
1754 string exp0 = info.table.getExpressionArg(\info, role, val,
1755 AbstractDataProviderTypeMap.
"date");
1756 return exp0 +
" in (" + (map
"select column_value from table(%v)",
1757 xrange(count)).join(
" union all ") +
")";
1762 throw "MISSING-ORACLE-DRIVER",
"requires the oracle driver";
1767 "exp": <DataProviderExpressionInfo>{
1768 "type": DET_Operator,
1771 "desc":
"returns the next value in the given sequence; args: sequence name",
1774 DataProviderSignatureStringValueType,
1776 "return_type": AbstractDataProviderTypeMap.
"int",
1778 "code":
string sub (reference<hash<QueryInfo>> info,
int role, list<auto> args) {
1779 return sprintf(
"%s.nextval", args[0]);
1783 "exp": <DataProviderExpressionInfo>{
1784 "type": DET_Operator,
1785 "label": COP_SEQ_CURRVAL,
1786 "name": COP_SEQ_CURRVAL,
1787 "desc":
"returns the current value in the given sequence; args: sequence name",
1788 "symbol": COP_SEQ_CURRVAL,
1790 DataProviderSignatureStringValueType,
1792 "return_type": AbstractDataProviderTypeMap.
"int",
1794 "code":
string sub (reference<hash<QueryInfo>> info,
int role, list<auto> args) {
1795 return sprintf(
"%s.currval", args[0]);
1825 "object_value": True,
1849 bool m_isView = False;
1854 hash<string, string> m_sys_views = {
1855 "dba_col_comments" :
"all_col_comments",
1856 "dba_cons_columns" :
"all_cons_columns",
1857 "dba_constraints" :
"all_constraints",
1858 "dba_db_links" :
"all_db_links",
1859 "dba_ind_columns" :
"all_ind_columns",
1860 "dba_ind_expressions" :
"all_ind_expressions",
1861 "dba_indexes" :
"all_indexes",
1862 "dba_objects" :
"all_objects",
1863 "dba_sequences" :
"all_sequences",
1864 "dba_synonyms" :
"all_synonyms",
1865 "dba_tab_columns" :
"all_tab_columns",
1866 "dba_tab_comments" :
"all_tab_comments",
1867 "dba_tables" :
"all_tables",
1868 "dba_triggers" :
"all_triggers",
1869 "dba_views" :
"all_views",
1878 introspectSystemViews();
1885 string systemView(
string name);
1890 bool checkExistenceImpl();
1895 setTableInfoIntern();
1908 hash<auto> setSchemaTable();
1921 *hash resolveSynonym(
string s_owner,
string s_name);
1926 hash<auto> setTable();
1931 string getUserSchema();
1936 string getDBString();
1956 hash<auto> getColumnOptions();
1961 hash<auto> getColumnDescOptions();
1980 insertLimitOptimizerHint(hash<auto> qh, reference<string> sql);
1985 doSelectOrderByWithOffsetSqlUnlockedImpl(reference<hash<QueryInfo>> info, reference<string> sql, list<auto> coll);
1996 Columns describeImpl();
2006 Indexes getIndexesImpl();
2011 ForeignConstraints getForeignConstraintsImpl(*hash
opts);
2016 Constraints getConstraintsImpl();
2021 string getSelectSqlName(*hash qh);
2026 Triggers getTriggersImpl();
2030 string getCreateTableSqlImpl(*hash opt);
2042 *list getCreateMiscSqlImpl(*hash opt,
bool cache);
2047 string getCreateSqlImpl(list
l);
2052 string getRenameSqlImpl(
string new_name);
2057 AbstractColumn addColumnImpl(
string cname, hash opt,
bool nullable = True);
2062 AbstractPrimaryKey addPrimaryKeyImpl(
string cname, hash ch, *hash opt);
2067 AbstractIndex addIndexImpl(
string iname,
bool enabled, hash ch, *hash opt);
2072 AbstractForeignConstraint addForeignConstraintImpl(
string cname, hash ch,
string table, hash tch, *hash opt);
2077 AbstractCheckConstraint addCheckConstraintImpl(
string cname,
string src, *hash opt);
2082 AbstractUniqueConstraint addUniqueConstraintImpl(
string cname, hash ch, *hash opt);
2087 AbstractTrigger addTriggerImpl(
string tname,
string src, *hash opt);
2092 bool tryInsertImpl(
string sql, hash<auto> row);
2105 *list getAlignSqlImpl(AbstractTable t, *hash opt);
2110 hash<auto> getQoreTypeMapImpl();
2115 hash<auto> getTypeMapImpl();
2120 hash<auto> getIndexOptions();
2125 hash<auto> getConstraintOptions();
2130 hash<auto> getTableCreationOptions();
2135 hash<auto> getAlignTableOptions();
2221 *hash doReturningImpl(hash<auto> opt, reference<string> sql, list<auto> args);
2231 setupTableImpl(hash<auto> desc, *hash<auto> opt);
represents an Oracle check constraint
Definition: OracleSqlUtilBase.qm.dox.h:608
string getDisableSql(string table_name)
returns a string that can be used to temporarily disable the constraint from the database
bool enabled
True if the constraint is enabled, False if not
Definition: OracleSqlUtilBase.qm.dox.h:612
string getEnableSql(string table_name, *hash opt)
returns a string that can be used to enable the constraint in the database
the base class for Oracle code objects
Definition: OracleSqlUtilBase.qm.dox.h:845
softlist getRenameSql(string new_name, *hash opt)
returns a string that can be used to rename the object in the database
bool equalImpl(AbstractFunctionBase t)
returns True if the argument is equal to the current object, False if not
constructor(string n, string n_type, string n_src)
creates the object from the arguments passed
softlist getCreateSql(*hash opt)
returns a string that can be used to create the object in the database
the base class for Oracle code objects that cannot be renamed in place
Definition: OracleSqlUtilBase.qm.dox.h:876
softlist getRenameSql(string new_name, *hash opt)
returns a string that can be used to rename the object in the database
constructor(string n, string n_type, string n_src)
creates the object from the arguments passed
represents an Oracle column
Definition: OracleSqlUtilBase.qm.dox.h:468
list< string > getModifySqlImpl(AbstractTable t, AbstractColumn col, *hash opt)
returns a list of sql strings that can be used to modify the column to the new definition
list< string > getAddColumnSql(AbstractTable t)
returns a list of sql strings that can be used to add the column to an existing table
string getRenameSql(AbstractTable t, string new_name)
returns a string that can be used to rename the column
string getNativeTypeString()
returns the string describing the native type that can be used in SQL
string getDdlName(string name)
returns the column name with quoting in case the column name is a reserved word
int byte_size
byte size of the column
Definition: OracleSqlUtilBase.qm.dox.h:474
constructor()
empty constructor for subclasses
bool char_used
the column uses character semantics
Definition: OracleSqlUtilBase.qm.dox.h:472
bool equalImpl(AbstractColumn c)
returns True if the argument is equal to the current object, False if not
the Oracle specialization for SqlUtil::AbstractDatabase
Definition: OracleSqlUtilBase.qm.dox.h:989
int getPhysicalSizeImpl()
SqlUtil::AbstractDatabase::getPhysicalSize()
ListIterator packageIterator()
returns an iterator listing the string package names in the database
const OracleMaterializedViewDescriptionOptions
oracle-specific materialized view description options
Definition: OracleSqlUtilBase.qm.dox.h:1017
softint getNextSequenceValueImpl(string name)
returns the next value in the given sequence
const OracleReservedWords
hash of reserved words
Definition: OracleSqlUtilBase.qm.dox.h:1021
bool rebuildIndexImpl(string name, *hash options)
rebuild index implementation. See SqlUtil::AbstractDatabase::rebuildIndex()
list< string > listSynonyms()
returns a list of string synonym names in the database
int getMaximumPrecision()
Returns the maximum precision for numeric or decimal columns.
bool supportsPackagesImpl()
returns True if the database supports packages
*OraclePackage getPackage(string name)
returns an OraclePackage object for the package name given or NOTHING if the object does not exist or...
ListIterator synonymIterator()
returns an iterator listing the string synonym names in the database
*OracleType getType(string name)
returns an OracleType object for the package name given or NOTHING if the object does not exist or is...
list< string > listMaterializedViews()
returns a list of string materialized view names in the database
bool supportsSequencesImpl()
returns True if the database supports sequences
const OracleAlignSchemaOptions
oracle-specific schema description / alignment options
Definition: OracleSqlUtilBase.qm.dox.h:997
bool rebuildIndexAnalyze(string name, int maxh, int maxleaf)
analyze index with ALTER INDEX ANAYZE. Then it checks INDEX_STATS for advices to rebuild.
reclaimSpaceImpl(*hash options)
reclaim space implementation. See SqlUtil::AbstractDatabase::reclaimSpace()
list< string > listTypes()
returns a list of string type names in the database
const OracleSchemaDescriptionOptions
oracle-specific schema description keys
Definition: OracleSqlUtilBase.qm.dox.h:1009
hash< auto > getSchemaDescriptionOptions()
returns driver-specific options to the base abstract class
const OracleComputeStatisticsOptions
Options for computeStatistics()
Definition: OracleSqlUtilBase.qm.dox.h:1029
hash< auto > getRebuildIndexOptions()
returns driver-specific options to the base abstract class
computeStatisticsImpl(*hash options)
compute statistics implementation. See SqlUtil::AbstractDatabase::computeStatistics()
constructor(AbstractDatasource nds, *hash opts)
creates the object from the arguments given
const OracleMaxPrecision
MAximum precision for Oracle NUMBER columns.
Definition: OracleSqlUtilBase.qm.dox.h:1033
hash< auto > getCreationOptions()
returns driver-specific options to the base abstract class
bool supportsTypesImpl()
returns True if the database supports named types
ListIterator materializedViewIterator()
returns an iterator listing the string materialized view names in the database
const OraclePackageDescriptionOptions
oracle-specific package description options
Definition: OracleSqlUtilBase.qm.dox.h:1013
*OracleMaterializedView getMaterializedView(string name)
returns an OracleMaterializedView object for the package name given or NOTHING if the object does not...
hash< auto > getAlignSchemaOptions()
returns driver-specific options to the base abstract class
bool rebuildIndexAnalyze(AbstractIndex index, int maxh, int maxleaf)
analyze index with ALTER INDEX ANAYZE. Then it checks INDEX_STATS for advices to rebuild.
const OracleCreationOptions
oracle-specific generic creation options
Definition: OracleSqlUtilBase.qm.dox.h:993
ListIterator typeIterator()
returns an iterator listing the string type names in the database
softint getCurrentSequenceValueImpl(string name)
returns the last value issued for the given sequence in the current session
hash< auto > getComputeStatisticsOptions()
returns driver-specific options to the base abstract class
const OracleRebuildIndexOptions
Options for rebuildIndex()
Definition: OracleSqlUtilBase.qm.dox.h:1025
computeStatisticsTablesImpl(*hash options)
compute statistics for table(s) - a helper method
computeStatisticsSchemaImpl(*hash options)
compute statistics for schema - a helper method
list< string > listPackages()
returns a list of string package names in the database
represents an Oracle foreign constraint
Definition: OracleSqlUtilBase.qm.dox.h:583
string getEnableSql(string table_name, *hash opt)
returns a string that can be used to enable the constraint in the database
string getDisableSql(string table_name)
returns a string that can be used to temporarily disable the constraint from the database
bool enabled
True if the constraint is enabled, False if not
Definition: OracleSqlUtilBase.qm.dox.h:587
represents an Oracle function
Definition: OracleSqlUtilBase.qm.dox.h:912
constructor(string n, string n_src)
creates the object from the arguments passed
represents an Oracle index
Definition: OracleSqlUtilBase.qm.dox.h:556
string getCreateSql(string table_name, *hash opt)
returns a string that can be used to create the index in the database
string getRenameSql(string table_name, string new_name)
returns a string that can be used to rename the index in the database
string native_type
the native type of the index (if supported)
Definition: OracleSqlUtilBase.qm.dox.h:560
constructor(string n, bool u, hash c, string nt, *string t)
creates the object from the arguments
bool equalImpl(AbstractIndex ix)
returns True if the argument is equal to the current index, False if not
*string tablespace
the tablespace name of the index (if supported)
Definition: OracleSqlUtilBase.qm.dox.h:563
represents an Oracle materialized view
Definition: OracleSqlUtilBase.qm.dox.h:960
*string tablespace
Name of the potential tablespace.
Definition: OracleSqlUtilBase.qm.dox.h:968
bool use_index
Flag if is index used.
Definition: OracleSqlUtilBase.qm.dox.h:966
bool logging
Flag if is loggign mode used.
Definition: OracleSqlUtilBase.qm.dox.h:964
constructor(string n, string n_src, bool n_logging=True, bool n_use_index=True, *string n_tablespace)
creates the object from the arguments passed
softlist getCreateSql(*hash opt)
returns a string that can be used to create the object in the database
represents an Oracle number column
Definition: OracleSqlUtilBase.qm.dox.h:548
the data type for Oracle NUMBER columns
Definition: OracleSqlUtilBase.qm.dox.h:459
constructor(string native_type, bool nullable, *hash< auto > options)
creates the object
represents an Oracle package
Definition: OracleSqlUtilBase.qm.dox.h:936
*string body_src
package body source
Definition: OracleSqlUtilBase.qm.dox.h:940
bool equalImpl(AbstractFunctionBase t)
returns True if the argument is equal to the current object, False if not
constructor(string n, string n_src, *string n_body_src)
creates the object from the arguments passed
list getCreateSql(*hash opt)
returns a string that can be used to create the package in the database
represents an Oracle primary key
Definition: OracleSqlUtilBase.qm.dox.h:699
string getDropSql(string table_name)
returns a string that can be used to drop the constraint from the database
*string tablespace
any tablespace for the primary key index
Definition: OracleSqlUtilBase.qm.dox.h:704
OracleColumn memberGate(string k)
returns the OracleColumn value of the given key if it exists, otherwise throws a KEY-ERROR exception
string getDisableSql(string table_name)
returns a string that can be used to temporarily disable the constraint from the database
clearIndex()
clears any index base for the constraint
string getEnableSql(string table_name, *hash opt)
returns a string that can be used to enable the constraint in the database
represents an Oracle procedure
Definition: OracleSqlUtilBase.qm.dox.h:924
constructor(string n, string n_src)
creates the object from the arguments passed
Oracle savepoint helper.
Definition: OracleSqlUtilBase.qm.dox.h:428
deleteSavepointImpl()
Deletes the savepoint.
createSavepointImpl()
Creates the savepoint.
rollbackImpl()
Rolls back to the savepoint.
constructor(AbstractDatasource ds, *string savepoint='x'+get_random_string(29))
Creates the object.
represents an Oracle sequence
Definition: OracleSqlUtilBase.qm.dox.h:763
string getCreateSql(*hash opt)
returns a string that can be used to create the sequence in the database
constructor(string n_name, number n_start=1, number n_increment=1, *softnumber n_end)
creates the object from the arguments
softlist getRenameSql(string new_name, *hash opt)
returns a string that can be used to rename the sequence in the database
represents an Oracle table
Definition: OracleSqlUtilBase.qm.dox.h:1360
hash< auto > getSelectOptions()
override in subclasses to return driver-specific options
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 handle...
hash< auto > getColumnOperatorMapImpl()
returns the column operator map for this object
*string getComment()
returns any table comment or NOTHING if none is known
copyImpl(AbstractTable old)
db-specific copy actions
const OracleTruncDate
Map SqlUtil::cop_trunc_date() constants to Oracle internal masks.
Definition: OracleSqlUtilBase.qm.dox.h:1809
const OracleCopMap
column operator specializations for Oracle
Definition: OracleSqlUtilBase.qm.dox.h:1805
string getSchemaName()
returns the schema name
code getUpsertUpdateOnly(Columns cols, hash< auto > row, *hash opt)
high-performance "update only" upsert supporting bulk DML
*string getSqlValueImpl(auto v)
returns a string for use in SQL queries representing the DB-specific value of the argument; returns N...
const OracleSelectOptions
Oracle select options.
Definition: OracleSqlUtilBase.qm.dox.h:1523
*hash< auto > getPseudoColumnHash()
returns a hash of valid pseudocolumns
bool asteriskRequiresPrefix()
returns True if the database requires a wildcard "*" to be prefixed with the table name when it appea...
bool constraintsLinkedToIndexesImpl()
returns True if the database links constraints to indexes (ie dropping the constraint drops the index...
const OracleIopMap
a hash of default value operator descriptions for Oracle
Definition: OracleSqlUtilBase.qm.dox.h:1813
const OracleConstraintOptions
Oracle-specific constraint options.
Definition: OracleSqlUtilBase.qm.dox.h:1508
AbstractSavepointHelper getSavepointHelperImpl(*string savepoint)
get DB-specific savepoint helper
const OraTypeMap
maps oracle type names to type descriptions
Definition: OracleSqlUtilBase.qm.dox.h:1364
const OraColumnDescOptions
Oracle-specific column options.
Definition: OracleSqlUtilBase.qm.dox.h:1494
const OraclePseudoColumnHash
a hash of valid pseudocolumns
Definition: OracleSqlUtilBase.qm.dox.h:1821
const OracleOpMap
where operator specializations for Oracle
Definition: OracleSqlUtilBase.qm.dox.h:1801
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
bool isDuplicateRowErrorImpl(hash< ExceptionInfo > ex)
Returns True if the exception was raised because of a duplicate row / key error.
bool bindEmptyStringsAsNull()
returns True because Oracle treats empty strings like NULL on insert
hash< auto > getExpressionMap()
Returns the expression map for Oracle.
const OracleExpressionMap
Oracle Expression map.
Definition: OracleSqlUtilBase.qm.dox.h:1528
hash< auto > getRawUpdateOperatorMap()
returns the raw (default) update operator map for this object
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 Ups...
bool optimizedLimit(*hash< auto > qh)
Returns True if the current connection supports optimized limit option handling.
const OraColumnOptions
Oracle-specific column options.
Definition: OracleSqlUtilBase.qm.dox.h:1488
hash< auto > getInsertOperatorMap()
returns the insert operator map for this object
bool isView()
This method can change itself or disappear in the near future. Do not use it.
list getColumnSqlNames(softlist cols)
returns a list of column names for use in SQL strings; subclasses can process the argument list in ca...
const OracleUopMap
a hash of default update operator definitions for Oracle
Definition: OracleSqlUtilBase.qm.dox.h:1817
doSelectLimitOnlyUnlockedImpl(reference< hash< QueryInfo > > info, reference< string > sql)
processes a string for use in SQL select statements when there is a "limit" argument,...
code getUpsertInsertOnly(Columns cols, hash< auto > row, *hash opt)
high-performance "insert only" upsert supporting bulk DML
bool supportsTablespacesImpl()
returns True if the database support tablespaces
const OracleIndexOptions
Oracle-specific index options.
Definition: OracleSqlUtilBase.qm.dox.h:1500
bool hasArrayBind()
returns True because the oracle driver supports array binds / bulk DML operations
const OracleTableCreationOptions
Oracle table creation options.
Definition: OracleSqlUtilBase.qm.dox.h:1513
string getColumnSqlName(string col)
returns the column name for use in SQL strings; subclasses can return a special string in case the co...
const QoreTypeMap
maps qore type names to an oracle type
Definition: OracleSqlUtilBase.qm.dox.h:1468
hash< auto > getWhereOperatorMap()
returns the "where" operator map for Oracle
string getBaseType()
returns the base type of the underlying object (either "table" or "view")
bool uniqueIndexCreatesConstraintImpl()
returns True if the database automatically creates a unique constraint when a unique index is created...
code getBulkUpsertClosure(hash example_row, int upsert_strategy=AbstractTable::UpsertAuto, *hash opt)
Oracle always supports bulk merging.
represents an Oracle trigger
Definition: OracleSqlUtilBase.qm.dox.h:819
bool equalImpl(AbstractFunctionBase t)
returns True if the argument is equal to the current object, False if not
softlist getDropSql(string table_name)
returns a string that can be used to drop the trigger from the database
bool enabled
True if the trigger is enabled, False if not
Definition: OracleSqlUtilBase.qm.dox.h:823
softlist getRenameSql(string table_name, string new_name)
returns a string that can be used to rename the trigger in the database
represents an Oracle type
Definition: OracleSqlUtilBase.qm.dox.h:898
string getDropSql(*hash opt)
returns a string that can be used to drop the type from the database
represents an Oracle unique constraint
Definition: OracleSqlUtilBase.qm.dox.h:633
bool isEnabled()
returns True if the constraint is enabled, False if not
string getDisableSql(string table_name)
returns a string that can be used to temporarily disable the constraint from the database
clearIndex()
clears any index base for the constraint
string getEnableSql(string table_name, *hash opt)
returns a string that can be used to enable the constraint in the database
bool enabled
True if the constraint is enabled, False if not
Definition: OracleSqlUtilBase.qm.dox.h:638
*string getTablespace()
returns the tablespace name used for this constraint, if known
*string tablespace
any tablespace for the unique key index
Definition: OracleSqlUtilBase.qm.dox.h:641
OracleColumn memberGate(string k)
returns the OracleColumn value of the given key if it exists, otherwise throws a KEY-ERROR exception
represents an Oracle view
Definition: OracleSqlUtilBase.qm.dox.h:784
*string view_type_owner
Owner of the type of the view if the view is a typed view.
Definition: OracleSqlUtilBase.qm.dox.h:792
constructor(string n_name, string n_src, *string n_schema, *string n_type_text, *string n_oid_text, *string n_view_type_owner, *string n_view_type, *string n_superview_name, bool n_updatable, bool n_container_data)
creates the object from the arguments
*string type_text
Type clause of the typed view.
Definition: OracleSqlUtilBase.qm.dox.h:788
string getCreateSql(*hash opt)
returns a string that can be used to create the view in the database
softlist getRenameSql(string new_name, *hash opt)
returns a string that can be used to rename the view in the database
*string oid_text
WITH OID clause of the typed view.
Definition: OracleSqlUtilBase.qm.dox.h:790
*string superview_name
Name of the superview.
Definition: OracleSqlUtilBase.qm.dox.h:796
*string view_type
Type of the view if the view is a typed view.
Definition: OracleSqlUtilBase.qm.dox.h:794
bool container_data
Indicates whether the view contains container-specific data.
Definition: OracleSqlUtilBase.qm.dox.h:798
cache(*hash< auto > opts)
the OracleSqlUtilBase namespace contains all the objects in the OracleSqlUtilBase module
Definition: OracleSqlUtilBase.qm.dox.h:418
OracleTable get_table(AbstractDatasource nds, string nname, *hash opts)
returns an OracleTable object corresponding to the arguments
OracleDatabase get_database(AbstractDatasource nds, *hash opts)
returns an OracleDatabase object corresponding to the arguments