mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 09:42:09 -04:00
I have no idea what I'm doing
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
cb8c68e25e
commit
61f3289a96
2 changed files with 3 additions and 3 deletions
|
|
@ -28,8 +28,8 @@ class AdapterOCI8 extends Adapter {
|
|||
$statement = str_ireplace('UNIX_TIMESTAMP()', self::UNIX_TIMESTAMP_REPLACEMENT, $statement);
|
||||
|
||||
$statement = preg_replace(
|
||||
'/^INSERT INTO (.*) VALUES (.*) INTO (.*)$/',
|
||||
'INSERT INTO ${1} VALUES ${2} RETURNING pk_id INTO ${3}',
|
||||
'/^INSERT INTO (".*")( ?\(.*) ?VALUES( ?\(.*)$/',
|
||||
'DECLARE vRowid ROWID; BEGIN INSERT INTO ${1} VALUES ${2} RETURNING ROWID INTO vRowid dbms_output.put_line(vRowid); END',
|
||||
$statement
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ class OracleConnection extends Connection {
|
|||
$returned = parent::executeStatement($sql, $params, $types);
|
||||
|
||||
var_dump($sql);
|
||||
if (preg_match('/^INSERT INTO (.*) VALUES (.*) INTO (.*)$/', $sql, $matches)) {
|
||||
if (preg_match('/^DECLARE vRowid ROWID; BEGIN INSERT INTO (.*) VALUES (.*) INTO (.*)$/', $sql, $matches)) {
|
||||
var_dump($returned);
|
||||
$this->lastInsertId[$matches[1]] = $returned;
|
||||
var_dump($this->lastInsertId);
|
||||
|
|
|
|||
Loading…
Reference in a new issue