50 "table_cache":
"Tables",
60 "info_callback":
"code",
61 "sql_callback":
"code",
167 "table_cache":
"Tables",
232 "tables" :
"softstringlist",
237 "tables" :
"softstringlist",
245 const GET_PHYSICAL_DB_SIZE_NOVAL = -1;
264 static doOkCallback(*hash<auto> opt,
int ac,
string type,
string name, *
string table, *
string info);
267 static runInfoCallback(code info_callback,
int ac,
string type,
string name, *
string table, *
string new_name, *
string info);
271 static *
string doCallback(*hash<auto> opt, *
string sql,
int ac,
string type,
string name, *
string table, *
string new_name, *
string info);
273 static list doCallback(*hash<auto> opt,
list sql,
int ac,
string type,
string name, *
string table, *
string new_name, *
string info);
301 auto tryExecArgs(
string sql, *softlist<auto> args);
355 list dropSqlUnlocked(
string type,
hash schema_hash, code get, code make, *hash<auto> opt,
string make_arg_type);
360 list alignCodeUnlocked(
string type,
hash schema_hash, code get, code make, *hash<auto> opt,
string make_arg_type);
576 doDropSql(*softlist
l,
string type,
string name, *hash<auto> opt);
579 bool doDrop(*softlist
l,
string type,
string name, *hash<auto> opt);
836 validateOptionsIntern(
string err, hash<auto> ropt, reference<hash> opt);
841 validateOptionsIntern(
string err, hash<auto> ropt, reference<hash> opt,
string tag);
851 static checkDriverOptions(reference<hash> h,
string drv);
932 abstract string getCreateSqlImpl(
list l);
935 abstract list<auto> getAlignSqlImpl(
hash schema_hash, *hash<auto> opt);
938 abstract list<auto> getDropSchemaSqlImpl(
hash schema_hash, *hash<auto> opt);
965 abstract list<string> featuresImpl();
968 abstract list<string> listTablesImpl();
971 abstract list<string> listFunctionsImpl();
974 abstract list<string> listProceduresImpl();
977 abstract list<string> listSequencesImpl();
980 abstract list<string> listViewsImpl();
997 abstract bool supportsPackagesImpl();
1000 abstract bool supportsTypesImpl();
1004 abstract bool rebuildIndexImpl(
string name, *hash<auto> options);
1007 abstract computeStatisticsImpl(*hash<auto> options);
1010 abstract reclaimSpaceImpl(*hash<auto> options);
1013 abstract int getPhysicalSizeImpl();
const ActionMap
maps from action codes to action descriptions
Definition: AbstractDatabase.qc.dox.h:111
AbstractFunction makeFunction(string name, string src, *hash< auto > opts)
creates a database-specific AbstractFunction object corresponding to the arguments
auto tryExecRaw(string sql)
executes some SQL so that if an error occurs the current transaction state is not lost
hash< auto > getComputeStatisticsOptions()
override in subclasses to return driver-specific options
hash< auto > getDatabaseOptions()
override in subclasses to return driver-specific options
const AC_Unchanged
used when an existing object matches the template and no changes are made
Definition: AbstractDatabase.qc.dox.h:74
the base abstract class for the table implementation
Definition: AbstractTable.qc.dox.h:36
bool rebuildIndex(string name, *hash< auto > options)
Rebuild an index in the DB.
the table container class stores a collection of tables in a schema
Definition: SqlUtil.qm.dox.h:5374
hash< auto > getRebuildIndexOptions()
override in subclasses to return driver-specific options
*hash< auto > opts
option hash
Definition: AbstractSqlUtilBase.qc.dox.h:41
const DropSchemaOptions
default generic drop schema options
Definition: AbstractDatabase.qc.dox.h:184
reclaimSpace(*hash< auto > options)
Reclaim taken but unused space in the DB.
const SchemaDescriptionOptions
default generic schema description keys
Definition: AbstractDatabase.qc.dox.h:201
*AbstractView getView(string name)
returns an AbstractView argument for the given view name or NOTHING if the view cannot be found
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 DatabaseOptions
database options
Definition: AbstractDatabase.qc.dox.h:41
the abstract base class for index information
Definition: SqlUtil.qm.dox.h:5817
constructor(AbstractDatasource nds, *hash nopts)
creates the object; private constructor
Qore::ListIterator procedureIterator()
returns an iterator listing the string procedure names in the database
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...
computeStatistics(*hash< auto > options)
Compute database statistics.
hash< auto > getCallbackOptions()
override in subclasses to return driver-specific options
const AC_Create
used when a new object is created
Definition: AbstractDatabase.qc.dox.h:77
base class for sequences
Definition: SqlUtil.qm.dox.h:6204
*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...
int getPhysicalSize()
Get the current database physical size in bytes.
*AbstractSequence getSequence(string name)
returns an AbstractSequence argument for the given sequence name or NOTHING if the sequence cannot be...
number number(softnumber n)
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...
auto tryExec(string sql)
executes some SQL with optional arguments so that if an error occurs the current transaction state is...
base class for abstract SqlUtil classes
Definition: AbstractSqlUtilBase.qc.dox.h:34
const CacheOptions
generic cache options
Definition: AbstractDatabase.qc.dox.h:49
const AC_Modify
used when an object is modified in place
Definition: AbstractDatabase.qc.dox.h:86
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
*AbstractFunction getFunction(string name)
returns an AbstractFunction argument for the given function name or NOTHING if the function cannot be...
const AC_Drop
used when an object is dropped
Definition: AbstractDatabase.qc.dox.h:80
Qore AbstractDatabase class definition.
Definition: AbstractDatabase.qc.dox.h:32
Qore::ListIterator sequenceIterator()
returns an iterator listing the string sequence names in the database
const ActionLetterMap
maps from action codes to action letter codes
Definition: AbstractDatabase.qc.dox.h:143
hash< auto > getSchemaDescriptionOptions()
override in subclasses to return driver-specific options
bool supportsPackages()
returns True if the database supports packages
int index(softstring str, softstring substr, softint pos=0)
Qore::ListIterator functionIterator()
returns an iterator listing the string function names in the database
hash< auto > getCreationOptions()
override in subclasses to return driver-specific options
const AC_Rename
used when an object is renamed
Definition: AbstractDatabase.qc.dox.h:83
list< string > listTables()
returns a list of string table names in the database
bool dropViewIfExists(string name, *hash< auto > opt)
drops the given view if it exists; returns True if the view was dropped, False if not
const CreationOptions
default generic creation options
Definition: AbstractDatabase.qc.dox.h:165
const AC_Insert
used when data is inserted in a table
Definition: AbstractDatabase.qc.dox.h:98
hash< auto > getAlignSchemaOptions()
override in subclasses to return driver-specific options
hash< auto > getSequenceDescriptionOptions()
override in subclasses to return driver-specific options
Qore::ListIterator tableIterator()
returns an iterator listing the string table names in the database
abstract bool supportsSequencesImpl()
returns True if the database supports sequences
string getSqlFromList(list l)
returns an SQL string corresponding to the list of commands in the argument
bool supportsTypes()
returns True if the database supports named types
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...
Qore::ListIterator viewIterator()
returns an iterator listing the string view names in the database
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...
auto tryExecRawImpl(string sql)
tries to execute a command so that if an error occurs the current transaction status is not lost
base class for functions
Definition: SqlUtil.qm.dox.h:6321
const AC_Recreate
used when an object is recreated (usually dropped and recreated in place)
Definition: AbstractDatabase.qc.dox.h:95
base class for views
Definition: SqlUtil.qm.dox.h:6240
bool native_case
native case option
Definition: AbstractDatabase.qc.dox.h:242
hash< auto > hash(object obj)
AbstractTable makeTable(string name, hash< auto > desc, *hash< auto > opts)
creates a database-specific AbstractTable object corresponding to the arguments
hash< auto > getDropSchemaOptions()
override in subclasses to return driver-specific options
const SequenceDescriptionOptions
default generic sequence description keys
Definition: AbstractDatabase.qc.dox.h:224
hash< auto > getReclaimSpaceOptions()
override in subclasses to return driver-specific options
list< string > listSequences()
returns a list of string sequence names in the database
list< string > listProcedures()
returns a list of string procedure names in the database
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 AlignSchemaOptions
default generic schema description / alignment options
Definition: AbstractDatabase.qc.dox.h:176
int getNextSequenceValue(string name)
returns the next value in the given sequence
const AC_Truncate
used when a table is truncated
Definition: AbstractDatabase.qc.dox.h:89
transient Mutex l()
mutex for atomic actions
list< string > listViews()
returns a list of string view names in the database
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
*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...
hash< auto > getCacheOptions()
override in subclasses to return driver-specific options
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...
list< string > listFunctions()
returns a list of string function names in the database
const CallbackOptions
generic callback options
Definition: AbstractDatabase.qc.dox.h:59
const ActionDescMap
maps from action descriptions to action codes
Definition: AbstractDatabase.qc.dox.h:127
*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...
*AbstractFunction getProcedure(string name)
returns an AbstractFunction argument for the given stored procedure name or NOTHING if the stored pro...
int getCurrentSequenceValue(string name)
returns the last value issued for the given sequence in the current session
bool dropProcedureIfExists(string name, *hash< auto > opt)
drops the given procedure if it exists; returns True if the procedure was dropped,...
const AC_Delete
used when data is deleted in a table
Definition: AbstractDatabase.qc.dox.h:104
const ComputeStatisticsOptions
Options for computeStatistics()
Definition: AbstractDatabase.qc.dox.h:231
const AC_Update
used when data is updated in a table
Definition: AbstractDatabase.qc.dox.h:101
const AC_NotFound
used when dropping object but the object is not present
Definition: AbstractDatabase.qc.dox.h:107
abstract int getCurrentSequenceValueImpl(string name)
returns the last value issued for the given sequence in the current session
AbstractFunction makeProcedure(string name, string src, *hash< auto > opt)
creates a database-specific AbstractFunction object for a stored procedure corresponding to the argum...
the base abstract class for the database implementation
Definition: AbstractDatabase.qc.dox.h:34
bool dropTableIfExists(string name, *hash< auto > opt)
drops the given table if it exists; returns True if the table was dropped, False if not
const AC_Add
used when an element is added to an existing object
Definition: AbstractDatabase.qc.dox.h:92
auto tryExecArgs(string sql, *softlist< auto > args)
executes some SQL with optional arguments so that if an error occurs the current transaction state is...
*AbstractTable getTable(string name)
returns an AbstractTable argument for the given table name or NOTHING if the table cannot be found
abstract int getNextSequenceValueImpl(string name)
returns the next value in the given sequence
bool supportsSequences()
returns True if the database supports sequences
const ReclaimSpaceOptions
Options for reclaimSpace()
Definition: AbstractDatabase.qc.dox.h:236