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
90395b5d
Commit
90395b5d
authored
May 22, 2013
by
resurtm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refinements to MSSQL driver classes.
parent
cdcb8e51
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
43 deletions
+22
-43
PDO.php
framework/yii/db/mssql/PDO.php
+14
-21
QueryBuilder.php
framework/yii/db/mssql/QueryBuilder.php
+1
-3
Schema.php
framework/yii/db/mssql/Schema.php
+0
-0
SqlsrvPDO.php
framework/yii/db/mssql/SqlsrvPDO.php
+7
-7
MssqlActiveRecordTest.php
tests/unit/framework/db/mssql/MssqlActiveRecordTest.php
+0
-12
No files found.
yii/db/mssql/PDO.php
→
framework/
yii/db/mssql/PDO.php
View file @
90395b5d
...
@@ -8,18 +8,17 @@
...
@@ -8,18 +8,17 @@
namespace
yii\db\mssql
;
namespace
yii\db\mssql
;
/**
/**
* This is an extension of
default PDO class for MSSQL and DBLIB drivers. It provides workaround for improperly
* This is an extension of
the default PDO class of MSSQL and DBLIB drivers.
*
implemented functionalities of the
drivers.
*
It provides workarounds for improperly implemented functionalities of the MSSQL and DBLIB
drivers.
*
*
* @author Timur Ruziev <
qiang.xue
@gmail.com>
* @author Timur Ruziev <
resurtm
@gmail.com>
* @since 2.0
* @since 2.0
*/
*/
class
PDO
extends
\PDO
class
PDO
extends
\PDO
{
{
/**
/**
* Returns last inserted ID value.
* Returns value of the last inserted ID.
*
* @param string|null $sequence the sequence name. Defaults to null.
* @param string|null sequence the sequence name. Defaults to null.
* @return integer last inserted ID value.
* @return integer last inserted ID value.
*/
*/
public
function
lastInsertId
(
$sequence
=
null
)
public
function
lastInsertId
(
$sequence
=
null
)
...
@@ -28,11 +27,9 @@ class PDO extends \PDO
...
@@ -28,11 +27,9 @@ class PDO extends \PDO
}
}
/**
/**
* Begin a transaction.
* Starts a transaction. It is necessary to override PDO's method as MSSQL PDO driver does not
*
* natively support transactions.
* Is is necessary to override PDO's method as MSSQL PDO drivers does not support transactions.
* @return boolean the result of a transaction start.
*
* @return boolean
*/
*/
public
function
beginTransaction
()
public
function
beginTransaction
()
{
{
...
@@ -41,11 +38,9 @@ class PDO extends \PDO
...
@@ -41,11 +38,9 @@ class PDO extends \PDO
}
}
/**
/**
* Commit a transaction.
* Commits a transaction. It is necessary to override PDO's method as MSSQL PDO driver does not
*
* natively support transactions.
* Is is necessary to override PDO's method as MSSQL PDO drivers does not support transactions.
* @return boolean the result of a transaction commit.
*
* @return boolean
*/
*/
public
function
commit
()
public
function
commit
()
{
{
...
@@ -54,11 +49,9 @@ class PDO extends \PDO
...
@@ -54,11 +49,9 @@ class PDO extends \PDO
}
}
/**
/**
* Rollback a transaction.
* Rollbacks a transaction. It is necessary to override PDO's method as MSSQL PDO driver does not
*
* natively support transactions.
* Is is necessary to override PDO's method as MSSQL PDO drivers does not support transaction.
* @return boolean the result of a transaction rollback.
*
* @return boolean
*/
*/
public
function
rollBack
()
public
function
rollBack
()
{
{
...
...
yii/db/mssql/QueryBuilder.php
→
framework/
yii/db/mssql/QueryBuilder.php
View file @
90395b5d
...
@@ -8,10 +8,8 @@
...
@@ -8,10 +8,8 @@
namespace
yii\db\mssql
;
namespace
yii\db\mssql
;
/**
/**
* QueryBuilder is the query builder for MS SQL
database
(version 2008 and above).
* QueryBuilder is the query builder for MS SQL
Server databases
(version 2008 and above).
*
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @author Christophe Boulain <Christophe.Boulain@gmail.com>
* @author Timur Ruziev <resurtm@gmail.com>
* @author Timur Ruziev <resurtm@gmail.com>
* @since 2.0
* @since 2.0
*/
*/
...
...
yii/db/mssql/Schema.php
→
framework/
yii/db/mssql/Schema.php
View file @
90395b5d
This diff is collapsed.
Click to expand it.
yii/db/mssql/SqlsrvPDO.php
→
framework/
yii/db/mssql/SqlsrvPDO.php
View file @
90395b5d
...
@@ -8,8 +8,8 @@
...
@@ -8,8 +8,8 @@
namespace
yii\db\mssql
;
namespace
yii\db\mssql
;
/**
/**
* This is an extension of
default PDO class for MSSQL SQLSRV driver. It provides workaround for improperly
* This is an extension of
the default PDO class of SQLSRV driver.
*
implemented functionalities of the PDO
SQLSRV driver.
*
It provides workarounds for improperly implemented functionalities of the
SQLSRV driver.
*
*
* @author Timur Ruziev <resurtm@gmail.com>
* @author Timur Ruziev <resurtm@gmail.com>
* @since 2.0
* @since 2.0
...
@@ -17,12 +17,12 @@ namespace yii\db\mssql;
...
@@ -17,12 +17,12 @@ namespace yii\db\mssql;
class
SqlsrvPDO
extends
\PDO
class
SqlsrvPDO
extends
\PDO
{
{
/**
/**
* Returns last inserted ID value.
* Returns value of the last inserted ID.
*
* SQLSRV driver supports PDO::lastInsertId() with one peculiarity: when $sequence value is null
* or empty string it returns empty string. But when parameter is not specified it's working
* as expected and returns actual last inserted ID (like the other PDO drivers).
*
*
* SQLSRV driver implements [[PDO::lastInsertId()]] method but with a single peculiarity:
* when `$sequence` value is a null or an empty string it returns an empty string.
* But when parameter is not specified it works as expected and returns actual
* last inserted ID (like the other PDO drivers).
* @param string|null $sequence the sequence name. Defaults to null.
* @param string|null $sequence the sequence name. Defaults to null.
* @return integer last inserted ID value.
* @return integer last inserted ID value.
*/
*/
...
...
tests/unit/framework/db/mssql/MssqlActiveRecordTest.php
deleted
100644 → 0
View file @
cdcb8e51
<?php
namespace
yiiunit\framework\db\mssql
;
class
MssqlActiveRecordTest
extends
\yiiunit\framework\db\ActiveRecordTest
{
public
function
setUp
()
{
$this
->
driverName
=
'sqlsrv'
;
parent
::
setUp
();
}
}
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