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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Rotua Panjaitan
yii2
Commits
1cbfcb19
Commit
1cbfcb19
authored
Jan 15, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean up
parent
b22e3b9f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
9 deletions
+5
-9
Command.php
framework/db/Command.php
+0
-2
Connection.php
framework/db/Connection.php
+5
-6
Transaction.php
framework/db/Transaction.php
+0
-1
No files found.
framework/db/Command.php
View file @
1cbfcb19
...
...
@@ -9,8 +9,6 @@
namespace
yii\db
;
use
yii\db\Exception
;
/**
* Command represents a SQL statement to be executed against a database.
*
...
...
framework/db/Connection.php
View file @
1cbfcb19
...
...
@@ -9,7 +9,6 @@
namespace
yii\db
;
use
yii\db\Exception
;
use
yii\base\BadConfigException
;
/**
...
...
@@ -334,7 +333,7 @@ class Connection extends \yii\base\ApplicationComponent
try
{
\Yii
::
trace
(
'Opening DB connection: '
.
$this
->
dsn
,
__CLASS__
);
$this
->
pdo
=
$this
->
createPdoInstance
();
$this
->
initConnection
(
$this
->
pdo
);
$this
->
initConnection
();
}
catch
(
\PDOException
$e
)
{
\Yii
::
error
(
"Failed to open DB connection (
{
$this
->
dsn
}
): "
.
$e
->
getMessage
(),
__CLASS__
);
...
...
@@ -380,8 +379,9 @@ class Connection extends \yii\base\ApplicationComponent
/**
* Initializes the DB connection.
* This method is invoked right after the DB connection is established.
* The default implementation sets the database [[charset]] and executes SQLs specified
* in [[initSQLs]].
* The default implementation turns on `PDO::ATTR_EMULATE_PREPARES`
* if [[emulatePrepare]] is true, and sets the database [[charset]] if it is not empty.
* It then triggers an [[afterOpen]] event.
*/
protected
function
initConnection
()
{
...
...
@@ -408,8 +408,7 @@ class Connection extends \yii\base\ApplicationComponent
'connection'
=>
$this
,
'sql'
=>
$sql
,
));
$command
->
bindValues
(
$params
);
return
$command
;
return
$command
->
bindValues
(
$params
);
}
/**
...
...
framework/db/Transaction.php
View file @
1cbfcb19
...
...
@@ -9,7 +9,6 @@
namespace
yii\db
;
use
yii\db\Exception
;
use
yii\base\BadConfigException
;
/**
...
...
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