Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
PSDI Army
yii2
Commits
e9ad7d6e
Commit
e9ad7d6e
authored
May 06, 2013
by
resurtm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rollback word consistencty over entire codebase (ref. #139).
parent
d2f35f20
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
Connection.php
framework/db/Connection.php
+1
-1
Migration.php
framework/db/Migration.php
+4
-4
Transaction.php
framework/db/Transaction.php
+3
-3
No files found.
framework/db/Connection.php
View file @
e9ad7d6e
...
@@ -66,7 +66,7 @@ use yii\caching\Cache;
...
@@ -66,7 +66,7 @@ use yii\caching\Cache;
* // ... executing other SQL statements ...
* // ... executing other SQL statements ...
* $transaction->commit();
* $transaction->commit();
* } catch(Exception $e) {
* } catch(Exception $e) {
* $transaction->roll
B
ack();
* $transaction->roll
b
ack();
* }
* }
* ~~~
* ~~~
*
*
...
...
framework/db/Migration.php
View file @
e9ad7d6e
...
@@ -64,14 +64,14 @@ class Migration extends \yii\base\Component
...
@@ -64,14 +64,14 @@ class Migration extends \yii\base\Component
$transaction
=
$this
->
db
->
beginTransaction
();
$transaction
=
$this
->
db
->
beginTransaction
();
try
{
try
{
if
(
$this
->
safeUp
()
===
false
)
{
if
(
$this
->
safeUp
()
===
false
)
{
$transaction
->
roll
B
ack
();
$transaction
->
roll
b
ack
();
return
false
;
return
false
;
}
}
$transaction
->
commit
();
$transaction
->
commit
();
}
catch
(
\Exception
$e
)
{
}
catch
(
\Exception
$e
)
{
echo
"Exception: "
.
$e
->
getMessage
()
.
' ('
.
$e
->
getFile
()
.
':'
.
$e
->
getLine
()
.
")
\n
"
;
echo
"Exception: "
.
$e
->
getMessage
()
.
' ('
.
$e
->
getFile
()
.
':'
.
$e
->
getLine
()
.
")
\n
"
;
echo
$e
->
getTraceAsString
()
.
"
\n
"
;
echo
$e
->
getTraceAsString
()
.
"
\n
"
;
$transaction
->
roll
B
ack
();
$transaction
->
roll
b
ack
();
return
false
;
return
false
;
}
}
return
null
;
return
null
;
...
@@ -89,14 +89,14 @@ class Migration extends \yii\base\Component
...
@@ -89,14 +89,14 @@ class Migration extends \yii\base\Component
$transaction
=
$this
->
db
->
beginTransaction
();
$transaction
=
$this
->
db
->
beginTransaction
();
try
{
try
{
if
(
$this
->
safeDown
()
===
false
)
{
if
(
$this
->
safeDown
()
===
false
)
{
$transaction
->
roll
B
ack
();
$transaction
->
roll
b
ack
();
return
false
;
return
false
;
}
}
$transaction
->
commit
();
$transaction
->
commit
();
}
catch
(
\Exception
$e
)
{
}
catch
(
\Exception
$e
)
{
echo
"Exception: "
.
$e
->
getMessage
()
.
' ('
.
$e
->
getFile
()
.
':'
.
$e
->
getLine
()
.
")
\n
"
;
echo
"Exception: "
.
$e
->
getMessage
()
.
' ('
.
$e
->
getFile
()
.
':'
.
$e
->
getLine
()
.
")
\n
"
;
echo
$e
->
getTraceAsString
()
.
"
\n
"
;
echo
$e
->
getTraceAsString
()
.
"
\n
"
;
$transaction
->
roll
B
ack
();
$transaction
->
roll
b
ack
();
return
false
;
return
false
;
}
}
return
null
;
return
null
;
...
...
framework/db/Transaction.php
View file @
e9ad7d6e
...
@@ -25,7 +25,7 @@ use yii\base\InvalidConfigException;
...
@@ -25,7 +25,7 @@ use yii\base\InvalidConfigException;
* //.... other SQL executions
* //.... other SQL executions
* $transaction->commit();
* $transaction->commit();
* } catch(Exception $e) {
* } catch(Exception $e) {
* $transaction->roll
B
ack();
* $transaction->roll
b
ack();
* }
* }
* ~~~
* ~~~
*
*
...
@@ -42,14 +42,14 @@ class Transaction extends \yii\base\Object
...
@@ -42,14 +42,14 @@ class Transaction extends \yii\base\Object
public
$db
;
public
$db
;
/**
/**
* @var boolean whether this transaction is active. Only an active transaction
* @var boolean whether this transaction is active. Only an active transaction
* can [[commit()]] or [[roll
B
ack()]]. This property is set true when the transaction is started.
* can [[commit()]] or [[roll
b
ack()]]. This property is set true when the transaction is started.
*/
*/
private
$_active
=
false
;
private
$_active
=
false
;
/**
/**
* Returns a value indicating whether this transaction is active.
* Returns a value indicating whether this transaction is active.
* @return boolean whether this transaction is active. Only an active transaction
* @return boolean whether this transaction is active. Only an active transaction
* can [[commit()]] or [[roll
B
ack()]].
* can [[commit()]] or [[roll
b
ack()]].
*/
*/
public
function
getIsActive
()
public
function
getIsActive
()
{
{
...
...
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