179 const GET_PHYSICAL_DB_SIZE_NOVAL = -1;
198 static doOkCallback(*hash<auto> opt,
int ac,
string type,
string name, *
string table, *
string info);
201 static runInfoCallback(code info_callback,
int ac,
string type,
string name, *
string table, *
string new_name, *
string info);
205 static *
string doCallback(*hash<auto> opt, *
string sql,
int ac,
string type,
string name, *
string table, *
string new_name, *
string info);
207 static list doCallback(*hash<auto> opt,
list sql,
int ac,
string type,
string name, *
string table, *
string new_name, *
string info);
289 list dropSqlUnlocked(
string type,
hash schema_hash, code get, code make, *hash<auto> opt,
string make_arg_type);
294 list alignCodeUnlocked(
string type,
hash schema_hash, code get, code make, *hash<auto> opt,
string make_arg_type);
510 doDropSql(*softlist
l,
string type,
string name, *hash<auto> opt);
513 bool doDrop(*softlist
l,
string type,
string name, *hash<auto> opt);
770 validateOptionsIntern(
string err, hash<auto> ropt, reference<hash> opt);
775 validateOptionsIntern(
string err, hash<auto> ropt, reference<hash> opt,
string tag);
785 static checkDriverOptions(reference<hash> h,
string drv);
866 abstract string getCreateSqlImpl(
list l);
869 abstract list<auto> getAlignSqlImpl(
hash schema_hash, *hash<auto> opt);
872 abstract list<auto> getDropSchemaSqlImpl(
hash schema_hash, *hash<auto> opt);
899 abstract list<string> featuresImpl();
902 abstract list<string> listTablesImpl();
905 abstract list<string> listFunctionsImpl();
908 abstract list<string> listProceduresImpl();
911 abstract list<string> listSequencesImpl();
914 abstract list<string> listViewsImpl();
931 abstract bool supportsPackagesImpl();
934 abstract bool supportsTypesImpl();
938 abstract bool rebuildIndexImpl(
string name, *hash<auto> options);
941 abstract computeStatisticsImpl(*hash<auto> options);
944 abstract reclaimSpaceImpl(*hash<auto> options);
947 abstract int getPhysicalSizeImpl();
the base abstract class for the database implementation
Definition: AbstractDatabase.qc.dox.h:34
Qore::ListIterator viewIterator()
returns an iterator listing the string view names in the database
const CreationOptions
default generic creation options
Definition: AbstractDatabase.qc.dox.h:124
int getNextSequenceValue(string name)
returns the next value in the given sequence
const CallbackOptions
generic callback options
Definition: AbstractDatabase.qc.dox.h:57
bool dropProcedureIfExists(string name, *hash< auto > opt)
drops the given procedure if it exists; returns True if the procedure was dropped,...
const DropSchemaOptions
default generic drop schema options
Definition: AbstractDatabase.qc.dox.h:138
*string getDropSequenceSqlIfExists(string name, *hash< auto > opt)
returns the SQL require to drop the given sequence if it exists or NOTHING if the named sequence does...
list< string > listTables()
returns a list of string table names in the database
hash< auto > getAlignSchemaOptions()
override in subclasses to return driver-specific options
const CacheOptions
generic cache options
Definition: AbstractDatabase.qc.dox.h:48
hash< auto > getCacheOptions()
override in subclasses to return driver-specific options
bool supportsTypes()
returns True if the database supports named types
const AC_NotFound
used when dropping object but the object is not present
Definition: AbstractDatabase.qc.dox.h:102
abstract int getCurrentSequenceValueImpl(string name)
returns the last value issued for the given sequence in the current session
const SchemaDescriptionOptions
default generic schema description keys
Definition: AbstractDatabase.qc.dox.h:154
const AC_Modify
used when an object is modified in place
Definition: AbstractDatabase.qc.dox.h:81
hash< auto > getSchemaDescriptionOptions()
override in subclasses to return driver-specific options
const AC_Add
used when an element is added to an existing object
Definition: AbstractDatabase.qc.dox.h:87
const AC_Recreate
used when an object is recreated (usually dropped and recreated in place)
Definition: AbstractDatabase.qc.dox.h:90
bool rebuildIndex(AbstractIndex index, *hash< auto > options)
Rebuild an index in the DB.
*list< auto > getDropTableSqlIfExists(string name, *hash< auto > opt)
returns the SQL require to drop the given table if it exists or NOTHING if the named table does not e...
list features()
See DB Features Constants.
*string getDropFunctionSqlIfExists(string name, *hash< auto > opt)
returns the SQL require to drop the given function if it exists or NOTHING if the named function does...
AbstractFunction makeFunction(string name, string src, *hash< auto > opts)
creates a database-specific AbstractFunction object corresponding to the arguments
hash< auto > getCreationOptions()
override in subclasses to return driver-specific options
hash< auto > getSequenceDescriptionOptions()
override in subclasses to return driver-specific options
const AC_Update
used when data is updated in a table
Definition: AbstractDatabase.qc.dox.h:96
list< string > listProcedures()
returns a list of string procedure names in the database
list< string > listFunctions()
returns a list of string function names in the database
const ActionMap
maps from action codes to action descriptions
Definition: AbstractDatabase.qc.dox.h:106
const AC_Drop
used when an object is dropped
Definition: AbstractDatabase.qc.dox.h:75
list< string > listViews()
returns a list of string view names in the database
*AbstractFunction getProcedure(string name)
returns an AbstractFunction argument for the given stored procedure name or NOTHING if the stored pro...
int getPhysicalSize()
Get the current database physical size in bytes.
list< string > listSequences()
returns a list of string sequence names in the database
bool supportsPackages()
returns True if the database supports packages
const ActionDescMap
maps from action descriptions to action codes
Definition: AbstractDatabase.qc.dox.h:110
list< auto > getDropSchemaSql(hash schema_hash, *hash< auto > opt)
accepts a hash argument describing a database schema and returns a list of SQL strings that can be us...
const AC_Create
used when a new object is created
Definition: AbstractDatabase.qc.dox.h:72
const ComputeStatisticsOptions
Options for computeStatistics()
Definition: AbstractDatabase.qc.dox.h:167
list< auto > getAlignProcedureSql(AbstractFunction f, *hash< auto > opt)
returns a list of SQL strings that can be used to update a stored procedure in the database to the st...
reclaimSpace(*hash< auto > options)
Reclaim taken but unused space in the DB.
const AC_Delete
used when data is deleted in a table
Definition: AbstractDatabase.qc.dox.h:99
bool rebuildIndex(string name, *hash< auto > options)
Rebuild an index in the DB.
hash< auto > getRebuildIndexOptions()
override in subclasses to return driver-specific options
auto tryExecArgs(string sql, *softlist< auto > args)
executes some SQL with optional arguments so that if an error occurs the current transaction state is...
const AlignSchemaOptions
default generic schema description / alignment options
Definition: AbstractDatabase.qc.dox.h:131
bool native_case
native case option
Definition: AbstractDatabase.qc.dox.h:176
const DatabaseOptions
database options
Definition: AbstractDatabase.qc.dox.h:41
const AC_Truncate
used when a table is truncated
Definition: AbstractDatabase.qc.dox.h:84
*AbstractView getView(string name)
returns an AbstractView argument for the given view name or NOTHING if the view cannot be found
bool supportsSequences()
returns True if the database supports sequences
int getCurrentSequenceValue(string name)
returns the last value issued for the given sequence in the current session
const AC_Unchanged
used when an existing object matches the template and no changes are made
Definition: AbstractDatabase.qc.dox.h:69
computeStatistics(*hash< auto > options)
Compute database statistics.
bool dropTableIfExists(string name, *hash< auto > opt)
drops the given table if it exists; returns True if the table was dropped, False if not
auto tryExecRaw(string sql)
executes some SQL so that if an error occurs the current transaction state is not lost
auto tryExec(string sql)
executes some SQL with optional arguments so that if an error occurs the current transaction state is...
Qore::ListIterator tableIterator()
returns an iterator listing the string table names in the database
abstract bool supportsSequencesImpl()
returns True if the database supports sequences
hash< auto > getReclaimSpaceOptions()
override in subclasses to return driver-specific options
auto tryExecArgsImpl(string sql, *softlist< auto > args)
tries to execute a command so that if an error occurs the current transaction status is not lost
hash< auto > getCallbackOptions()
override in subclasses to return driver-specific options
hash< auto > getComputeStatisticsOptions()
override in subclasses to return driver-specific options
Qore::ListIterator functionIterator()
returns an iterator listing the string function names in the database
const ReclaimSpaceOptions
Options for reclaimSpace()
Definition: AbstractDatabase.qc.dox.h:171
bool dropViewIfExists(string name, *hash< auto > opt)
drops the given view if it exists; returns True if the view was dropped, False if not
hash< auto > getDatabaseOptions()
override in subclasses to return driver-specific options
bool dropSequenceIfExists(string name, *hash< auto > opt)
drops the given sequence if it exists; returns True if the sequence was dropped, False if not
const AC_Insert
used when data is inserted in a table
Definition: AbstractDatabase.qc.dox.h:93
AbstractSequence makeSequence(string name, number start=1, number increment=1, *softnumber end, *hash< auto > opts)
creates a database-specific AbstractSequence object corresponding to the arguments
AbstractTable makeTable(string name, hash< auto > desc, *hash< auto > opts)
creates a database-specific AbstractTable object corresponding to the arguments
const ActionLetterMap
maps from action codes to action letter codes
Definition: AbstractDatabase.qc.dox.h:114
abstract int getNextSequenceValueImpl(string name)
returns the next value in the given sequence
AbstractFunction makeProcedure(string name, string src, *hash< auto > opt)
creates a database-specific AbstractFunction object for a stored procedure corresponding to the argum...
Qore::ListIterator procedureIterator()
returns an iterator listing the string procedure names in the database
Qore::ListIterator sequenceIterator()
returns an iterator listing the string sequence names in the database
auto tryExecRawImpl(string sql)
tries to execute a command so that if an error occurs the current transaction status is not lost
list< auto > getAlignFunctionSql(AbstractFunction f, *hash< auto > opt)
returns a list of SQL strings that can be used to update a function in the database to the function d...
*string getDropProcedureSqlIfExists(string name, *hash< auto > opt)
returns the SQL require to drop the given procedure if it exists or NOTHING if the named procedure do...
string getSqlFromList(list l)
returns an SQL string corresponding to the list of commands in the argument
*AbstractTable getTable(string name)
returns an AbstractTable argument for the given table name or NOTHING if the table cannot be found
*AbstractFunction getFunction(string name)
returns an AbstractFunction argument for the given function name or NOTHING if the function cannot be...
hash< auto > getDropSchemaOptions()
override in subclasses to return driver-specific options
constructor(AbstractDatasource nds, *hash nopts)
creates the object; private constructor
list< auto > getAlignSql(hash schema_hash, *hash< auto > opt, *Tables table_cache)
accepts a hash argument describing a database schema and returns a list of SQL strings that can be us...
*AbstractSequence getSequence(string name)
returns an AbstractSequence argument for the given sequence name or NOTHING if the sequence cannot be...
bool dropFunctionIfExists(string name, *hash< auto > opt)
drops the given function if it exists; returns True if the function was dropped, False if not
const SequenceDescriptionOptions
default generic sequence description keys
Definition: AbstractDatabase.qc.dox.h:163
const AC_Rename
used when an object is renamed
Definition: AbstractDatabase.qc.dox.h:78
base class for functions
Definition: SqlUtil.qm.dox.h:5947
the abstract base class for index information
Definition: SqlUtil.qm.dox.h:5443
base class for sequences
Definition: SqlUtil.qm.dox.h:5830
base class for abstract SqlUtil classes
Definition: AbstractSqlUtilBase.qc.dox.h:34
transient Mutex l()
mutex for atomic actions
*hash< auto > opts
option hash
Definition: AbstractSqlUtilBase.qc.dox.h:41
the base abstract class for the table implementation
Definition: AbstractTable.qc.dox.h:30
base class for views
Definition: SqlUtil.qm.dox.h:5866
the table container class stores a collection of tables in a schema
Definition: SqlUtil.qm.dox.h:5000
int index(softstring str, softstring substr, softint pos=0)
hash< auto > hash(object obj)
number number(softnumber n)
Qore AbstractDatabase class definition.
Definition: AbstractDatabase.qc.dox.h:32