Now all the XMLDBxxx->geSQL functions return an array of statements to be

executed (easily to handle them in the installation/upgrade process
individually. Also, it's possible to specify one statement end.
This commit is contained in:
stronk7
2006-08-17 19:20:45 +00:00
parent de16da7293
commit 9dcc6300a7
7 changed files with 77 additions and 38 deletions
+9 -2
View File
@@ -718,11 +718,18 @@ class XMLDBTable extends XMLDBObject {
* This function will return the SQL code needed to create the table for the specified DB and
* prefix. Just one simple wrapper over generators.
*/
function getCreateTableSQL ($dbtype, $prefix) {
function getCreateTableSQL ($dbtype, $prefix, $statement_end=true) {
$results = array();
$classname = 'XMLDB' . $dbtype;
$generator = new $classname();
$generator->setPrefix($prefix);
return $generator->getCreateTableSQL($this);
$results = $generator->getCreateTableSQL($this);
if ($statement_end) {
$results = $generator->getEndedStatements($results);
}
return $results;
}
}