40 a.*, rownum rnum from (select * from schema.table where
type = %v order by
type) a where rownum <= %v) where rnum > %v
", ("user
", 300, 200));
71 note that the following simpler SQL is generated for Oracle 12c+ servers:
73 $ds.vselectRows("select * from schema.table where
type = %v order by
type offset %v rows fetch next %v rows only
", ("user
", 200, 100));
76 @subsection ora_in_operator IN Operator on Oracle
78 In order to avoid dynamic SQL and better manage the server's shared pool (in particular, the number of parsed statements), the %OracleSqlUtil
79 module uses bind by value with the SQL \c IN operator.
81 For example, the following query:
83 my *hash $q = $table.select(("where
": ("col1
": op_in(1, 2, 3, 4))));
86 Results in the equivalent of the following SQL:
88 my *hash $q = $ds.select("select * from schema.table where col1 in (select regexp_substr(%v,
'[^,]+', 1, level) from dual connect by regexp_substr(%v,
'[^,]+', 1, level) is not null)
", "1,2,3,4
", "1,2,3,4
");
91 @subsection ora_partitioning_select Partition Support in Selects
93 It's possible to select from a particular partition of a table with %OracleSqlUtil;
94 @ref OracleSqlUtil::OracleTable::OracleSelectOptions "OracleSelectOptions
" defines the \c "partition
" key which can be added to a
95 @ref select_option_hash "select option
hash" to specify the partition to select from as in the following example:
97 my *list $rows = $table.selectRows(("created
": op_gt(2012-05-01), "partition
": "p1
"));
99 Which generates an SQL command like the following:
101 my *list $rows = $ds.vselectRows("select * from schema.table partition(p1) where created > %v", (2012-05-01));
104 @subsection ora_partitioning_join Partition Support in Joins
106 It's possible to perform a
join on a particular partition of a table with %
OracleSqlUtil; the
join option \c "partition" is
107 supported to specify the partition to
join on as in the following example:
111 Which generates an SQL command like the following:
113 my *
list $rows = $ds.vselectRows("select * from schema.table inner
join schema.table2 partition(p2) t2 on (schema.table.
id = t2.altid)");
116 @section ora_schema_management Schema Management on Oracle
118 Note that when getting an
object description from an Oracle database, if the
object cannot be found in the connection schema, then
119 if a synonym of the same
type exists and the target
object is accessible, then the target
object is read automatically and the owning
120 schema name is also set to the actual owner of the
object.
122 @subsection ora_type_mapping Type Mapping
124 Column types are mapped from %
Qore types as follows:
126 <b>Oracle Column Type Mappings</b>
127 @htmlonly <style><!-- td.qore { background-color: #5b9409; color: white; } --></style>
@endhtmlonly
130 <td
class=
"qore"><b>Generic Type Name</b></td>
131 <td
class=
"qore"><b>Oracle Type Used</b></td>
151 <td>\c timestamp(6)</td>
180 native Oracle
type name instead (under the \c
"driver" and \c
"oracle" keys
for schemas supporting multiple databases).
182 @subsection ora_other_objects Additional
Object Types Supported
184 The following additional schema objects can be managed with %
OracleSqlUtil:
185 - @ref ora_materialized_views
"materialized views"
186 - @ref ora_packages
"packages"
187 - @ref ora_types
"types"
189 @subsection ora_materialized_views Materialized Views
191 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.
193 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
195 - \c
"logging": (@ref bool_type
"bool")
if the materialized view should be logged
196 - \c
"use_index": (@ref bool_type
"bool")
if the materialized view should be indexed
197 - \c
"src": (@ref bool_type
"bool") the source of the materialized view
199 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:
205 "materialized_views": (
209 "src":
"select type, count(1) total_count from table group by type",
217 @subsection ora_packages Packages
219 The @ref schema_desc_hash takes an optional key, \c
"packages" that allows packages in Oracle schemas to be managed along with other objects.
221 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
223 - \c
"src": (@ref bool_type
"bool") the source of the package
225 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:
234 type cursorType is ref cursor;
235 MYSTATCOMPLETE constant order_status.orderstatus%type := 'C';
236 MYSTATERROR constant order_status.orderstatus%type := 'E';
245 @subsection ora_types Types
247 The @ref schema_desc_hash takes an optional key, \c
"types" that allows types in Oracle schemas to be managed along with other objects.
249 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.
251 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:
258 "num_array":
"table of number",
259 "str_array":
"table of varchar2(240)",
268 @section ora_relnotes Release Notes
271 - fixed selects with
"limit" but no
"offset"
272 - 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)
273 - fixed schema information classes when the
"string-numbers" driver option is enabled
301 constructor(
string n,
string nt, *
string qt, softint sz,
bool nul, *
string dv, *
string cm,
bool is_char =
False,
bool cu =
False, softint bs);
356 constructor(
string n,
string nt, *
string qt, softint sz,
bool nul, *
string dv, *
string cm, softint bs, softint n_scale = 0);
359 string getNativeTypeString();
377 constructor(
string n,
bool u, hash c,
string nt, *
string t);
389 string getRenameSql(
string table_name,
string new_name);
403 constructor(
string n, Columns c, ForeignConstraintTarget t,
bool e);
406 string getCreateSql(
string table_name, *hash opt);
409 softlist getRenameSql(
string table_name,
string new_name);
431 constructor(
string n,
string n_src,
bool e =
True);
434 string getCreateSql(
string table_name, *hash opt);
437 softlist getRenameSql(
string table_name,
string new_name);
462 constructor(
string n, hash n_cols,
bool e =
True, *
string ts);
484 bool setIndexBase(
string ix);
491 string getCreateSql(
string table_name, *hash opts);
494 softlist getRenameSql(
string table_name,
string new_name);
519 constructor(
string n, *hash c, *
string ts);
541 bool setIndexBase(
string ix);
548 string getCreateSql(
string table_name, *hash opts);
551 softlist getRenameSql(
string table_name,
string new_name);
608 constructor(
string n_name,
string n_src, *
string n_schema, *
string n_type_text,
609 *
string n_oid_text, *
string n_view_type_owner,
610 *
string n_view_type, *
string n_superview_name,
611 bool n_updatable,
bool n_container_data)
634 constructor(
string n,
string n_src,
bool en =
True);
637 softlist getCreateSql(
string table_name, *hash opt);
645 softlist
getRenameSql(
string table_name,
string new_name);
662 constructor(
string n,
string n_type,
string n_src);
682 constructor(
string n_name,
string n_src);
725 constructor(
string n,
string n_src, *
string n_body_src);
758 constructor(
string n,
string n_src,
bool n_logging =
True,
bool n_use_index =
True, *
string n_tablespace);
765 bool equalImpl(AbstractFunctionBase t);
782 + OracleTable::OracleAlignTableOptions
944 private list featuresImpl();
950 private getSchemaName(reference name, reference schema);
953 private *AbstractSequence getSequenceImpl(
string name);
956 private *AbstractView getViewImpl(
string name);
959 private OracleFunction makeFunctionImpl(
string name,
string src, *hash opts);
962 private OracleProcedure makeProcedureImpl(
string name,
string src, *hash opts);
965 private OraclePackage makePackage(
string name,
string src,
string body, *hash opts);
968 private OraclePackage makePackageFromDescription(
string name, hash ph, *hash opts);
971 private OracleType makeType(
string name,
string src, *hash opts);
974 private OracleMaterializedView makeMaterializedView(
string name,
string src,
bool logging =
True,
bool use_index =
True, *
string tablespace, *hash opts);
980 private list getDropSchemaSqlImpl(hash schema_hash, *hash opt);
983 private list getAlignSqlImpl(hash schema_hash, *hash opt);
1004 private *
string getSource(
string type,
string name);
1007 private checkSource(
string type,
string name, reference src);
1042 private list listTablesImpl();
1045 private list listFunctionsImpl();
1048 private list listProceduresImpl();
1051 private list listSequencesImpl();
1054 private list listViewsImpl();
1057 private list getListIntern(
string type);
1063 private string getCreateSqlImpl(
list l);
1066 static string getCreateSql(
list l);
1106 "number": (
"qore":
Type::Number,
"size":
SZ_NUM,
"size_range": (1, 38),
"scale_range": (-84, 127)),
1111 "timestamp with time zone": (
"qore":
Type::Date,
"size":
SZ_OPT,
"size_range": (0, 9)),
1112 "timestamp with local time zone": (
"qore":
Type::Date,
"size":
SZ_OPT,
"size_range": (0, 9)),
1123 "timestamp(0) with time zone": (
"qore":
Type::Date,),
1124 "timestamp(1) with time zone": (
"qore":
Type::Date,),
1125 "timestamp(2) with time zone": (
"qore":
Type::Date,),
1126 "timestamp(3) with time zone": (
"qore":
Type::Date,),
1127 "timestamp(4) with time zone": (
"qore":
Type::Date,),
1128 "timestamp(5) with time zone": (
"qore":
Type::Date,),
1129 "timestamp(6) with time zone": (
"qore":
Type::Date,),
1130 "timestamp(7) with time zone": (
"qore":
Type::Date,),
1131 "timestamp(8) with time zone": (
"qore":
Type::Date,),
1132 "timestamp(9) with time zone": (
"qore":
Type::Date,),
1133 "timestamp(0) with local time zone": (
"qore":
Type::Date,),
1134 "timestamp(1) with local time zone": (
"qore":
Type::Date,),
1135 "timestamp(2) with local time zone": (
"qore":
Type::Date,),
1136 "timestamp(3) with local time zone": (
"qore":
Type::Date,),
1137 "timestamp(4) with local time zone": (
"qore":
Type::Date,),
1138 "timestamp(5) with local time zone": (
"qore":
Type::Date,),
1139 "timestamp(6) with local time zone": (
"qore":
Type::Date,),
1140 "timestamp(7) with local time zone": (
"qore":
Type::Date,),
1141 "timestamp(8) with local time zone": (
"qore":
Type::Date,),
1142 "timestamp(9) with local time zone": (
"qore":
Type::Date,),
1143 "interval year(0) to month": (
"qore":
Type::Date,),
1144 "interval year(1) to month": (
"qore":
Type::Date,),
1145 "interval year(2) to month": (
"qore":
Type::Date,),
1146 "interval year(3) to month": (
"qore":
Type::Date,),
1147 "interval year(4) to month": (
"qore":
Type::Date,),
1148 "interval year(5) to month": (
"qore":
Type::Date,),
1149 "interval year(6) to month": (
"qore":
Type::Date,),
1150 "interval year(7) to month": (
"qore":
Type::Date,),
1151 "interval year(8) to month": (
"qore":
Type::Date,),
1152 "interval year(9) to month": (
"qore":
Type::Date,),
1153 "interval day(0) to second(0)": (
"qore":
Type::Date,),
1154 "interval day(0) to second(1)": (
"qore":
Type::Date,),
1155 "interval day(0) to second(2)": (
"qore":
Type::Date,),
1156 "interval day(0) to second(3)": (
"qore":
Type::Date,),
1157 "interval day(0) to second(4)": (
"qore":
Type::Date,),
1158 "interval day(0) to second(5)": (
"qore":
Type::Date,),
1159 "interval day(0) to second(6)": (
"qore":
Type::Date,),
1160 "interval day(0) to second(7)": (
"qore":
Type::Date,),
1161 "interval day(0) to second(8)": (
"qore":
Type::Date,),
1162 "interval day(0) to second(9)": (
"qore":
Type::Date,),
1163 "interval day(1) to second(0)": (
"qore":
Type::Date,),
1164 "interval day(1) to second(1)": (
"qore":
Type::Date,),
1165 "interval day(1) to second(2)": (
"qore":
Type::Date,),
1166 "interval day(1) to second(3)": (
"qore":
Type::Date,),
1167 "interval day(1) to second(4)": (
"qore":
Type::Date,),
1168 "interval day(1) to second(5)": (
"qore":
Type::Date,),
1169 "interval day(1) to second(6)": (
"qore":
Type::Date,),
1170 "interval day(1) to second(7)": (
"qore":
Type::Date,),
1171 "interval day(1) to second(8)": (
"qore":
Type::Date,),
1172 "interval day(1) to second(9)": (
"qore":
Type::Date,),
1173 "interval day(2) to second(0)": (
"qore":
Type::Date,),
1174 "interval day(2) to second(1)": (
"qore":
Type::Date,),
1175 "interval day(2) to second(2)": (
"qore":
Type::Date,),
1176 "interval day(2) to second(3)": (
"qore":
Type::Date,),
1177 "interval day(2) to second(4)": (
"qore":
Type::Date,),
1178 "interval day(2) to second(5)": (
"qore":
Type::Date,),
1179 "interval day(2) to second(6)": (
"qore":
Type::Date,),
1180 "interval day(2) to second(7)": (
"qore":
Type::Date,),
1181 "interval day(2) to second(8)": (
"qore":
Type::Date,),
1182 "interval day(2) to second(9)": (
"qore":
Type::Date,),
1196 "integer":
"number",
1199 "string":
"varchar2",
1200 "date":
"timestamp(6)",
1207 const OraColumnOpts = (
1259 "code":
string (
object t,
string cn, any arg, reference args) {
1260 *
string argstr = (foldl $1 +
"," + $2, (map $1.toString(), arg));
1269 return cn +
" in (select regexp_substr(%v,'[^,]+', 1, level) from dual connect by regexp_substr(%v, '[^,]+', 1, level) is not null)";
1278 "argoptional":
True,
1279 "code":
string (*
string cve, *
string arg) {
1280 string sql = cve +
" over (";
1282 sql +=
sprintf(
"partition by %s", arg);
1288 "code":
string (
string arg1, any arg) {
1289 return sprintf(
"to_char(%s, 'YYYY')", arg1);
1293 "code":
string (
string arg1, any arg) {
1294 return sprintf(
"to_char(%s, 'YYYY-MM')", arg1);
1298 "code":
string (
string arg1, any arg) {
1299 return sprintf(
"to_char(%s, 'YYYY-MM-DD')", arg1);
1303 "code":
string (
string arg1, any arg) {
1304 return sprintf(
"to_char(%s, 'YYYY-MM-DD HH24')", arg1);
1308 "code":
string (
string arg1, any arg) {
1309 return sprintf(
"%s.nextval", arg);
1319 "code":
string (
string cve,
string arg) {
1320 return sprintf(
"%s.nextval", arg);
1348 constructor(AbstractDatasource nds,
string nname, *hash opts);
1351 private bool checkExistenceImpl();
1354 private setTableInfoIntern();
1361 private hash setSchemaTable();
1364 private setDblinkSchema();
1367 private hash setTable();
1370 private string getUserSchema();
1373 private string getDBString();
1391 private hash getColumnOptions();
1394 private hash getColumnDescOptions();
1401 private getSelectWhereSqlUnlocked(reference sql, reference args, *hash qh, *hash jch,
bool join =
False, *hash ch);
1404 private doSelectOrderByWithOffsetSqlUnlockedImpl(reference sql, reference args, *hash qh, *hash jch, *hash ch);
1411 private Columns describeImpl();
1417 private Indexes getIndexesImpl();
1420 private ForeignConstraints getForeignConstraintsImpl(*hash opts);
1423 private Constraints getConstraintsImpl();
1426 private string getSelectSqlName(*hash qh);
1429 private Triggers getTriggersImpl();
1432 string getCreateTableSqlImpl(*hash opt);
1435 private *
list getCreateMiscSqlImpl(*hash opt,
bool cache);
1438 private string getCreateSqlImpl(
list l);
1441 private string getRenameSqlImpl(
string new_name);
1444 private AbstractColumn addColumnImpl(
string cname, hash opt,
bool nullable =
True);
1447 private AbstractPrimaryKey addPrimaryKeyImpl(
string cname, hash ch, *hash opt);
1450 private AbstractIndex addIndexImpl(
string iname,
bool enabled, hash ch, *hash opt);
1453 private AbstractForeignConstraint addForeignConstraintImpl(
string cname, hash ch,
string table, hash tch, *hash opt);
1456 private AbstractCheckConstraint addCheckConstraintImpl(
string cname,
string src, *hash opt);
1459 private AbstractUniqueConstraint addUniqueConstraintImpl(
string cname, hash ch, *hash opt);
1462 private AbstractTrigger addTriggerImpl(
string tname,
string src, *hash opt);
1465 private bool tryInsertImpl(
string sql, hash row);
1468 private *
list getAlignSqlImpl(AbstractTable t, *hash opt);
1471 private hash getQoreTypeMapImpl();
1474 private hash getTypeMapImpl();
1477 private hash getIndexOptions();
1480 private hash getConstraintOptions();
1483 private hash getTableCreationOptions();
1486 private hash getAlignTableOptions();
1513 private bool emptyImpl();
1516 private setupTableImpl(hash desc, *hash opt);
1532 private copyImpl(AbstractTable old);
represents an Oracle unique constraint
Definition: OracleSqlUtil.qm.dox.h:450
private hash getSelectOptions()
override in subclasses to return driver-specific options
represents an Oracle materialized view
Definition: OracleSqlUtil.qm.dox.h:738
const OracleCreationOptions
oracle-specific generic creation options
Definition: OracleSqlUtil.qm.dox.h:775
list listSynonyms()
returns a list of string synonym names in the database
the OracleSqlUtil namespace contains all the objects in the OracleSqlUtil module
Definition: OracleSqlUtil.qm.dox.h:280
private hash getAlignSchemaOptions()
returns driver-specific options to the base abstract class
string sprintf(string fmt,...)
bool equalImpl(AbstractFunctionBase t)
returns True if the argument is equal to the current object, False if not
ListIterator packageIterator()
returns an iterator listing the string package names in the database
*string tablespace
the tablespace name of the index (if supported)
Definition: OracleSqlUtil.qm.dox.h:372
string getDisableSql(string table_name)
returns a string that can be used to temporarily disable the constraint from the database ...
string getDropSql(string table_name)
returns a string that can be used to drop the constraint from the database
bool logging
Flag if is loggign mode used.
Definition: OracleSqlUtil.qm.dox.h:743
*string view_type_owner
Owner of the type of the view if the view is a typed view.
Definition: OracleSqlUtil.qm.dox.h:597
represents an Oracle table
Definition: OracleSqlUtil.qm.dox.h:1100
private hash getInsertOperatorMap()
returns the insert operator map for this object
private bool supportsSequencesImpl()
returns True if the database supports sequences
string getDisableSql(string table_name)
returns a string that can be used to temporarily disable the constraint from the database ...
ListIterator synonymIterator()
returns an iterator listing the string synonym names in the database
list getCreateSql(*hash opt)
returns a string that can be used to create the package in the database
*string tablespace
Name of the potential tablespace.
Definition: OracleSqlUtil.qm.dox.h:747
constructor(string n, string n_type, string n_src)
creates the object from the arguments passed
private bool supportsPackagesImpl()
returns True if the database supports packages
const OracleMaterializedViewDescriptionOptions
oracle-specific materialized view description options
Definition: OracleSqlUtil.qm.dox.h:815
ListIterator materializedViewIterator()
returns an iterator listing the string materialized view names in the database
private bool supportsTypesImpl()
returns True if the database supports named types
string getDisableSql(string table_name)
returns a string that can be used to temporarily disable the constraint from the database ...
list getRenameSql(string new_name)
returns a string that can be used to rename the object 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...
string getCreateSql(*hash opt)
returns a string that can be used to create the sequence in the database
*string superview_name
Name of the superview.
Definition: OracleSqlUtil.qm.dox.h:601
bool enabled
True if the trigger is enabled, False if not
Definition: OracleSqlUtil.qm.dox.h:630
string getColumnSqlName(string col)
returns the column name for use in SQL strings; subclasses can return a special string in case the co...
const OracleIndexOptions
Oracle-specific index options.
Definition: OracleSqlUtil.qm.dox.h:1227
private hash getCreationOptions()
returns driver-specific options to the base abstract class
bool enabled
True if the constraint is enabled, False if not
Definition: OracleSqlUtil.qm.dox.h:399
bool enabled
True if the constraint is enabled, False if not
Definition: OracleSqlUtil.qm.dox.h:427
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
represents an Oracle procedure
Definition: OracleSqlUtil.qm.dox.h:699
number number(softnumber n)
OracleColumn memberGate(string k)
returns the OracleColumn value of the given key if it exists, otherwise throws a KEY-ERROR exception ...
const OracleOpMap
where operator specializations for Oracle
Definition: OracleSqlUtil.qm.dox.h:1257
private bool supportsTablespacesImpl()
returns True if the database support tablespaces
constructor(string n, string n_src)
creates the object from the arguments passed
const OracleTableCreationOptions
Oracle table creation options.
Definition: OracleSqlUtil.qm.dox.h:1240
bool equalImpl(AbstractIndex ix)
returns True if the argument is equal to the current index, False if not
list listTypes()
returns a list of string type names in the database
*string tablespace
any tablespace for the unique key index
Definition: OracleSqlUtil.qm.dox.h:458
constructor(AbstractDatasource nds, *hash opts)
creates the object from the arguments given
bool enabled
True if the constraint is enabled, False if not
Definition: OracleSqlUtil.qm.dox.h:455
represents an Oracle view
Definition: OracleSqlUtil.qm.dox.h:587
list getColumnSqlNames(softlist cols)
returns a list of column names for use in SQL strings; subclasses can process the argument list in ca...
constructor(string n, string n_src, *string n_body_src)
creates the object from the arguments passed
list listMaterializedViews()
returns a list of string materialized view names in the database
private hash getSchemaDescriptionOptions()
returns driver-specific options to the base abstract class
string getEnableSql(string table_name, *hash opt)
returns a string that can be used to enable the constraint in the database
const OracleReservedWords
hash of reserved words
Definition: OracleSqlUtil.qm.dox.h:823
constructor(string n_name, number n_start=1, number n_increment=1, *softnumber n_end)
creates the object from the arguments
date microseconds(softint us)
softlist getRenameSql(string table_name, string new_name)
returns a string that can be used to rename the trigger in the database
softlist getRenameSql(string new_name)
returns a string that can be used to rename the view in the database
*OraclePackage getPackage(string name)
returns an OraclePackage object for the package name given or NOTHING if the object does not exist or...
ListIterator typeIterator()
returns an iterator listing the string type names in the database
*string oid_text
WITH OID clause of the typed view.
Definition: OracleSqlUtil.qm.dox.h:595
string getRenameSql(string table_name, string new_name)
returns a string that can be used to rename the index in the database
string getCreateSql(*hash opt)
returns a string that can be used to create the view in the database
string getEnableSql(string table_name, *hash opt)
returns a string that can be used to enable the constraint in the database
const OraColumnDescOptions
Oracle-specific column options.
Definition: OracleSqlUtil.qm.dox.h:1221
private bool constraintsLinkedToIndexesImpl()
returns True if the database links constraints to indexes (ie dropping the constraint drops the index...
bool use_index
Flag if is index used.
Definition: OracleSqlUtil.qm.dox.h:745
private hash getWhereOperatorMap()
returns the "where" operator map for this object
bool equalImpl(AbstractFunctionBase t)
returns True if the argument is equal to the current object, False if not
constructor(string n, bool u, hash c, string nt, *string t)
creates the object from the arguments
the Oracle specialization for SqlUtil::AbstractDatabase
Definition: OracleSqlUtil.qm.dox.h:770
int byte_size
byte size of the column
Definition: OracleSqlUtil.qm.dox.h:297
string getNativeTypeString()
returns the string describing the native type that can be used in SQL (for example to add the colunn ...
bool equalImpl(AbstractColumn c)
returns True if the argument is equal to the current object, False if not
const OraclePackageDescriptionOptions
oracle-specific package description options
Definition: OracleSqlUtil.qm.dox.h:809
string getRenameSql(string new_name)
returns a string that can be used to rename the sequence in the database
const OraTypeMap
maps oracle type names to type descriptions
Definition: OracleSqlUtil.qm.dox.h:1105
string string(softstring str)
const OracleAlignSchemaOptions
oracle-specific schema description / alignment options
Definition: OracleSqlUtil.qm.dox.h:780
string getRenameSql(AbstractTable t, string new_name)
returns a string that can be used to rename the column
bool equalImpl(AbstractFunctionBase t)
returns True if the argument is equal to the current object, False if not
const OracleConstraintOptions
Oracle-specific constraint options.
Definition: OracleSqlUtil.qm.dox.h:1235
OracleColumn memberGate(string k)
returns the OracleColumn value of the given key if it exists, otherwise throws a KEY-ERROR exception ...
softlist getCreateSql(*hash opt)
returns a string that can be used to create the object in the database
*string getComment()
returns any table comment or NOTHING if none is known
const OracleIopMap
a hash of default value operator descriptions for Oracle
Definition: OracleSqlUtil.qm.dox.h:1315
string getSchemaName()
returns the schema name
represents an Oracle check constraint
Definition: OracleSqlUtil.qm.dox.h:422
string getSqlName()
returns the schema and table naem in dot notation
string getEnableSql(string table_name, *hash opt)
returns a string that can be used to enable the constraint in the database
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
represents an Oracle number column
Definition: OracleSqlUtil.qm.dox.h:353
clearIndex()
clears any index base for the constraint
represents an Oracle package
Definition: OracleSqlUtil.qm.dox.h:711
list 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; if the col...
represents an Oracle column
Definition: OracleSqlUtil.qm.dox.h:290
*string type_text
Type clause of the typed view.
Definition: OracleSqlUtil.qm.dox.h:593
OracleDatabase get_database(AbstractDatasource nds, *hash opts)
returns an OracleDatabase object corresponding to the arguments
softlist getCreateSql(*hash opt)
returns a string that can be used to create the object in the database
const OracleCopMap
column operator specializations for Oracle
Definition: OracleSqlUtil.qm.dox.h:1275
list getAddColumnSql(AbstractTable t)
returns a list of sql strings that can be used to add the column to an existing table ...
private hash getColumnOperatorMap()
returns the column operator map for this object
const OracleSelectOptions
Oracle select options.
Definition: OracleSqlUtil.qm.dox.h:1252
const QoreTypeMap
maps qore type names to an oracle type
Definition: OracleSqlUtil.qm.dox.h:1195
hash join_inner(AbstractTable table, *string alias, *hash jcols, *hash cond, *hash opt)
*string body_src
package body source
Definition: OracleSqlUtil.qm.dox.h:716
*OracleMaterializedView getMaterializedView(string name)
returns an OracleMaterializedView object for the package name given or NOTHING if the object does not...
private *string getSqlValueImpl(any v)
returns a string for use in SQL queries representing the DB-specific value of the argument; returns N...
constructor(string n, string n_src)
creates the object from the arguments passed
private bool uniqueIndexCreatesConstraintImpl()
returns True if the database automatically creates a unique constraint when a unique index is created...
*string tablespace
any tablespace for the primary key index
Definition: OracleSqlUtil.qm.dox.h:512
*string view_type
Type of the view if the view is a typed view.
Definition: OracleSqlUtil.qm.dox.h:599
string getEnableSql(string table_name, *hash opt)
returns a string that can be used to enable the constraint in the database
private copyImpl(AbstractTable old)
db-specific copy actions
list listPackages()
returns a list of string package names in the database
represents an Oracle sequence
Definition: OracleSqlUtil.qm.dox.h:570
represents an Oracle trigger
Definition: OracleSqlUtil.qm.dox.h:625
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:603
const OracleSchemaDescriptionOptions
oracle-specific schema description keys
Definition: OracleSqlUtil.qm.dox.h:794
string getCreateSql(string table_name, *hash opt)
returns a string that can be used to create the index in the database
const OraColumnOptions
Oracle-specific column options.
Definition: OracleSqlUtil.qm.dox.h:1215
represents an Oracle foreign constraint
Definition: OracleSqlUtil.qm.dox.h:394
represents an Oracle type
Definition: OracleSqlUtil.qm.dox.h:679
represents an Oracle primary key
Definition: OracleSqlUtil.qm.dox.h:507
clearIndex()
clears any index base for the constraint
*string getTablespaceName()
returns the data tablespace name for the table if any or NOTHING if none is known ...
private doSelectLimitOnlyUnlockedImpl(reference sql, reference args, *hash qh)
processes a string for use in SQL select statements when there is a "limit" argument, but no "orderby" or "offset" arguments
string native_type
the native type of the index (if supported)
Definition: OracleSqlUtil.qm.dox.h:369
string join(string str,...)
private softint getNextSequenceValueImpl(string name)
returns the next value in the given sequence
represents an Oracle index
Definition: OracleSqlUtil.qm.dox.h:364
bool char_used
the column uses character semantics
Definition: OracleSqlUtil.qm.dox.h:295
represents an Oracle function
Definition: OracleSqlUtil.qm.dox.h:687
the base class for Oracle code objects
Definition: OracleSqlUtil.qm.dox.h:654
string getDisableSql(string table_name)
returns a string that can be used to temporarily disable the constraint from the database ...