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
f27a56a2
Commit
f27a56a2
authored
Dec 18, 2013
by
Benjamin Eberlei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'DBAL-543' into 2.4
parents
df00bd4b
1f94b7d6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
12 deletions
+25
-12
configuration.rst
docs/en/reference/configuration.rst
+2
-0
Driver.php
lib/Doctrine/DBAL/Driver/OCI8/Driver.php
+8
-5
Driver.php
lib/Doctrine/DBAL/Driver/PDOOracle/Driver.php
+15
-7
No files found.
docs/en/reference/configuration.rst
View file @
f27a56a2
...
@@ -135,6 +135,8 @@ pdo\_oci / oci8
...
@@ -135,6 +135,8 @@ pdo\_oci / oci8
- ``host`` (string): Hostname of the database to connect to.
- ``host`` (string): Hostname of the database to connect to.
- ``port`` (integer): Port of the database to connect to.
- ``port`` (integer): Port of the database to connect to.
- ``dbname`` (string): Name of the database/schema to connect to.
- ``dbname`` (string): Name of the database/schema to connect to.
- ``pooled`` (boolean): Whether to enable database resident
connection pooling.
- ``charset`` (string): The charset used when connecting to the
- ``charset`` (string): The charset used when connecting to the
database.
database.
...
...
lib/Doctrine/DBAL/Driver/OCI8/Driver.php
View file @
f27a56a2
...
@@ -64,15 +64,18 @@ class Driver implements \Doctrine\DBAL\Driver
...
@@ -64,15 +64,18 @@ class Driver implements \Doctrine\DBAL\Driver
$dsn
.=
'(PORT=1521)'
;
$dsn
.=
'(PORT=1521)'
;
}
}
$database
=
'SID='
.
$params
[
'dbname'
];
$pooled
=
''
;
if
(
isset
(
$params
[
'service'
])
&&
$params
[
'service'
]
==
true
)
{
if
(
isset
(
$params
[
'service'
])
&&
$params
[
'service'
]
==
true
)
{
$dsn
.=
'))(CONNECT_DATA=(SERVICE_NAME='
.
$params
[
'dbname'
]
.
'))'
;
$database
=
'SERVICE_NAME='
.
$params
[
'dbname'
];
}
else
{
$dsn
.=
'))(CONNECT_DATA=(SID='
.
$params
[
'dbname'
]
.
'))'
;
}
}
if
(
isset
(
$params
[
'pooled'
])
&&
$params
[
'pooled'
]
==
true
)
{
if
(
isset
(
$params
[
'pooled'
])
&&
$params
[
'pooled'
]
==
true
)
{
$
dsn
.
=
'(SERVER=POOLED)'
;
$
pooled
=
'(SERVER=POOLED)'
;
}
}
$dsn
.=
')'
;
$dsn
.=
'))(CONNECT_DATA=('
.
$database
.
')'
.
$pooled
.
'))'
;
}
else
{
}
else
{
$dsn
.=
$params
[
'dbname'
];
$dsn
.=
$params
[
'dbname'
];
}
}
...
...
lib/Doctrine/DBAL/Driver/PDOOracle/Driver.php
View file @
f27a56a2
...
@@ -53,9 +53,10 @@ class Driver implements \Doctrine\DBAL\Driver
...
@@ -53,9 +53,10 @@ class Driver implements \Doctrine\DBAL\Driver
*/
*/
private
function
_constructPdoDsn
(
array
$params
)
private
function
_constructPdoDsn
(
array
$params
)
{
{
$dsn
=
'oci:'
;
$dsn
=
'oci:dbname='
;
if
(
isset
(
$params
[
'host'
])
&&
$params
[
'host'
]
!=
''
)
{
if
(
isset
(
$params
[
'host'
])
&&
$params
[
'host'
]
!=
''
)
{
$dsn
.=
'
dbname=
(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)'
.
$dsn
.=
'(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)'
.
'(HOST='
.
$params
[
'host'
]
.
')'
;
'(HOST='
.
$params
[
'host'
]
.
')'
;
if
(
isset
(
$params
[
'port'
]))
{
if
(
isset
(
$params
[
'port'
]))
{
...
@@ -64,13 +65,20 @@ class Driver implements \Doctrine\DBAL\Driver
...
@@ -64,13 +65,20 @@ class Driver implements \Doctrine\DBAL\Driver
$dsn
.=
'(PORT=1521)'
;
$dsn
.=
'(PORT=1521)'
;
}
}
$database
=
'SID='
.
$params
[
'dbname'
];
$pooled
=
''
;
if
(
isset
(
$params
[
'service'
])
&&
$params
[
'service'
]
==
true
)
{
if
(
isset
(
$params
[
'service'
])
&&
$params
[
'service'
]
==
true
)
{
$dsn
.=
'))(CONNECT_DATA=(SERVICE_NAME='
.
$params
[
'dbname'
]
.
')))'
;
$database
=
'SERVICE_NAME='
.
$params
[
'dbname'
];
}
else
{
$dsn
.=
'))(CONNECT_DATA=(SID='
.
$params
[
'dbname'
]
.
')))'
;
}
}
if
(
isset
(
$params
[
'pooled'
])
&&
$params
[
'pooled'
]
==
true
)
{
$pooled
=
'(SERVER=POOLED)'
;
}
$dsn
.=
'))(CONNECT_DATA=('
.
$database
.
')'
.
$pooled
.
'))'
;
}
else
{
}
else
{
$dsn
.=
'dbname='
.
$params
[
'dbname'
];
$dsn
.=
$params
[
'dbname'
];
}
}
if
(
isset
(
$params
[
'charset'
]))
{
if
(
isset
(
$params
[
'charset'
]))
{
...
...
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