Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
190a7afb
Unverified
Commit
190a7afb
authored
Jul 22, 2020
by
Sergei Morozov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add IdentityColumnsNotSupported exception
parent
92c6ec99
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
2 deletions
+22
-2
IdentityColumnsNotSupported.php
src/Driver/OCI8/Exception/IdentityColumnsNotSupported.php
+20
-0
OCI8Connection.php
src/Driver/OCI8/OCI8Connection.php
+2
-2
No files found.
src/Driver/OCI8/Exception/IdentityColumnsNotSupported.php
0 → 100644
View file @
190a7afb
<?php
declare
(
strict_types
=
1
);
namespace
Doctrine\DBAL\Driver\OCI8\Exception
;
use
Doctrine\DBAL\Driver\OCI8\OCI8Exception
;
/**
* @internal
*
* @psalm-immutable
*/
final
class
IdentityColumnsNotSupported
extends
OCI8Exception
{
public
static
function
new
()
:
self
{
return
new
self
(
'The driver does not support identity columns.'
);
}
}
src/Driver/OCI8/OCI8Connection.php
View file @
190a7afb
...
@@ -4,7 +4,7 @@ declare(strict_types=1);
...
@@ -4,7 +4,7 @@ declare(strict_types=1);
namespace
Doctrine\DBAL\Driver\OCI8
;
namespace
Doctrine\DBAL\Driver\OCI8
;
use
Doctrine\DBAL\Driver\
Connection
;
use
Doctrine\DBAL\Driver\
OCI8\Exception\IdentityColumnsNotSupported
;
use
Doctrine\DBAL\Driver\Result
as
ResultInterface
;
use
Doctrine\DBAL\Driver\Result
as
ResultInterface
;
use
Doctrine\DBAL\Driver\ServerInfoAwareConnection
;
use
Doctrine\DBAL\Driver\ServerInfoAwareConnection
;
use
Doctrine\DBAL\Driver\Statement
as
DriverStatement
;
use
Doctrine\DBAL\Driver\Statement
as
DriverStatement
;
...
@@ -111,7 +111,7 @@ final class OCI8Connection implements Connection, ServerInfoAwareConnection
...
@@ -111,7 +111,7 @@ final class OCI8Connection implements Connection, ServerInfoAwareConnection
public
function
lastInsertId
(
?
string
$name
=
null
)
:
string
public
function
lastInsertId
(
?
string
$name
=
null
)
:
string
{
{
if
(
$name
===
null
)
{
if
(
$name
===
null
)
{
throw
new
OCI8Exception
(
'The driver does not support identity columns.'
);
throw
IdentityColumnsNotSupported
::
new
(
);
}
}
$result
=
$this
->
query
(
'SELECT '
.
$name
.
'.CURRVAL FROM DUAL'
)
->
fetchOne
();
$result
=
$this
->
query
(
'SELECT '
.
$name
.
'.CURRVAL FROM DUAL'
)
->
fetchOne
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment