Use Doctrines Oracle sequence suffix
This commit is contained in:
parent
159efa8bd4
commit
9fa4b78ba4
1 changed files with 10 additions and 2 deletions
12
lib/db.php
12
lib/db.php
|
@ -322,12 +322,20 @@ class OC_DB {
|
|||
$row = $result->fetchRow();
|
||||
self::raiseExceptionOnError($row, 'fetching row for insertid failed');
|
||||
return $row['id'];
|
||||
} else if( $type === 'mssql' || $type === 'oci') {
|
||||
} else if( $type === 'mssql') {
|
||||
if($table !== null) {
|
||||
$prefix = OC_Config::getValue( "dbtableprefix", "oc_" );
|
||||
$table = str_replace( '*PREFIX*', $prefix, $table );
|
||||
}
|
||||
self::$connection->lastInsertId($table);
|
||||
return self::$connection->lastInsertId($table);
|
||||
}
|
||||
if( $type === 'oci' ) {
|
||||
if($table !== null) {
|
||||
$prefix = OC_Config::getValue( "dbtableprefix", "oc_" );
|
||||
$suffix = '_SEQ';
|
||||
$table = '"'.str_replace( '*PREFIX*', $prefix, $table ).$suffix.'"';
|
||||
}
|
||||
return self::$connection->lastInsertId($table);
|
||||
} else {
|
||||
if($table !== null) {
|
||||
$prefix = OC_Config::getValue( "dbtableprefix", "oc_" );
|
||||
|
|
Loading…
Reference in a new issue