Adding getSequenceFromDB() for Oracle in order to detect the correct

sequence name in the insert_record() function.
This commit is contained in:
stronk7
2006-10-08 09:36:33 +00:00
parent 1c55ce748d
commit abbd460ff9
3 changed files with 48 additions and 0 deletions
+13
View File
@@ -1035,6 +1035,19 @@ class XMLDBTable extends XMLDBObject {
}
return $results;
}
/**
* This function will return the name of the sequence created for the pk of the table specified
* Just one simple wrapper over generators. Returns false if not found
* Note that not all DB use sequences (only Oracle and PostgreSQL)
*/
function getSequenceFromDB($dbtype, $prefix) {
$classname = 'XMLDB' . $dbtype;
$generator = new $classname();
$generator->setPrefix($prefix);
return $generator->getSequenceFromDB($this);
}
}
?>