Adding getSequenceFromDB() for Oracle in order to detect the correct
sequence name in the insert_record() function.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user