Initial RenameTable caller to generators. Not ended by I needed it in CVS now.

This commit is contained in:
stronk7 2006-09-06 23:05:12 +00:00
parent d05babe913
commit 05a43ba36c

View File

@ -782,6 +782,24 @@ class XMLDBTable extends XMLDBObject {
}
return $results;
}
/**
* 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 getRenameTableSQL ($dbtype, $prefix, $newname, $statement_end=true) {
$results = array();
$classname = 'XMLDB' . $dbtype;
$generator = new $classname();
$generator->setPrefix($prefix);
$results = $generator->getRenameTableSQL($this, $newname);
if ($statement_end) {
$results = $generator->getEndedStatements($results);
}
return $results;
}
}
?>