28 class AbstractDatabase :
public AbstractSqlUtilBase {
35 const DatabaseOptions = ...;
42 const CacheOptions = ...;
51 const CallbackOptions = ...;
63 const AC_Unchanged = 0;
78 const AC_Truncate = 5;
84 const AC_Recreate = 7;
96 const AC_NotFound = 11;
100 const ActionMap = ...;
104 const ActionDescMap = ...;
108 const ActionLetterMap = ...;
118 const CreationOptions = ...;
125 const AlignSchemaOptions = ...;
132 const DropSchemaOptions = ...;
148 const SchemaDescriptionOptions = ...;
157 const SequenceDescriptionOptions = ...;
161 const ComputeStatisticsOptions = ...;
165 const ReclaimSpaceOptions = ...;
170 bool native_case =
False;
173 const GET_PHYSICAL_DB_SIZE_NOVAL = -1;
184 constructor(AbstractDatasource nds, *
hash nopts) ;
192 static doOkCallback(*hash<auto> opt,
int ac,
string type,
string name, *
string table, *
string info);
195 static runInfoCallback(code info_callback,
int ac,
string type,
string name, *
string table, *
string new_name, *
string info);
199 static *
string doCallback(*hash<auto> opt, *
string sql,
int ac,
string type,
string name, *
string table, *
string new_name, *
string info);
201 static list doCallback(*hash<auto> opt,
list sql,
int ac,
string type,
string name, *
string table, *
string new_name, *
string info);
215 auto tryExec(
string sql);
229 auto tryExecArgs(
string sql, *softlist<auto> args);
244 auto tryExecRaw(
string sql);
262 list<auto> getAlignSql(
hash schema_hash, *hash<auto> opt, *Tables table_cache);
279 list<auto> getDropSchemaSql(
hash schema_hash, *hash<auto> opt);
283 list dropSqlUnlocked(
string type,
hash schema_hash, code get, code make, *hash<auto> opt,
string make_arg_type);
288 list alignCodeUnlocked(
string type,
hash schema_hash, code get, code make, *hash<auto> opt,
string make_arg_type);
309 AbstractSequence makeSequence(
string name,
number start = 1,
number increment = 1, *softnumber end, *hash<auto> opts);
312 AbstractSequence makeSequenceFromDescription(
string name, *hash<auto> sh, *hash<auto> opts);
331 AbstractTable makeTable(
string name, hash<auto> desc, *hash<auto> opts);
350 AbstractFunction makeFunction(
string name,
string src, *hash<auto> opts);
369 AbstractFunction makeProcedure(
string name,
string src, *hash<auto> opt);
385 bool dropFunctionIfExists(
string name, *hash<auto> opt);
401 bool dropProcedureIfExists(
string name, *hash<auto> opt);
417 bool dropSequenceIfExists(
string name, *hash<auto> opt);
433 bool dropViewIfExists(
string name, *hash<auto> opt);
449 bool dropTableIfExists(
string name, *hash<auto> opt);
465 *
string getDropFunctionSqlIfExists(
string name, *hash<auto> opt);
481 *
string getDropProcedureSqlIfExists(
string name, *hash<auto> opt);
497 *
string getDropSequenceSqlIfExists(
string name, *hash<auto> opt);
513 *list<auto> getDropTableSqlIfExists(
string name, *hash<auto> opt);
516 doDropSql(*softlist l,
string type,
string name, *hash<auto> opt);
519 bool doDrop(*softlist l,
string type,
string name, *hash<auto> opt);
535 list<auto> getAlignFunctionSql(AbstractFunction f, *hash<auto> opt);
551 list<auto> getAlignProcedureSql(AbstractFunction f, *hash<auto> opt);
564 *AbstractTable getTable(
string name);
577 *AbstractSequence getSequence(
string name);
592 *AbstractFunction getFunction(
string name);
607 *AbstractFunction getProcedure(
string name);
620 *AbstractView getView(
string name);
633 int getNextSequenceValue(
string name);
646 int getCurrentSequenceValue(
string name);
659 string getSqlFromList(
list l);
663 bool supportsSequences();
667 bool supportsTypes();
671 bool supportsPackages();
675 list<string> listTables();
683 list<string> listFunctions();
691 list<string> listProcedures();
699 list<string> listSequences();
707 list<string> listViews();
725 bool rebuildIndex(
string name, *hash<auto> options);
737 bool rebuildIndex(AbstractIndex
index, *hash<auto> options);
748 computeStatistics(*hash<auto> options);
759 reclaimSpace(*hash<auto> options);
772 int getPhysicalSize();
780 bool requiresScale();
788 int getMaximumPrecision();
792 validateOptionsIntern(
string err, hash<auto> ropt, reference<hash> opt);
797 validateOptionsIntern(
string err, hash<auto> ropt, reference<hash> opt,
string tag);
801 static AbstractDatabase getDatabase(AbstractDatasource nds, *hash<auto> opts);
803 static AbstractDatabase getDatabase(
string dsstr, *hash<auto> opts);
805 static AbstractDatabase getDatabase(hash<auto> dsh, *hash<auto> opts);
807 static checkDriverOptions(reference<hash> h,
string drv);
811 hash<auto> getDatabaseOptions();
817 hash<auto> getCallbackOptions();
823 hash<auto> getCreationOptions();
829 hash<auto> getCacheOptions();
835 hash<auto> getAlignSchemaOptions();
841 hash<auto> getDropSchemaOptions();
847 hash<auto> getSchemaDescriptionOptions();
853 hash<auto> getSequenceDescriptionOptions();
859 hash<auto> getRebuildIndexOptions();
865 hash<auto> getComputeStatisticsOptions();
871 hash<auto> getReclaimSpaceOptions();
877 auto tryExecArgsImpl(
string sql, *softlist<auto> args);
883 auto tryExecRawImpl(
string sql);
888 abstract string getCreateSqlImpl(
list l);
891 abstract list<auto> getAlignSqlImpl(
hash schema_hash, *hash<auto> opt);
894 abstract list<auto> getDropSchemaSqlImpl(
hash schema_hash, *hash<auto> opt);
898 abstract *AbstractSequence getSequenceImpl(
string name);
901 abstract *AbstractFunction getFunctionImpl(
string name);
904 abstract *AbstractFunction getProcedureImpl(
string name);
907 abstract *AbstractView getViewImpl(
string name);
911 abstract AbstractSequence makeSequenceImpl(
string name,
number start = 1,
number increment = 1, *softnumber end, *hash<auto> opts);
abstract AbstractFunction makeFunctionImpl(
string name,
string src, *hash<auto> opts);
abstract AbstractFunction makeProcedureImpl(
string name,
string src, *hash<auto> opts);
abstract list<string> featuresImpl();
abstract list<string> listTablesImpl();
abstract list<string> listFunctionsImpl();
abstract list<string> listProceduresImpl();
abstract list<string> listSequencesImpl();
abstract list<string> listViewsImpl();
int index(softstring str, softstring substr, softint pos=0)
hash< auto > hash(object obj)
number number(softnumber n)
Qore AbstractNumericDataType class definition.
Definition: AbstractNumericDataType.qc.dox.h:31