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
45d41f1c
Commit
45d41f1c
authored
Mar 20, 2008
by
romanb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merged fix for #873 from 0.10
parent
223daae2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
3 deletions
+51
-3
Transaction.php
lib/Doctrine/Transaction.php
+27
-3
Mssql.php
lib/Doctrine/Transaction/Mssql.php
+24
-0
No files found.
lib/Doctrine/Transaction.php
View file @
45d41f1c
...
...
@@ -222,7 +222,7 @@ class Doctrine_Transaction extends Doctrine_Connection_Module
if
(
!
$event
->
skipOperation
)
{
try
{
$this
->
conn
->
getDbh
()
->
b
eginTransaction
();
$this
->
_doB
eginTransaction
();
}
catch
(
Exception
$e
)
{
throw
new
Doctrine_Transaction_Exception
(
$e
->
getMessage
());
}
...
...
@@ -292,7 +292,7 @@ class Doctrine_Transaction extends Doctrine_Connection_Module
$listener
->
preTransactionCommit
(
$event
);
if
(
!
$event
->
skipOperation
)
{
$this
->
conn
->
getDbh
()
->
c
ommit
();
$this
->
_doC
ommit
();
}
$listener
->
postTransactionCommit
(
$event
);
}
...
...
@@ -355,7 +355,7 @@ class Doctrine_Transaction extends Doctrine_Connection_Module
$this
->
_nestingLevel
=
0
;
$this
->
_internalNestingLevel
=
0
;
try
{
$this
->
conn
->
getDbh
()
->
r
ollback
();
$this
->
_doR
ollback
();
}
catch
(
Exception
$e
)
{
throw
new
Doctrine_Transaction_Exception
(
$e
->
getMessage
());
}
...
...
@@ -401,6 +401,30 @@ class Doctrine_Transaction extends Doctrine_Connection_Module
{
throw
new
Doctrine_Transaction_Exception
(
'Savepoints not supported by this driver.'
);
}
/**
* Performs the rollback.
*/
protected
function
_doRollback
()
{
$this
->
conn
->
getDbh
()
->
rollback
();
}
/**
* Performs the commit.
*/
protected
function
_doCommit
()
{
$this
->
conn
->
getDbh
()
->
commit
();
}
/**
* Begins a database transaction.
*/
protected
function
_doBeginTransaction
()
{
$this
->
conn
->
getDbh
()
->
beginTransaction
();
}
/**
* removeSavePoints
...
...
lib/Doctrine/Transaction/Mssql.php
View file @
45d41f1c
...
...
@@ -65,4 +65,28 @@ class Doctrine_Transaction_Mssql extends Doctrine_Transaction
$this
->
conn
->
execute
(
$query
);
}
/**
* Performs the rollback.
*/
protected
function
_doRollback
()
{
$this
->
conn
->
getDbh
()
->
exec
(
'ROLLBACK TRANSACTION'
);
}
/**
* Performs the commit.
*/
protected
function
_doCommit
()
{
$this
->
conn
->
getDbh
()
->
exec
(
'COMMIT TRANSACTION'
);
}
/**
* Begins a database transaction.
*/
protected
function
_doBeginTransaction
()
{
$this
->
conn
->
getDbh
()
->
exec
(
'BEGIN TRANSACTION'
);
}
}
\ No newline at end of file
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