104 hash<GenericColumnInfo>
c_int(
bool notnull =
False, *
string comment);
114 hash<GenericColumnInfo>
c_int(
string comment);
122 hash<GenericColumnInfo>
c_varchar(
int size,
bool notnull =
False, *
string comment);
129 hash<GenericColumnInfo>
c_varchar(
int size,
string comment);
137 hash<GenericColumnInfo>
c_char(
int size,
bool notnull =
False, *
string comment);
144 hash<GenericColumnInfo>
c_char(
int size,
string comment);
153 hash<GenericColumnInfo>
c_date(
bool notnull =
False, *
string comment);
161 hash<GenericColumnInfo>
c_date(
string comment);
178 hash<GenericColumnInfo>
c_timestamp(
string comment);
188 hash<GenericColumnInfo>
c_number(
bool notnull =
False, *
string comment);
199 hash<GenericColumnInfo>
c_number(
int size,
int scale,
bool notnull =
False, *
string comment);
209 hash<GenericColumnInfo>
c_number(
int size,
bool notnull =
False, *
string comment);
218 hash<GenericColumnInfo>
c_number(
int size,
string comment);
227 hash<GenericColumnInfo>
c_blob(
bool notnull =
False, *
string comment);
235 hash<GenericColumnInfo>
c_blob(
string comment);
244 hash<GenericColumnInfo>
c_clob(
bool notnull =
False, *
string comment);
252 hash<GenericColumnInfo>
c_clob(
string comment);
262 int change_count = 0;
277 infoCallback(
string str,
int ac, *
string type, *
string name, *
string table, *
string new_name, *
string info);
422 int align(
bool force =
False,
int verbose = 0);
426 drop(
bool force =
False,
int verbose = 0);
722 doTable(AbstractTable table,
list rows,
int upsert_strategy,
bool delete_others,
int verbose, reference<hash> sh);
logProgress(string str)
outputs a log message without any newline
*hash getIndexOptions()
returns index options
*hash getProcedures()
returns stored procedure definitions
Qore::SQL::AbstractDatasource ds
the datasource for the schema
Definition: Schema.qm.dox.h:348
hash getCallbacks(bool force=False)
returns a callback option hash usable with SqlUtil schema operations
infoCallback(string str, int ac, *string type, *string name, *string table, *string new_name, *string info)
this is the informational callback method for schema operations
*hash getProceduresImpl()
returns stored procedure definitions
hash< GenericColumnInfo > c_varchar(int size, bool notnull=False, *string comment)
returns a column hash for a VARCHAR column
*hash getInsertOnlyReferenceDataImpl()
returns a hash of "insert-only reference data", describing data that will only be inserted if missing...
*hash getTablesImpl()
returns table definitions
string getVersionColumn()
returns the name of the column holding the schema version string by calling getVersionColumnImpl() ...
string name
the name of the schema
Definition: Schema.qm.dox.h:331
*hash getFunctionsImpl()
returns function definitions
*hash getSequences()
returns sequence definitions
doPostAlignment(Tables table_cache, bool first_time_install, *hash initial_schema_info)
this method is called after schema structural alignment has been executed but before schema reference...
hash< GenericColumnInfo > c_clob(bool notnull=False, *string comment)
returns a column hash for a CLOB column
*hash getMaterializedViewsImpl()
returns materialized view definitions
string getVersion()
returns the version of the schema
hash< GenericColumnInfo > c_char(int size, bool notnull=False, *string comment)
returns a column hash for a CHAR column
*hash getTables()
returns table definitions
*hash column_options
column options, as provided by getColumnOptions()
Definition: Schema.qm.dox.h:343
constructor(Qore::SQL::AbstractDatasource n_ds, *string dts, *string its, *hash opts)
creates the object from the arguments
*hash getSequencesImpl()
returns sequence definitions
*hash getReferenceDataHash()
returns a hash of "normal reference data", describing data that must appear in the target table...
*hash getIndexOptionsImpl()
returns index options
*hash getColumnOptions()
returns column options
bool checkDowngrade(string current_version)
this method is called if the current schema version is greater than the target version; returns True ...
hash getVersionWhere()
returns the where clause hash defining the row where the schema version string is located by calling ...
hash callback_opts
callback options plus all options
Definition: Schema.qm.dox.h:358
hash< GenericColumnInfo > c_int(bool notnull=False, *string comment)
returns a column hash for an INT column
int align(bool force=False, int verbose=0)
executes a schema alignment action on the database with the current schema template ...
*hash getFunctions()
returns function definitions
hash< GenericColumnInfo > c_blob(bool notnull=False, *string comment)
returns a column hash for a BLOB column
string getVersionTable()
returns the name of the table holding the schema version string by calling getVersionTableImpl() ...
*hash index_options
index options, as provided by getIndexOptions()
Definition: Schema.qm.dox.h:339
*softstring getSchemaVersion()
returns the existing schema version or NOTHING if not present
*hash getReferenceDataHashImpl()
returns a hash of "normal reference data", describing data that must appear in the target table...
sqlCallback(string str)
this is the SQL callback method for schema operations
string version_column
the name of the column containing the version string
Definition: Schema.qm.dox.h:752
bool checkUpgrade(string current_version)
this method is called if the current schema version is less than the target version; returns True if ...
*hash getGenericOptionsImpl()
returns schema creation options
*hash getColumnOptionsImpl()
returns column options
drop(bool force=False, int verbose=0)
executes a schema drop operation in the database
*string data_ts
explicit data tablespace name
Definition: Schema.qm.dox.h:364
*hash getMaterializedViews()
returns materialized view definitions
hash< GenericColumnInfo > c_timestamp(bool notnull=False, *string comment)
returns a column hash for a TIMESTAMP column
int getUpsertStrategy(bool first_time_install)
this method is called to return the upsert strategy before schema reference data management ...
hash< GenericColumnInfo > c_number(bool notnull=False, *string comment)
returns a column hash for a NUMBER or NUMERIC column
const C_NULL
Helper constant for column hash functions with "NULL" constraint for better readability.
Definition: Schema.qm.dox.h:92
doTable(AbstractTable table, list rows, int upsert_strategy, bool delete_others, int verbose, reference< hash > sh)
this method is called to perform schema reference data managment on the given table with the given da...
SqlUtil::AbstractDatabase getDatabase()
returns the AbstractDatabase object used for the schema
constructor(AbstractSchema sc, int v=0)
creates the callback object from the given arguments
log(string fmt)
outputs a log message
bool checkDropSchema(bool force)
this method returns True if the schema can be dropped
*hash getCreateOnlyReferenceData()
returns a hash of "create-only reference data", describing data that is written to the table when the...
postDataActions(bool first_time_install)
this method is called after schema reference data has been managed
bool checkDropSchema(bool force)
this method returns True if the schema can be dropped
this class extends Schema::AbstractSchema by providing version logic based on a schema version string...
Definition: Schema.qm.dox.h:745
bool checkExistence()
returns True if the method can detect that DB objects defined in the schema exist in the database ...
constructor(Qore::SQL::AbstractDatasource ds, *string dts, *string its, *hash opts)
creates the object based on the arguments giving the location of the schema
*hash creation_options
creation options, as provided by getCreationOptions()
Definition: Schema.qm.dox.h:341
hash schema
the schema template, as assembled from method callbacks providing schema element definitions ...
Definition: Schema.qm.dox.h:336
this class provides callback support for schema operations
Definition: Schema.qm.dox.h:256
*hash getStrictReferenceDataHash()
returns a hash of "strict reference data", describing the only data that can appear in the target tab...
abstract hash getVersionWhereImpl()
returns the where clause hash defining the row where the schema version string is located ...
*hash getInsertOnlyReferenceData()
returns a hash of "create-only reference data", describing data that will only be inserted if missing...
*hash getCreationOptions()
returns schema creation options
static list getRows(*softlist l)
returns a list of hashes from a list of lists where the first list element in the top-level list is a...
string version_table
the name of the table containing the version string
Definition: Schema.qm.dox.h:750
*hash getTypes()
returns type definitions
string getName()
returns the name of the schema
SqlUtil::Database db
the Database object for the schema
Definition: Schema.qm.dox.h:353
bool checkUpdateSchema(bool force, reference< hash > initial_schema_info)
this method returns True if the schema can be updated
code info_callback
the info callback for schema operations; can be used for explicit logging
Definition: Schema.qm.dox.h:361
string version
the version of the schema
Definition: Schema.qm.dox.h:333
const C_NOT_NULL
Helper constant for column hash functions with "NOT NULL" constraint for better readability.
Definition: Schema.qm.dox.h:94
*hash all_options
combined creation and column options
Definition: Schema.qm.dox.h:345
abstract string getVersionImpl()
returns the version of the schema
string drv
the name of the database driver
Definition: Schema.qm.dox.h:350
*hash getCreateOnlyReferenceDataImpl()
returns a hash of "create-only reference data", describing data that is written to the table when the...
hash version_where
a where clause hash defining the row where the schema version string is located
Definition: Schema.qm.dox.h:754
hash< GenericColumnInfo > c_date(bool notnull=False, *string comment)
returns a column hash for a DATE column
logpf(string fmt)
outputs a log message prefixed with the schema name
*hash getTypesImpl()
returns type definitions
hash pure_callback_opts
just callback options
Definition: Schema.qm.dox.h:356
Qore::SQL::AbstractDatasource getDatasource()
returns the datasource used for the schema
abstract string getVersionTableImpl()
returns the name of the table holding the schema version string
bool checkFirstTimeInstall()
returns True if checkExistence() returns False
abstract string getNameImpl()
returns the name of the schema
*hash getPackagesImpl()
returns (Oracle) package definitions
*hash getPackages()
returns (Oracle) package definitions
bool checkUpdateSchema(bool force, reference< hash > initial_schema_info)
this method returns True if the schema can be updated
*string index_ts
explicit index tablespace name
Definition: Schema.qm.dox.h:367
nothing sqlForceCallback(string str)
this is the SQL callback method for forced schema operations
the AbstractSchema class is a base class to assist with automatic schema management ...
Definition: Schema.qm.dox.h:326
*hash getStrictReferenceDataHashImpl()
returns a hash of "strict reference data", describing the only data that can appear in the target tab...
static hash combineOptions(*hash h)
combines option hashes into a single target option hash
abstract string getVersionColumnImpl()
returns the name of the column holding the schema version string