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
23d2950c
Commit
23d2950c
authored
Dec 03, 2011
by
Benjamin Eberlei
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #73 from stof/statement_interface_change
Statement interface change
parents
4a62347d
d699a52e
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
141 deletions
+59
-141
DB2Connection.php
lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php
+11
-11
DB2Statement.php
lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php
+48
-130
No files found.
lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php
View file @
23d2950c
...
...
@@ -39,7 +39,7 @@ class DB2Connection implements \Doctrine\DBAL\Driver\Connection
}
}
function
prepare
(
$sql
)
public
function
prepare
(
$sql
)
{
$stmt
=
@
db2_prepare
(
$this
->
_conn
,
$sql
);
if
(
!
$stmt
)
{
...
...
@@ -47,8 +47,8 @@ class DB2Connection implements \Doctrine\DBAL\Driver\Connection
}
return
new
DB2Statement
(
$stmt
);
}
function
query
()
public
function
query
()
{
$args
=
func_get_args
();
$sql
=
$args
[
0
];
...
...
@@ -57,7 +57,7 @@ class DB2Connection implements \Doctrine\DBAL\Driver\Connection
return
$stmt
;
}
function
quote
(
$input
,
$type
=
\PDO
::
PARAM_STR
)
public
function
quote
(
$input
,
$type
=
\PDO
::
PARAM_STR
)
{
$input
=
db2_escape_string
(
$input
);
if
(
$type
==
\PDO
::
PARAM_INT
)
{
...
...
@@ -67,24 +67,24 @@ class DB2Connection implements \Doctrine\DBAL\Driver\Connection
}
}
function
exec
(
$statement
)
public
function
exec
(
$statement
)
{
$stmt
=
$this
->
prepare
(
$statement
);
$stmt
->
execute
();
return
$stmt
->
rowCount
();
}
function
lastInsertId
(
$name
=
null
)
public
function
lastInsertId
(
$name
=
null
)
{
return
db2_last_insert_id
(
$this
->
_conn
);
}
function
beginTransaction
()
public
function
beginTransaction
()
{
db2_autocommit
(
$this
->
_conn
,
DB2_AUTOCOMMIT_OFF
);
}
function
commit
()
public
function
commit
()
{
if
(
!
db2_commit
(
$this
->
_conn
))
{
throw
new
DB2Exception
(
db2_conn_errormsg
(
$this
->
_conn
));
...
...
@@ -92,7 +92,7 @@ class DB2Connection implements \Doctrine\DBAL\Driver\Connection
db2_autocommit
(
$this
->
_conn
,
DB2_AUTOCOMMIT_ON
);
}
function
rollBack
()
public
function
rollBack
()
{
if
(
!
db2_rollback
(
$this
->
_conn
))
{
throw
new
DB2Exception
(
db2_conn_errormsg
(
$this
->
_conn
));
...
...
@@ -100,12 +100,12 @@ class DB2Connection implements \Doctrine\DBAL\Driver\Connection
db2_autocommit
(
$this
->
_conn
,
DB2_AUTOCOMMIT_ON
);
}
function
errorCode
()
public
function
errorCode
()
{
return
db2_conn_error
(
$this
->
_conn
);
}
function
errorInfo
()
public
function
errorInfo
()
{
return
array
(
0
=>
db2_conn_errormsg
(
$this
->
_conn
),
...
...
lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php
View file @
23d2950c
This diff is collapsed.
Click to expand it.
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