Adding support to rename_key()

Note that this is one EXPERIMENTAL function and shouldn't be used
by you in production code EVER!
This commit is contained in:
stronk7
2006-09-30 19:44:16 +00:00
parent e77fd021e6
commit 57770f7a50
+19
View File
@@ -963,6 +963,24 @@ class XMLDBTable extends XMLDBObject {
return $results;
}
/**
* This function will return the SQL code needed to rename one key from the table for the specified DB and
* prefix. Just one simple wrapper over generators.
*/
function getRenameKeySQL ($dbtype, $prefix, $xmldb_key, $statement_end=true) {
$results = array();
$classname = 'XMLDB' . $dbtype;
$generator = new $classname();
$generator->setPrefix($prefix);
$results = $generator->getRenameKeySQL($this, $xmldb_key);
if ($statement_end) {
$results = $generator->getEndedStatements($results);
}
return $results;
}
/**
* This function will return the SQL code needed to add one index to the table for the specified DB and
* prefix. Just one simple wrapper over generators.
@@ -1002,6 +1020,7 @@ class XMLDBTable extends XMLDBObject {
/**
* This function will return the SQL code needed to rename one index from the table for the specified DB and
* prefix. Just one simple wrapper over generators.
* Experimental. Shouldn't be used at all!
*/
function getRenameIndexSQL ($dbtype, $prefix, $xmldb_index, $statement_end=true) {