General database mover class
Copyright: | 2008 Andrei Bautu |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 122 lines (5 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
database_mover:: (7 methods):
__construct()
set_transaction_mode()
begin_database_export()
begin_table_export()
export_table_data()
finish_table_export()
finish_database_export()
Class: database_mover - X-Ref
__construct(moodle_database $mdb_source, moodle_database $mdb_target,$check_schema = true, progress_trace $feedback = null) X-Ref |
Object constructor. param: moodle_database $mdb_source Connection to the source database (a param: moodle_database $mdb_target Connection to the target database (a param: boolean $check_schema - whether or not to check that XML database param: progress_trace $feedback Progress tracing object |
set_transaction_mode($mode) X-Ref |
How to use transactions during the transfer. param: string $mode 'pertable', 'allinone' or 'none'. |
begin_database_export($version, $release, $timestamp, $description) X-Ref |
Callback function. Calls importer's begin_database_import callback method. return: void param: float $version the version of the system which generating the data param: string $release moodle release info param: string $timestamp the timestamp of the data (in ISO 8601) format. param: string $description a user description of the data. |
begin_table_export(xmldb_table $table) X-Ref |
Callback function. Calls importer's begin_table_import callback method. return: void param: xmldb_table $table - XMLDB object for the exported table |
export_table_data(xmldb_table $table, $data) X-Ref |
Callback function. Calls importer's import_table_data callback method. return: void param: xmldb_table $table - XMLDB object of the table from which data param: object $data - data object (fields and values from record) |
finish_table_export(xmldb_table $table) X-Ref |
Callback function. Calls importer's finish_table_import callback method. return: void param: xmldb_table $table - XMLDB object for the exported table |
finish_database_export() X-Ref |
Callback function. Calls importer's finish_database_import callback method. return: void |