diff options
author | Bart Visscher <bartv@thisnet.nl> | 2013-06-21 15:41:10 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2013-06-24 22:38:19 +0200 |
commit | 9fa4b78ba46a7763f3274b8fa4932cbc16e2ca7f (patch) | |
tree | 7b682c9e2d94cd65bec475ded8bb09179aa7c6bb | |
parent | 159efa8bd4a5437bd2b028d40910132fd22702f1 (diff) | |
download | nextcloud-server-9fa4b78ba46a7763f3274b8fa4932cbc16e2ca7f.tar.gz nextcloud-server-9fa4b78ba46a7763f3274b8fa4932cbc16e2ca7f.zip |
Use Doctrines Oracle sequence suffix
-rw-r--r-- | lib/db.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/db.php b/lib/db.php index cf352fe9fb0..8b2f36aac62 100644 --- a/lib/db.php +++ b/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_" ); |