42 a.*, rownum rnum from (select * from schema.table where
type = %v order by
type) a where rownum <= %v) where rnum > %v
", ("user
", 300, 200)); 73 note that the following simpler SQL is generated for Oracle 12c+ servers: 75 $ds.vselectRows("select * from schema.table where
type = %v order by
type offset %v rows fetch next %v rows only
", ("user
", 200, 100)); 78 @subsection ora_in_operator IN Operator on Oracle 80 In order to avoid dynamic SQL and better manage the server's shared pool (in particular, the number of parsed statements), the %OracleSqlUtil 81 module uses bind by value with the SQL \c IN operator. 83 For example, the following query: 85 my *hash $q = $table.select(("where
": ("col1
": op_in(1, 2, 3, 4)))); 88 Results in the equivalent of the following SQL: 90 my *hash $q = $ds.select("select * from schema.table where col1 in (select column_value from table(%v))
", bindOracleCollection("SYS.ODCIVARCHAR2LIST
", (1,2,3,4))); 93 @htmlonly <style><!-- td.qore { background-color: #5b9409; color: white; } --></style> @endhtmlonly 96 <td class="qore
"><b>Qore Type</b></td> 97 <td class="qore
"><b>Oracle Collection</b></td> 101 <td>\c SYS.ODCIDATELIST</td> 105 <td>\c SYS.ODCINUMBERLIST</td> 109 <td>\c SYS.ODCINUMBERLIST</td> 113 <td>\c SYS.ODCINUMBERLIST</td> 117 <td>\c SYS.ODCIVARCHAR2LIST</td> 121 There universal collections are limited to 32767 elements. And \c SYS.ODCIVARCHAR2LIST element size is \c VARCHAR2(4000). 123 @subsection ora_partitioning_select Partition Support in Selects 125 It's possible to select from a particular partition of a table with %OracleSqlUtil; 126 @ref OracleSqlUtil::OracleTable::OracleSelectOptions "OracleSelectOptions
" defines the \c "partition
" key which can be added to a 127 @ref select_option_hash "select option
hash" to specify the partition to select from as in the following example: 129 my *list $rows = $table.selectRows(("created
": op_gt(2012-05-01), "partition
": "p1
")); 131 Which generates an SQL command like the following: 133 my *list $rows = $ds.vselectRows("select * from schema.table partition(p1) where created > %v
", (2012-05-01)); 136 @subsection ora_partitioning_join Partition Support in Joins 138 It's possible to perform a join on a particular partition of a table with %OracleSqlUtil; the join option \c "partition
" is 139 supported to specify the partition to join on as in the following example: 141 my *list $rows = $table.selectRows(("join": join_inner($table2, "t2
", ("id": "altid
"), NOTHING, ("partition
": "p2
")))); 143 Which generates an SQL command like the following: 145 my *list $rows = $ds.vselectRows("select * from schema.table inner
join schema.table2 partition(p2) t2 on (schema.table.id = t2.altid)
"); 148 @section ora_schema_management Schema Management on Oracle 150 Note that when getting an object description from an Oracle database, if the object cannot be found in the connection schema, then 151 if a synonym of the same type exists and the target object is accessible, then the target object is read automatically and the owning 152 schema name is also set to the actual owner of the object. 154 @subsection ora_type_mapping Type Mapping 156 Column types are mapped from %Qore types as follows: 158 <b>Oracle Column Type Mappings</b> 161 <td class="qore
"><b>Generic Type Name</b></td> 162 <td class="qore
"><b>Oracle Type Used</b></td> 182 <td>\c timestamp(6)</td> 189 <td>@ref SqlUtil::BLOB</td> 193 <td>@ref SqlUtil::CHAR</td> 197 <td>@ref SqlUtil::CLOB</td> 201 <td>@ref SqlUtil::NUMERIC</td> 205 <td>@ref SqlUtil::VARCHAR</td> 210 To use other types, use the \c "native_type
" @ref SqlUtil::AbstractTable::ColumnDescOptions "column description option
" with the 211 native Oracle type name instead (under the \c "driver
" and \c "oracle
" keys for schemas supporting multiple databases). 213 @subsection ora_other_objects Additional Object Types Supported 215 The following additional schema objects can be managed with %OracleSqlUtil: 216 - @ref ora_materialized_views "materialized views
" 217 - @ref ora_packages "packages
" 218 - @ref ora_types "types
" 220 @subsection ora_materialized_views Materialized Views 222 The @ref schema_desc_hash takes an optional key, \c "materialized_views
" that allows materialized views in Oracle schemas to be managed along with other objects. 224 The \c "materialized_views
" should be assigned to a hash, each key name is the name of the materialized view, and the values are hashes with the 226 - \c "logging
": (@ref bool_type "bool") if the materialized view should be logged 227 - \c "use_index
": (@ref bool_type "bool") if the materialized view should be indexed 228 - \c "src
": (@ref bool_type "bool") the source of the materialized view 230 The \c "materialized_views
" key can go in the top level of the @ref schema_desc_hash for Oracle-only schemas, or, for schemas targeting multiple database types, under the \c "driver
" and \c "oracle
" keys as in the following example: 236 "materialized_views
": ( 240 "src
": "select
type, count(1) total_count from table group by type",
248 @subsection ora_packages Packages
250 The @ref schema_desc_hash takes an optional key, \c "packages" that allows packages in Oracle schemas to be managed along with other objects.
252 The \c "packages" should be assigned to a
hash, each key name is the name of the package, and the values are hashes with the
254 - \c "src": (@ref bool_type "
bool") the source of the package
256 The \c "packages" key can go in the top level of the @ref schema_desc_hash for Oracle-only schemas, or, for schemas targeting multiple database types, under the \c "driver" and \c "oracle" keys as in the following example:
265 type cursorType is ref cursor; 266 MYSTATCOMPLETE constant order_status.orderstatus%type := 'C'; 267 MYSTATERROR constant order_status.orderstatus%type := 'E'; 276 @subsection ora_types Types
278 The @ref schema_desc_hash takes an optional key, \c
"types" that allows types in Oracle schemas to be managed along with other objects.
280 The \c
"types" should be assigned to a
hash, each key name is the name of the
type, and the values are strings giving the type definition.
282 The \c
"types" key can go in the top level of the @ref schema_desc_hash
for Oracle-only schemas, or,
for schemas targeting multiple database types, under the \c
"driver" and \c
"oracle" keys as in the following example:
289 "num_array":
"table of number",
290 "str_array":
"table of varchar2(240)",
299 @section ora_relnotes Release Notes
302 - fixed a bug in \c character_semantics
for standalone column (<a href=
"https://github.com/qorelanguage/qore/issues/1688">issue 1688</a>)
306 - fixed a bug in the \a force option (i.e. cascade) for dropping types (<a href="https:
309 - implemented the \a force option (i.e. cascade) for dropping code objects (<a href="https:
310 - worked around ORA-22165 from
op_in() caused by Oracle's limit on
number of collection elements (<a href="https:
313 - implemented support for the \c "returning" clause as an insert option
314 - implemented support for views for DML in the @ref
OracleSqlUtil::OracleTable class
316 - implemented support for Oracle pseudocolumns in queries
319 - return lists from Oracle's data dictionary ordered
320 - implemented @ref
OracleSqlUtil::OracleTable::bindEmptyStringsAsNull()
321 - implemented high-performance "upsert" (merge) support also supporting bulk DML
326 - fixed selects with "limit" but no "offset"
327 - convert
date/time values to timestamps with
microseconds resolution instead of dates with second resolution when dynamically inserting values as strings in SQL (binding by value not affected)
328 - fixed schema information classes when the "
string-numbers" driver option is enabled
356 constructor(
string n,
string nt, *
string qt, softint sz,
bool nul, *
string dv, *
string cm,
bool is_char =
False,
bool cu =
False, softint bs) ;
360 string getNativeTypeString();
371 list getAddColumnSql(AbstractTable t);
385 list getModifySqlImpl(AbstractTable t, AbstractColumn col, *hash opt);
399 string getRenameSql(AbstractTable t,
string new_name);
403 bool equalImpl(AbstractColumn c);
411 constructor(
string n,
string nt, *
string qt, softint sz,
bool nul, *
string dv, *
string cm, softint bs, softint n_scale = 0) ;
414 string getNativeTypeString();
432 constructor(
string n,
bool u, hash c,
string nt, *
string t) ;
436 string getCreateSql(
string table_name, *hash opt);
440 bool equalImpl(AbstractIndex ix);
444 string getRenameSql(
string table_name,
string new_name);
458 constructor(
string n, Columns c, ForeignConstraintTarget t,
bool e) ;
461 string getCreateSql(
string table_name, *hash opt);
464 softlist getRenameSql(
string table_name,
string new_name);
468 string getDisableSql(
string table_name);
472 string getEnableSql(
string table_name, *hash opt);
486 constructor(
string n,
string n_src,
bool e =
True) ;
489 string getCreateSql(
string table_name, *hash opt);
492 softlist getRenameSql(
string table_name,
string new_name);
496 string getDisableSql(
string table_name);
500 string getEnableSql(
string table_name, *hash opt);
517 constructor(
string n, hash n_cols,
bool e =
True, *
string ts) ;
539 bool setIndexBase(
string ix);
546 string getCreateSql(
string table_name, *hash opts);
549 softlist getRenameSql(
string table_name,
string new_name);
553 string getDisableSql(
string table_name);
557 string getEnableSql(
string table_name, *hash opt);
565 *
string getTablespace();
582 constructor(
string n, *hash c, *
string ts) ;
604 bool setIndexBase(
string ix);
611 string getCreateSql(
string table_name, *hash opts);
614 softlist getRenameSql(
string table_name,
string new_name);
620 string getDropSql(
string table_name);
624 string getDisableSql(
string table_name);
628 string getEnableSql(
string table_name, *hash opt);
637 constructor(
string n_name,
number n_start = 1,
number n_increment = 1, *softnumber n_end) ;
641 string getCreateSql(*hash opt);
649 softlist getRenameSql(
string new_name, *hash opt);
674 constructor(
string n_name,
string n_src, *
string n_schema, *
string n_type_text,
675 *
string n_oid_text, *
string n_view_type_owner,
676 *
string n_view_type, *
string n_superview_name,
677 bool n_updatable,
bool n_container_data)
682 string getCreateSql(*hash opt);
690 softlist getRenameSql(
string new_name, *hash opt);
704 constructor(
string n,
string n_src,
bool en =
True) ;
707 softlist getCreateSql(
string table_name, *hash opt);
711 bool equalImpl(AbstractFunctionBase t);
715 softlist getRenameSql(
string table_name,
string new_name);
719 softlist getDropSql(
string table_name);
732 constructor(
string n,
string n_type,
string n_src) ;
738 softlist getCreateSql(*hash opt);
742 bool equalImpl(AbstractFunctionBase t);
750 softlist getRenameSql(
string new_name, *hash opt);
763 constructor(
string n,
string n_type,
string n_src) ;
772 softlist getRenameSql(
string new_name, *hash opt);
780 constructor(
string n_name,
string n_src) ;
786 string getDropSql(*hash opt);
798 constructor(
string n,
string n_src) ;
810 constructor(
string n,
string n_src) ;
829 constructor(
string n,
string n_src, *
string n_body_src) ;
833 list getCreateSql(*hash opt);
837 bool equalImpl(AbstractFunctionBase t);
862 constructor(
string n,
string n_src,
bool n_logging =
True,
bool n_use_index =
True, *
string n_tablespace) ;
866 softlist getCreateSql(*hash opt);
869 bool equalImpl(AbstractFunctionBase t);
879 const OracleCreationOptions = AbstractDatabase::CreationOptions + (
884 const OracleAlignSchemaOptions = AbstractDatabase::AlignSchemaOptions
885 + OracleCreationOptions
886 + OracleTable::OracleAlignTableOptions
898 const OracleSchemaDescriptionOptions = AbstractDatabase::SchemaDescriptionOptions + (
913 const OraclePackageDescriptionOptions = (
919 const OracleMaterializedViewDescriptionOptions = (
927 const OracleReservedWords = (
1042 const OracleRebuildIndexOptions = (
1053 const OracleComputeStatisticsOptions = ComputeStatisticsOptions + (
1069 constructor(AbstractDatasource nds, *hash opts) ;
1074 list featuresImpl();
1086 getSchemaName(reference<string> name, reference<string> schema);
1092 *AbstractSequence getSequenceImpl(
string name);
1098 *AbstractView getViewImpl(
string name);
1104 OracleFunction makeFunctionImpl(
string name,
string src, *hash opts);
1110 OracleProcedure makeProcedureImpl(
string name,
string src, *hash opts);
1116 OraclePackage makePackage(
string name,
string src,
string body, *hash opts);
1122 OraclePackage makePackageFromDescription(
string name, hash ph, *hash opts);
1128 OracleType makeType(
string name,
string src, *hash opts);
1134 OracleMaterializedView makeMaterializedView(
string name,
string src,
bool logging =
True,
bool use_index =
True, *
string tablespace, *hash opts);
1146 list getDropSchemaSqlImpl(hash schema_hash, *hash opt);
1152 list getAlignSqlImpl(hash schema_hash, *hash opt);
1182 *
string getSource(
string type,
string name);
1188 checkSource(
string type,
string name, reference<string> src);
1193 list listSynonyms();
1197 ListIterator synonymIterator();
1205 ListIterator typeIterator();
1209 list listPackages();
1213 ListIterator packageIterator();
1217 list listMaterializedViews();
1221 ListIterator materializedViewIterator();
1226 list listTablesImpl();
1232 list listFunctionsImpl();
1238 list listProceduresImpl();
1244 list listSequencesImpl();
1250 list listViewsImpl();
1256 list getListIntern(
string type);
1268 string getCreateSqlImpl(
list l);
1272 static string getCreateSql(
list l);
1277 hash getCreationOptions();
1284 hash getAlignSchemaOptions();
1291 hash getSchemaDescriptionOptions();
1298 hash getRebuildIndexOptions();
1305 hash getComputeStatisticsOptions();
1312 softint getNextSequenceValueImpl(
string name);
1319 softint getCurrentSequenceValueImpl(
string name);
1326 bool supportsSequencesImpl();
1333 bool supportsTypesImpl();
1340 bool supportsPackagesImpl();
1357 bool rebuildIndexAnalyze(AbstractIndex
index,
int maxh,
int maxleaf);
1373 bool rebuildIndexAnalyze(
string name,
int maxh,
int maxleaf);
1379 bool rebuildIndexImpl(
string name, *hash options);
1386 computeStatisticsImpl(*hash options);
1393 computeStatisticsSchemaImpl(*hash options);
1400 computeStatisticsTablesImpl(*hash options);
1407 reclaimSpaceImpl(*hash options);
1421 const OraTypeMap = (
1422 "number": (
"qore":
Type::Number,
"size":
SZ_NUM,
"size_range": (1, 38),
"scale_range": (-84, 127)),
1427 "timestamp with time zone": (
"qore":
Type::Date,
"size":
SZ_OPT,
"size_range": (0, 9)),
1428 "timestamp with local time zone": (
"qore":
Type::Date,
"size":
SZ_OPT,
"size_range": (0, 9)),
1429 "interval year to month": (
"qore":
Type::Date,),
1430 "interval day to second": (
"qore":
Type::Date,),
1441 "timestamp(0) with time zone": (
"qore":
Type::Date,),
1442 "timestamp(1) with time zone": (
"qore":
Type::Date,),
1443 "timestamp(2) with time zone": (
"qore":
Type::Date,),
1444 "timestamp(3) with time zone": (
"qore":
Type::Date,),
1445 "timestamp(4) with time zone": (
"qore":
Type::Date,),
1446 "timestamp(5) with time zone": (
"qore":
Type::Date,),
1447 "timestamp(6) with time zone": (
"qore":
Type::Date,),
1448 "timestamp(7) with time zone": (
"qore":
Type::Date,),
1449 "timestamp(8) with time zone": (
"qore":
Type::Date,),
1450 "timestamp(9) with time zone": (
"qore":
Type::Date,),
1451 "timestamp(0) with local time zone": (
"qore":
Type::Date,),
1452 "timestamp(1) with local time zone": (
"qore":
Type::Date,),
1453 "timestamp(2) with local time zone": (
"qore":
Type::Date,),
1454 "timestamp(3) with local time zone": (
"qore":
Type::Date,),
1455 "timestamp(4) with local time zone": (
"qore":
Type::Date,),
1456 "timestamp(5) with local time zone": (
"qore":
Type::Date,),
1457 "timestamp(6) with local time zone": (
"qore":
Type::Date,),
1458 "timestamp(7) with local time zone": (
"qore":
Type::Date,),
1459 "timestamp(8) with local time zone": (
"qore":
Type::Date,),
1460 "timestamp(9) with local time zone": (
"qore":
Type::Date,),
1461 "interval year(0) to month": (
"qore":
Type::Date,),
1462 "interval year(1) to month": (
"qore":
Type::Date,),
1463 "interval year(2) to month": (
"qore":
Type::Date,),
1464 "interval year(3) to month": (
"qore":
Type::Date,),
1465 "interval year(4) to month": (
"qore":
Type::Date,),
1466 "interval year(5) to month": (
"qore":
Type::Date,),
1467 "interval year(6) to month": (
"qore":
Type::Date,),
1468 "interval year(7) to month": (
"qore":
Type::Date,),
1469 "interval year(8) to month": (
"qore":
Type::Date,),
1470 "interval year(9) to month": (
"qore":
Type::Date,),
1471 "interval day(0) to second(0)": (
"qore":
Type::Date,),
1472 "interval day(0) to second(1)": (
"qore":
Type::Date,),
1473 "interval day(0) to second(2)": (
"qore":
Type::Date,),
1474 "interval day(0) to second(3)": (
"qore":
Type::Date,),
1475 "interval day(0) to second(4)": (
"qore":
Type::Date,),
1476 "interval day(0) to second(5)": (
"qore":
Type::Date,),
1477 "interval day(0) to second(6)": (
"qore":
Type::Date,),
1478 "interval day(0) to second(7)": (
"qore":
Type::Date,),
1479 "interval day(0) to second(8)": (
"qore":
Type::Date,),
1480 "interval day(0) to second(9)": (
"qore":
Type::Date,),
1481 "interval day(1) to second(0)": (
"qore":
Type::Date,),
1482 "interval day(1) to second(1)": (
"qore":
Type::Date,),
1483 "interval day(1) to second(2)": (
"qore":
Type::Date,),
1484 "interval day(1) to second(3)": (
"qore":
Type::Date,),
1485 "interval day(1) to second(4)": (
"qore":
Type::Date,),
1486 "interval day(1) to second(5)": (
"qore":
Type::Date,),
1487 "interval day(1) to second(6)": (
"qore":
Type::Date,),
1488 "interval day(1) to second(7)": (
"qore":
Type::Date,),
1489 "interval day(1) to second(8)": (
"qore":
Type::Date,),
1490 "interval day(1) to second(9)": (
"qore":
Type::Date,),
1491 "interval day(2) to second(0)": (
"qore":
Type::Date,),
1492 "interval day(2) to second(1)": (
"qore":
Type::Date,),
1493 "interval day(2) to second(2)": (
"qore":
Type::Date,),
1494 "interval day(2) to second(3)": (
"qore":
Type::Date,),
1495 "interval day(2) to second(4)": (
"qore":
Type::Date,),
1496 "interval day(2) to second(5)": (
"qore":
Type::Date,),
1497 "interval day(2) to second(6)": (
"qore":
Type::Date,),
1498 "interval day(2) to second(7)": (
"qore":
Type::Date,),
1499 "interval day(2) to second(8)": (
"qore":
Type::Date,),
1500 "interval day(2) to second(9)": (
"qore":
Type::Date,),
1513 const QoreTypeMap = (
1514 "integer":
"number",
1517 "string":
"varchar2",
1518 "date":
"timestamp(6)",
1525 const OraColumnOpts = (
1533 const OraColumnOptions = AbstractTable::ColumnOptions + OraColumnOpts;
1539 const OraColumnDescOptions = AbstractTable::ColumnDescOptions + OraColumnOpts;
1545 const OracleIndexOptions = AbstractTable::IndexOptions + (
1553 const OracleConstraintOptions = OracleIndexOptions + (
1558 const OracleTableCreationOptions = AbstractTable::TableCreationOptions
1559 + OracleConstraintOptions
1563 const OracleAlignTableOptions = AbstractTable::AlignTableOptions + OracleTableCreationOptions;
1570 const OracleSelectOptions = AbstractTable::SelectOptions + (
1577 "code":
string (
object t,
string cn, softlist arg, reference<list> args, *hash jch,
bool join =
False, *hash ch, *hash psch) {
1587 ListIterator it(arg);
1599 return cn +
" in (" + (map
"select column_value from table(%v)",
xrange(1,count)).
join(
" union all ") +
")";
1602 throw "MISSING-ORACLE-DRIVER",
"op_in requires oracle driver";
1606 "code":
string (
object t,
string cn,
auto arg, reference<list> args, *hash jch,
bool join =
False, *hash ch, *hash psch) {
1612 return sprintf(
"substr(%s,%v,%v) = %v", cn);
1621 string name = QoreTypeMap{args[0]} ?? args[0];
1622 hash desc = OraTypeMap{name};
1623 string sql =
sprintf (
"cast (%s as %s", cve, name);
1631 "code":
string (
string cve,
list args) {
1633 return sprintf(
"substr(%s,%d)", cve, args[0]);
1634 return sprintf(
"substr(%s,%d,%d)", cve, args[0], args[1]);
1638 "code":
string (
string arg1,
auto arg) {
1639 return sprintf(
"to_char(%s, 'YYYY')", arg1);
1643 "code":
string (
string arg1,
auto arg) {
1644 return sprintf(
"to_char(%s, 'YYYY-MM')", arg1);
1648 "code":
string (
string arg1,
auto arg) {
1649 return sprintf(
"to_char(%s, 'YYYY-MM-DD')", arg1);
1653 "code":
string (
string arg1,
auto arg) {
1654 return sprintf(
"to_char(%s, 'YYYY-MM-DD HH24')", arg1);
1660 "code":
string (*
string cve, hash arg, reference<hash> psch) {
1661 string sql =
sprintf(
"%s.nextval", arg.seq);
1670 "code":
string (*
string cve, hash arg, reference<hash> psch) {
1671 string sql =
sprintf(
"%s.currval", arg.seq);
1678 "code":
string sub(
string arg1,
auto arg) {
1679 if (!OracleTruncDate.hasKey(arg));
1682 if (
exists OracleTruncDate{arg});
1685 return sprintf(
"cast (%s as date)", arg1);
1691 const OracleTruncDate = (
1705 "code":
string (
string cve,
string arg) {
1706 return sprintf(
"%s.nextval", arg);
1712 "code":
string (
string cve,
string arg) {
1713 return sprintf(
"%s.currval", arg);
1722 "code":
string (*
string cve,
string arg) {
1723 return sprintf(
"%s.nextval", arg);
1728 "code":
string (*
string cve,
string arg) {
1729 return sprintf(
"%s.currval", arg);
1735 const OraclePseudoColumnHash = (
1739 "object_value":
True,
1765 bool m_isView =
False;
1769 constructor(AbstractDatasource nds,
string nname, *hash opts) ;
1774 bool checkExistenceImpl();
1780 setTableInfoIntern();
1785 string getSqlName();
1794 hash setSchemaTable();
1812 string getUserSchema();
1818 string getDBString();
1823 string getSchemaName();
1827 *
string getTablespaceName();
1831 *
string getComment();
1839 hash getColumnOptions();
1845 hash getColumnDescOptions();
1852 hash getSelectOptions();
1858 getSelectWhereSqlUnlocked(reference<string> sql, reference<list> args, *hash qh, *hash jch,
bool join =
False, *hash ch, *hash psch);
1864 doSelectOrderByWithOffsetSqlUnlockedImpl(reference<string> sql, reference<list> args, *hash qh, *hash jch, *hash ch, *hash psch,
list coll);
1871 doSelectLimitOnlyUnlockedImpl(reference<string> sql, reference<list> args, *hash qh);
1877 Columns describeImpl();
1889 Indexes getIndexesImpl();
1895 ForeignConstraints getForeignConstraintsImpl(*hash opts);
1901 Constraints getConstraintsImpl();
1907 string getSelectSqlName(*hash qh);
1913 Triggers getTriggersImpl();
1917 string getCreateTableSqlImpl(*hash opt);
1922 *
list getCreateMiscSqlImpl(*hash opt,
bool cache);
1928 string getCreateSqlImpl(
list l);
1934 string getRenameSqlImpl(
string new_name);
1940 AbstractColumn addColumnImpl(
string cname, hash opt,
bool nullable =
True);
1946 AbstractPrimaryKey addPrimaryKeyImpl(
string cname, hash ch, *hash opt);
1952 AbstractIndex addIndexImpl(
string iname,
bool enabled, hash ch, *hash opt);
1958 AbstractForeignConstraint addForeignConstraintImpl(
string cname, hash ch,
string table, hash tch, *hash opt);
1964 AbstractCheckConstraint addCheckConstraintImpl(
string cname,
string src, *hash opt);
1970 AbstractUniqueConstraint addUniqueConstraintImpl(
string cname, hash ch, *hash opt);
1976 AbstractTrigger addTriggerImpl(
string tname,
string src, *hash opt);
1982 bool tryInsertImpl(
string sql, hash row);
1988 *
list getAlignSqlImpl(AbstractTable t, *hash opt);
1994 hash getQoreTypeMapImpl();
2000 hash getTypeMapImpl();
2006 hash getIndexOptions();
2012 hash getConstraintOptions();
2018 hash getTableCreationOptions();
2024 hash getAlignTableOptions();
2031 hash getWhereOperatorMap();
2038 hash getColumnOperatorMap();
2045 hash getInsertOperatorMap();
2052 hash getRawUpdateOperatorMap();
2059 *hash getPseudoColumnHash();
2066 *
string getSqlValueImpl(
auto v);
2071 string getColumnSqlName(
string col);
2075 list getColumnSqlNames(softlist cols);
2082 string getBaseType();
2090 code getUpsertClosure(hash row,
int upsert_strategy =
UpsertAuto, *hash opt);
2096 code getUpsertInsertOnly(Columns cols, hash row, *hash opt);
2103 code getUpsertUpdateOnly(Columns cols, hash row, *hash opt);
2108 bool hasArrayBind();
2114 bool bindEmptyStringsAsNull();
2120 bool asteriskRequiresPrefix();
2126 *hash doReturningImpl(hash opt, reference<string> sql,
list args);
2138 setupTableImpl(hash desc, *hash opt);
2145 bool constraintsLinkedToIndexesImpl();
2152 bool uniqueIndexCreatesConstraintImpl();
2159 bool supportsTablespacesImpl();
2166 copyImpl(AbstractTable old);
represents an Oracle unique constraint
Definition: OracleSqlUtil.qm.dox.h:505
represents an Oracle materialized view
Definition: OracleSqlUtil.qm.dox.h:842
the OracleSqlUtil namespace contains all the objects in the OracleSqlUtil module
Definition: OracleSqlUtil.qm.dox.h:335
string sprintf(string fmt,...)
hash< ColumnOperatorInfo > cop_cast(auto column, string arg, auto arg1, auto arg2)
*string tablespace
the tablespace name of the index (if supported)
Definition: OracleSqlUtil.qm.dox.h:427
bool logging
Flag if is loggign mode used.
Definition: OracleSqlUtil.qm.dox.h:847
*string view_type_owner
Owner of the type of the view if the view is a typed view.
Definition: OracleSqlUtil.qm.dox.h:663
represents an Oracle table
Definition: OracleSqlUtil.qm.dox.h:1416
*string tablespace
Name of the potential tablespace.
Definition: OracleSqlUtil.qm.dox.h:851
*string superview_name
Name of the superview.
Definition: OracleSqlUtil.qm.dox.h:667
bool enabled
True if the trigger is enabled, False if not
Definition: OracleSqlUtil.qm.dox.h:700
bool enabled
True if the constraint is enabled, False if not
Definition: OracleSqlUtil.qm.dox.h:454
bool enabled
True if the constraint is enabled, False if not
Definition: OracleSqlUtil.qm.dox.h:482
represents an Oracle procedure
Definition: OracleSqlUtil.qm.dox.h:803
number number(softnumber n)
hash< UpdateOperatorInfo > uop_substr(int start, *int count, *hash< UpdateOperatorInfo > nest)
*string tablespace
any tablespace for the unique key index
Definition: OracleSqlUtil.qm.dox.h:513
bool enabled
True if the constraint is enabled, False if not
Definition: OracleSqlUtil.qm.dox.h:510
represents an Oracle view
Definition: OracleSqlUtil.qm.dox.h:654
RangeIterator xrange(int start, int stop, int step=1, auto val)
int index(softstring str, softstring substr, softint pos=0)
date microseconds(softint us)
*string oid_text
WITH OID clause of the typed view.
Definition: OracleSqlUtil.qm.dox.h:661
hash< ColumnOperatorInfo > cop_trunc_date(auto column, string mask)
bool use_index
Flag if is index used.
Definition: OracleSqlUtil.qm.dox.h:849
the Oracle specialization for SqlUtil::AbstractDatabase
Definition: OracleSqlUtil.qm.dox.h:874
int byte_size
byte size of the column
Definition: OracleSqlUtil.qm.dox.h:352
the base class for Oracle code objects that cannot be renamed in place
Definition: OracleSqlUtil.qm.dox.h:755
represents an Oracle check constraint
Definition: OracleSqlUtil.qm.dox.h:477
represents an Oracle number column
Definition: OracleSqlUtil.qm.dox.h:408
represents an Oracle package
Definition: OracleSqlUtil.qm.dox.h:815
hash< ColumnOperatorInfo > cop_seq(string seq, *string as)
string string(softstring str, *string enc)
represents an Oracle column
Definition: OracleSqlUtil.qm.dox.h:345
*string type_text
Type clause of the typed view.
Definition: OracleSqlUtil.qm.dox.h:659
OracleDatabase get_database(AbstractDatasource nds, *hash opts)
returns an OracleDatabase object corresponding to the arguments
hash< OperatorInfo > op_in()
hash< ColumnOperatorInfo > cop_seq_currval(string seq, *string as)
*string body_src
package body source
Definition: OracleSqlUtil.qm.dox.h:820
*string tablespace
any tablespace for the primary key index
Definition: OracleSqlUtil.qm.dox.h:575
*string view_type
Type of the view if the view is a typed view.
Definition: OracleSqlUtil.qm.dox.h:665
represents an Oracle sequence
Definition: OracleSqlUtil.qm.dox.h:633
represents an Oracle trigger
Definition: OracleSqlUtil.qm.dox.h:695
hash< OperatorInfo > op_substr(int start, *int count, string text)
OracleTable get_table(AbstractDatasource nds, string nname, *hash opts)
returns an OracleTable object corresponding to the arguments
bool container_data
Indicates whether the view contains container-specific data.
Definition: OracleSqlUtil.qm.dox.h:669
const OracleSchemaDescriptionOptions
oracle-specific schema description keys
Definition: OracleSqlUtil.qm.dox.h:898
hash< ColumnOperatorInfo > cop_substr(auto column, int start, *int count)
represents an Oracle foreign constraint
Definition: OracleSqlUtil.qm.dox.h:449
represents an Oracle type
Definition: OracleSqlUtil.qm.dox.h:777
represents an Oracle primary key
Definition: OracleSqlUtil.qm.dox.h:570
string native_type
the native type of the index (if supported)
Definition: OracleSqlUtil.qm.dox.h:424
string join(string str,...)
represents an Oracle index
Definition: OracleSqlUtil.qm.dox.h:419
bool char_used
the column uses character semantics
Definition: OracleSqlUtil.qm.dox.h:350
represents an Oracle function
Definition: OracleSqlUtil.qm.dox.h:791
the base class for Oracle code objects
Definition: OracleSqlUtil.qm.dox.h:724