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
f9f92d92
Commit
f9f92d92
authored
Apr 02, 2012
by
Adrien BRAULT
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PHPDoc blocks improvments + 1 CS Fix
parent
acef782d
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
70 additions
and
98 deletions
+70
-98
ResultCacheStatement.php
lib/Doctrine/DBAL/Cache/ResultCacheStatement.php
+0
-20
Connection.php
lib/Doctrine/DBAL/Connection.php
+21
-19
Driver.php
lib/Doctrine/DBAL/Driver.php
+1
-1
ResultStatement.php
lib/Doctrine/DBAL/Driver/ResultStatement.php
+0
-20
Statement.php
lib/Doctrine/DBAL/Driver/Statement.php
+1
-1
AbstractPlatform.php
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
+30
-18
CompositeExpression.php
lib/Doctrine/DBAL/Query/Expression/CompositeExpression.php
+1
-1
ExpressionBuilder.php
lib/Doctrine/DBAL/Query/Expression/ExpressionBuilder.php
+1
-1
QueryBuilder.php
lib/Doctrine/DBAL/Query/QueryBuilder.php
+5
-9
SQLParserUtils.php
lib/Doctrine/DBAL/SQLParserUtils.php
+1
-0
AbstractSchemaManager.php
lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php
+2
-2
Statement.php
lib/Doctrine/DBAL/Statement.php
+7
-6
No files found.
lib/Doctrine/DBAL/Cache/ResultCacheStatement.php
View file @
f9f92d92
...
@@ -151,23 +151,6 @@ class ResultCacheStatement implements \IteratorAggregate, ResultStatement
...
@@ -151,23 +151,6 @@ class ResultCacheStatement implements \IteratorAggregate, ResultStatement
* This value must be one of the Query::HYDRATE_* constants,
* This value must be one of the Query::HYDRATE_* constants,
* defaulting to Query::HYDRATE_BOTH
* defaulting to Query::HYDRATE_BOTH
*
*
* @param integer $cursorOrientation For a PDOStatement object representing a scrollable cursor,
* this value determines which row will be returned to the caller.
* This value must be one of the Query::HYDRATE_ORI_* constants, defaulting to
* Query::HYDRATE_ORI_NEXT. To request a scrollable cursor for your
* PDOStatement object,
* you must set the PDO::ATTR_CURSOR attribute to Doctrine::CURSOR_SCROLL when you
* prepare the SQL statement with Doctrine_Adapter_Interface->prepare().
*
* @param integer $cursorOffset For a PDOStatement object representing a scrollable cursor for which the
* $cursorOrientation parameter is set to Query::HYDRATE_ORI_ABS, this value specifies
* the absolute number of the row in the result set that shall be fetched.
*
* For a PDOStatement object representing a scrollable cursor for
* which the $cursorOrientation parameter is set to Query::HYDRATE_ORI_REL, this value
* specifies the row to fetch relative to the cursor position before
* PDOStatement->fetch() was called.
*
* @return mixed
* @return mixed
*/
*/
public
function
fetch
(
$fetchStyle
=
PDO
::
FETCH_BOTH
)
public
function
fetch
(
$fetchStyle
=
PDO
::
FETCH_BOTH
)
...
@@ -201,9 +184,6 @@ class ResultCacheStatement implements \IteratorAggregate, ResultStatement
...
@@ -201,9 +184,6 @@ class ResultCacheStatement implements \IteratorAggregate, ResultStatement
* This value must be one of the Query::HYDRATE_* constants,
* This value must be one of the Query::HYDRATE_* constants,
* defaulting to Query::HYDRATE_BOTH
* defaulting to Query::HYDRATE_BOTH
*
*
* @param integer $columnIndex Returns the indicated 0-indexed column when the value of $fetchStyle is
* Query::HYDRATE_COLUMN. Defaults to 0.
*
* @return array
* @return array
*/
*/
public
function
fetchAll
(
$fetchStyle
=
PDO
::
FETCH_BOTH
)
public
function
fetchAll
(
$fetchStyle
=
PDO
::
FETCH_BOTH
)
...
...
lib/Doctrine/DBAL/Connection.php
View file @
f9f92d92
...
@@ -90,22 +90,22 @@ class Connection implements DriverConnection
...
@@ -90,22 +90,22 @@ class Connection implements DriverConnection
/**
/**
* The wrapped driver connection.
* The wrapped driver connection.
*
*
* @var Doctrine\DBAL\Driver\Connection
* @var
\
Doctrine\DBAL\Driver\Connection
*/
*/
protected
$_conn
;
protected
$_conn
;
/**
/**
* @var Doctrine\DBAL\Configuration
* @var
\
Doctrine\DBAL\Configuration
*/
*/
protected
$_config
;
protected
$_config
;
/**
/**
* @var Doctrine\Common\EventManager
* @var
\
Doctrine\Common\EventManager
*/
*/
protected
$_eventManager
;
protected
$_eventManager
;
/**
/**
* @var Doctrine\DBAL\Query\ExpressionBuilder
* @var
\
Doctrine\DBAL\Query\ExpressionBuilder
*/
*/
protected
$_expr
;
protected
$_expr
;
...
@@ -148,21 +148,21 @@ class Connection implements DriverConnection
...
@@ -148,21 +148,21 @@ class Connection implements DriverConnection
* The DatabasePlatform object that provides information about the
* The DatabasePlatform object that provides information about the
* database platform used by the connection.
* database platform used by the connection.
*
*
* @var Doctrine\DBAL\Platforms\AbstractPlatform
* @var
\
Doctrine\DBAL\Platforms\AbstractPlatform
*/
*/
protected
$_platform
;
protected
$_platform
;
/**
/**
* The schema manager.
* The schema manager.
*
*
* @var
Doctrine\DBAL\Schema\
SchemaManager
* @var
\Doctrine\DBAL\Schema\Abstract
SchemaManager
*/
*/
protected
$_schemaManager
;
protected
$_schemaManager
;
/**
/**
* The used DBAL driver.
* The used DBAL driver.
*
*
* @var Doctrine\DBAL\Driver
* @var
\
Doctrine\DBAL\Driver
*/
*/
protected
$_driver
;
protected
$_driver
;
...
@@ -322,7 +322,7 @@ class Connection implements DriverConnection
...
@@ -322,7 +322,7 @@ class Connection implements DriverConnection
/**
/**
* Gets the ExpressionBuilder for the connection.
* Gets the ExpressionBuilder for the connection.
*
*
* @return \Doctrine\DBAL\Query\ExpressionBuilder
* @return \Doctrine\DBAL\Query\Expression
\Expression
Builder
*/
*/
public
function
getExpressionBuilder
()
public
function
getExpressionBuilder
()
{
{
...
@@ -419,9 +419,9 @@ class Connection implements DriverConnection
...
@@ -419,9 +419,9 @@ class Connection implements DriverConnection
/**
/**
* Executes an SQL DELETE statement on a table.
* Executes an SQL DELETE statement on a table.
*
*
* @param string $table The name of the table on which to delete.
* @param string $table
Name
The name of the table on which to delete.
* @param array $identifier The deletion criteria. An associat
e
ve array containing column-value pairs.
* @param array $identifier The deletion criteria. An associat
i
ve array containing column-value pairs.
* @return int
eger
The number of affected rows.
* @return int The number of affected rows.
*/
*/
public
function
delete
(
$tableName
,
array
$identifier
)
public
function
delete
(
$tableName
,
array
$identifier
)
{
{
...
@@ -453,7 +453,8 @@ class Connection implements DriverConnection
...
@@ -453,7 +453,8 @@ class Connection implements DriverConnection
/**
/**
* Sets the transaction isolation level.
* Sets the transaction isolation level.
*
*
* @param integer $level The level to set.
* @param int $level The level to set.
* @return int
*/
*/
public
function
setTransactionIsolation
(
$level
)
public
function
setTransactionIsolation
(
$level
)
{
{
...
@@ -465,7 +466,7 @@ class Connection implements DriverConnection
...
@@ -465,7 +466,7 @@ class Connection implements DriverConnection
/**
/**
* Gets the currently active transaction isolation level.
* Gets the currently active transaction isolation level.
*
*
* @return int
eger
The current transaction isolation level.
* @return int The current transaction isolation level.
*/
*/
public
function
getTransactionIsolation
()
public
function
getTransactionIsolation
()
{
{
...
@@ -475,10 +476,11 @@ class Connection implements DriverConnection
...
@@ -475,10 +476,11 @@ class Connection implements DriverConnection
/**
/**
* Executes an SQL UPDATE statement on a table.
* Executes an SQL UPDATE statement on a table.
*
*
* @param string $table The name of the table to update.
* @param string $tableName The name of the table to update.
* @param array $data
* @param array $identifier The update criteria. An associative array containing column-value pairs.
* @param array $identifier The update criteria. An associative array containing column-value pairs.
* @param array $types Types of the merged $data and $identifier arrays in that order.
* @param array $types Types of the merged $data and $identifier arrays in that order.
* @return int
eger
The number of affected rows.
* @return int The number of affected rows.
*/
*/
public
function
update
(
$tableName
,
array
$data
,
array
$identifier
,
array
$types
=
array
())
public
function
update
(
$tableName
,
array
$data
,
array
$identifier
,
array
$types
=
array
())
{
{
...
@@ -500,7 +502,7 @@ class Connection implements DriverConnection
...
@@ -500,7 +502,7 @@ class Connection implements DriverConnection
/**
/**
* Inserts a table row with specified data.
* Inserts a table row with specified data.
*
*
* @param string $table The name of the table to insert data into.
* @param string $table
Name
The name of the table to insert data into.
* @param array $data An associative array containing column-value pairs.
* @param array $data An associative array containing column-value pairs.
* @param array $types Types of the inserted data.
* @param array $types Types of the inserted data.
* @return integer The number of affected rows.
* @return integer The number of affected rows.
...
@@ -863,7 +865,7 @@ class Connection implements DriverConnection
...
@@ -863,7 +865,7 @@ class Connection implements DriverConnection
/**
/**
* Set if nested transactions should use savepoints
* Set if nested transactions should use savepoints
*
*
* @param boolean
* @param boolean
$nestTransactionsWithSavepoints
* @return void
* @return void
*/
*/
public
function
setNestTransactionsWithSavepoints
(
$nestTransactionsWithSavepoints
)
public
function
setNestTransactionsWithSavepoints
(
$nestTransactionsWithSavepoints
)
...
@@ -1151,7 +1153,7 @@ class Connection implements DriverConnection
...
@@ -1151,7 +1153,7 @@ class Connection implements DriverConnection
* Binds a set of parameters, some or all of which are typed with a PDO binding type
* Binds a set of parameters, some or all of which are typed with a PDO binding type
* or DBAL mapping type, to a given statement.
* or DBAL mapping type, to a given statement.
*
*
* @param $stmt The statement to bind the values to.
* @param
string
$stmt The statement to bind the values to.
* @param array $params The map/list of named/positional parameters.
* @param array $params The map/list of named/positional parameters.
* @param array $types The parameter types (PDO binding types or DBAL mapping types).
* @param array $types The parameter types (PDO binding types or DBAL mapping types).
* @internal Duck-typing used on the $stmt parameter to support driver statements as well as
* @internal Duck-typing used on the $stmt parameter to support driver statements as well as
...
@@ -1213,7 +1215,7 @@ class Connection implements DriverConnection
...
@@ -1213,7 +1215,7 @@ class Connection implements DriverConnection
/**
/**
* Create a new instance of a SQL query builder.
* Create a new instance of a SQL query builder.
*
*
* @return Query\QueryBuilder
* @return
\Doctrine\DBAL\
Query\QueryBuilder
*/
*/
public
function
createQueryBuilder
()
public
function
createQueryBuilder
()
{
{
...
...
lib/Doctrine/DBAL/Driver.php
View file @
f9f92d92
...
@@ -51,7 +51,7 @@ interface Driver
...
@@ -51,7 +51,7 @@ interface Driver
* database schema of the platform this driver connects to.
* database schema of the platform this driver connects to.
*
*
* @param \Doctrine\DBAL\Connection $conn
* @param \Doctrine\DBAL\Connection $conn
* @return \Doctrine\DBAL\SchemaManager
* @return \Doctrine\DBAL\Schema
\AbstractSchema
Manager
*/
*/
public
function
getSchemaManager
(
Connection
$conn
);
public
function
getSchemaManager
(
Connection
$conn
);
...
...
lib/Doctrine/DBAL/Driver/ResultStatement.php
View file @
f9f92d92
...
@@ -62,23 +62,6 @@ interface ResultStatement extends \Traversable
...
@@ -62,23 +62,6 @@ interface ResultStatement extends \Traversable
* This value must be one of the Query::HYDRATE_* constants,
* This value must be one of the Query::HYDRATE_* constants,
* defaulting to Query::HYDRATE_BOTH
* defaulting to Query::HYDRATE_BOTH
*
*
* @param integer $cursorOrientation For a PDOStatement object representing a scrollable cursor,
* this value determines which row will be returned to the caller.
* This value must be one of the Query::HYDRATE_ORI_* constants, defaulting to
* Query::HYDRATE_ORI_NEXT. To request a scrollable cursor for your
* PDOStatement object,
* you must set the PDO::ATTR_CURSOR attribute to Doctrine::CURSOR_SCROLL when you
* prepare the SQL statement with Doctrine_Adapter_Interface->prepare().
*
* @param integer $cursorOffset For a PDOStatement object representing a scrollable cursor for which the
* $cursorOrientation parameter is set to Query::HYDRATE_ORI_ABS, this value specifies
* the absolute number of the row in the result set that shall be fetched.
*
* For a PDOStatement object representing a scrollable cursor for
* which the $cursorOrientation parameter is set to Query::HYDRATE_ORI_REL, this value
* specifies the row to fetch relative to the cursor position before
* PDOStatement->fetch() was called.
*
* @return mixed
* @return mixed
*/
*/
function
fetch
(
$fetchStyle
=
PDO
::
FETCH_BOTH
);
function
fetch
(
$fetchStyle
=
PDO
::
FETCH_BOTH
);
...
@@ -90,9 +73,6 @@ interface ResultStatement extends \Traversable
...
@@ -90,9 +73,6 @@ interface ResultStatement extends \Traversable
* This value must be one of the Query::HYDRATE_* constants,
* This value must be one of the Query::HYDRATE_* constants,
* defaulting to Query::HYDRATE_BOTH
* defaulting to Query::HYDRATE_BOTH
*
*
* @param integer $columnIndex Returns the indicated 0-indexed column when the value of $fetchStyle is
* Query::HYDRATE_COLUMN. Defaults to 0.
*
* @return array
* @return array
*/
*/
function
fetchAll
(
$fetchStyle
=
PDO
::
FETCH_BOTH
);
function
fetchAll
(
$fetchStyle
=
PDO
::
FETCH_BOTH
);
...
...
lib/Doctrine/DBAL/Driver/Statement.php
View file @
f9f92d92
...
@@ -61,7 +61,7 @@ interface Statement extends ResultStatement
...
@@ -61,7 +61,7 @@ interface Statement extends ResultStatement
* of stored procedures that return data as output parameters, and some also as input/output
* of stored procedures that return data as output parameters, and some also as input/output
* parameters that both send in data and are updated to receive it.
* parameters that both send in data and are updated to receive it.
*
*
* @param mixed $
param
Parameter identifier. For a prepared statement using named placeholders,
* @param mixed $
column
Parameter identifier. For a prepared statement using named placeholders,
* this will be a parameter name of the form :name. For a prepared statement
* this will be a parameter name of the form :name. For a prepared statement
* using question mark placeholders, this will be the 1-indexed position of the parameter
* using question mark placeholders, this will be the 1-indexed position of the parameter
*
*
...
...
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
View file @
f9f92d92
...
@@ -226,6 +226,8 @@ abstract class AbstractPlatform
...
@@ -226,6 +226,8 @@ abstract class AbstractPlatform
/**
/**
* Gets the SQL Snippet used to declare a BLOB column type.
* Gets the SQL Snippet used to declare a BLOB column type.
*
* @param array $field
*/
*/
abstract
public
function
getBlobTypeDeclarationSQL
(
array
$field
);
abstract
public
function
getBlobTypeDeclarationSQL
(
array
$field
);
...
@@ -269,11 +271,11 @@ abstract class AbstractPlatform
...
@@ -269,11 +271,11 @@ abstract class AbstractPlatform
}
}
$dbType
=
strtolower
(
$dbType
);
$dbType
=
strtolower
(
$dbType
);
if
(
isset
(
$this
->
doctrineTypeMapping
[
$dbType
]))
{
if
(
!
isset
(
$this
->
doctrineTypeMapping
[
$dbType
]))
{
return
$this
->
doctrineTypeMapping
[
$dbType
];
}
else
{
throw
new
\Doctrine\DBAL\DBALException
(
"Unknown database type "
.
$dbType
.
" requested, "
.
get_class
(
$this
)
.
" may not support it."
);
throw
new
\Doctrine\DBAL\DBALException
(
"Unknown database type "
.
$dbType
.
" requested, "
.
get_class
(
$this
)
.
" may not support it."
);
}
}
return
$this
->
doctrineTypeMapping
[
$dbType
];
}
}
/**
/**
...
@@ -306,7 +308,7 @@ abstract class AbstractPlatform
...
@@ -306,7 +308,7 @@ abstract class AbstractPlatform
* Is it necessary for the platform to add a parsable type comment to allow reverse engineering the given type?
* Is it necessary for the platform to add a parsable type comment to allow reverse engineering the given type?
*
*
* @param Type $doctrineType
* @param Type $doctrineType
* @return bool
* @return bool
ean
*/
*/
public
function
isCommentedDoctrineType
(
Type
$doctrineType
)
public
function
isCommentedDoctrineType
(
Type
$doctrineType
)
{
{
...
@@ -502,6 +504,7 @@ abstract class AbstractPlatform
...
@@ -502,6 +504,7 @@ abstract class AbstractPlatform
*
*
* Note: Not SQL92, but common functionality
* Note: Not SQL92, but common functionality
*
*
* @param string $column
* @return string
* @return string
*/
*/
public
function
getMd5Expression
(
$column
)
public
function
getMd5Expression
(
$column
)
...
@@ -512,8 +515,7 @@ abstract class AbstractPlatform
...
@@ -512,8 +515,7 @@ abstract class AbstractPlatform
/**
/**
* Returns the length of a text field.
* Returns the length of a text field.
*
*
* @param string $expression1
* @param string $column
* @param string $expression2
* @return string
* @return string
*/
*/
public
function
getLengthExpression
(
$column
)
public
function
getLengthExpression
(
$column
)
...
@@ -535,7 +537,8 @@ abstract class AbstractPlatform
...
@@ -535,7 +537,8 @@ abstract class AbstractPlatform
/**
/**
* Rounds a numeric field to the number of decimals specified.
* Rounds a numeric field to the number of decimals specified.
*
*
* @param string $expression1
* @param string $column
* @param int $decimals
* @return string
* @return string
*/
*/
public
function
getRoundExpression
(
$column
,
$decimals
=
0
)
public
function
getRoundExpression
(
$column
,
$decimals
=
0
)
...
@@ -633,9 +636,9 @@ abstract class AbstractPlatform
...
@@ -633,9 +636,9 @@ abstract class AbstractPlatform
/**
/**
* returns the position of the first occurrence of substring $substr in string $str
* returns the position of the first occurrence of substring $substr in string $str
*
*
* @param string $substr literal string to find
* @param string $str literal string
* @param string $str literal string
* @param int $pos position to start at, beginning of string by default
* @param string $substr literal string to find
* @param boolean $startPos position to start at, beginning of string by default
* @return integer
* @return integer
*/
*/
public
function
getLocateExpression
(
$str
,
$substr
,
$startPos
=
false
)
public
function
getLocateExpression
(
$str
,
$substr
,
$startPos
=
false
)
...
@@ -699,6 +702,7 @@ abstract class AbstractPlatform
...
@@ -699,6 +702,7 @@ abstract class AbstractPlatform
* ->where($e->eq('id', $e->not('null'));
* ->where($e->eq('id', $e->not('null'));
* </code>
* </code>
*
*
* @param string $expression
* @return string a logical expression
* @return string a logical expression
*/
*/
public
function
getNotExpression
(
$expression
)
public
function
getNotExpression
(
$expression
)
...
@@ -716,7 +720,7 @@ abstract class AbstractPlatform
...
@@ -716,7 +720,7 @@ abstract class AbstractPlatform
* These expressions will be matched against the first parameter.
* These expressions will be matched against the first parameter.
*
*
* @param string $column the value that should be matched against
* @param string $column the value that should be matched against
* @param string|array(string) values that will be matched against $column
* @param string|array(string)
$values
values that will be matched against $column
* @return string logical expression
* @return string logical expression
*/
*/
public
function
getInExpression
(
$column
,
$values
)
public
function
getInExpression
(
$column
,
$values
)
...
@@ -1209,7 +1213,7 @@ abstract class AbstractPlatform
...
@@ -1209,7 +1213,7 @@ abstract class AbstractPlatform
/**
/**
* Gets the SQL to create a constraint on a table on this platform.
* Gets the SQL to create a constraint on a table on this platform.
*
*
* @param Constraint $constraint
* @param
\Doctrine\DBAL\Schema\
Constraint $constraint
* @param string|Table $table
* @param string|Table $table
* @return string
* @return string
*/
*/
...
@@ -1313,7 +1317,7 @@ abstract class AbstractPlatform
...
@@ -1313,7 +1317,7 @@ abstract class AbstractPlatform
/**
/**
* Quotes a string so that it can be safely used as a table or column name,
* Quotes a string so that it can be safely used as a table or column name,
* even if it is a reserved word of the platform. This also detects identifier
* even if it is a reserved word of the platform. This also detects identifier
* chains sep
e
rated by dot and quotes them independently.
* chains sep
a
rated by dot and quotes them independently.
*
*
* NOTE: Just because you CAN use quoted identifiers doesn't mean
* NOTE: Just because you CAN use quoted identifiers doesn't mean
* you SHOULD use them. In general, they end up causing way more
* you SHOULD use them. In general, they end up causing way more
...
@@ -1333,7 +1337,7 @@ abstract class AbstractPlatform
...
@@ -1333,7 +1337,7 @@ abstract class AbstractPlatform
}
}
/**
/**
* Quote a single identifier (no dot chain sep
e
ration)
* Quote a single identifier (no dot chain sep
a
ration)
*
*
* @param string $str
* @param string $str
* @return string
* @return string
...
@@ -1380,6 +1384,7 @@ abstract class AbstractPlatform
...
@@ -1380,6 +1384,7 @@ abstract class AbstractPlatform
* @param Column $column
* @param Column $column
* @param TableDiff $diff
* @param TableDiff $diff
* @param array $columnSql
* @param array $columnSql
* @return boolean
*/
*/
protected
function
onSchemaAlterTableAddColumn
(
Column
$column
,
TableDiff
$diff
,
&
$columnSql
)
protected
function
onSchemaAlterTableAddColumn
(
Column
$column
,
TableDiff
$diff
,
&
$columnSql
)
{
{
...
@@ -1403,6 +1408,7 @@ abstract class AbstractPlatform
...
@@ -1403,6 +1408,7 @@ abstract class AbstractPlatform
* @param Column $column
* @param Column $column
* @param TableDiff $diff
* @param TableDiff $diff
* @param array $columnSql
* @param array $columnSql
* @return boolean
*/
*/
protected
function
onSchemaAlterTableRemoveColumn
(
Column
$column
,
TableDiff
$diff
,
&
$columnSql
)
protected
function
onSchemaAlterTableRemoveColumn
(
Column
$column
,
TableDiff
$diff
,
&
$columnSql
)
{
{
...
@@ -1426,6 +1432,7 @@ abstract class AbstractPlatform
...
@@ -1426,6 +1432,7 @@ abstract class AbstractPlatform
* @param ColumnDiff $columnDiff
* @param ColumnDiff $columnDiff
* @param TableDiff $diff
* @param TableDiff $diff
* @param array $columnSql
* @param array $columnSql
* @return boolean
*/
*/
protected
function
onSchemaAlterTableChangeColumn
(
ColumnDiff
$columnDiff
,
TableDiff
$diff
,
&
$columnSql
)
protected
function
onSchemaAlterTableChangeColumn
(
ColumnDiff
$columnDiff
,
TableDiff
$diff
,
&
$columnSql
)
{
{
...
@@ -1450,6 +1457,7 @@ abstract class AbstractPlatform
...
@@ -1450,6 +1457,7 @@ abstract class AbstractPlatform
* @param Column $column
* @param Column $column
* @param TableDiff $diff
* @param TableDiff $diff
* @param array $columnSql
* @param array $columnSql
* @return boolean
*/
*/
protected
function
onSchemaAlterTableRenameColumn
(
$oldColumnName
,
Column
$column
,
TableDiff
$diff
,
&
$columnSql
)
protected
function
onSchemaAlterTableRenameColumn
(
$oldColumnName
,
Column
$column
,
TableDiff
$diff
,
&
$columnSql
)
{
{
...
@@ -1470,7 +1478,8 @@ abstract class AbstractPlatform
...
@@ -1470,7 +1478,8 @@ abstract class AbstractPlatform
}
}
/**
/**
* @param TableDiff $diff
* @param TableDiff $diff
* @param array $columnSql
* @param array $qql
* @return boolean
*/
*/
protected
function
onSchemaAlterTable
(
TableDiff
$diff
,
&
$sql
)
protected
function
onSchemaAlterTable
(
TableDiff
$diff
,
&
$sql
)
{
{
...
@@ -1777,6 +1786,7 @@ abstract class AbstractPlatform
...
@@ -1777,6 +1786,7 @@ abstract class AbstractPlatform
* e.g. when a field has the "columnDefinition" keyword.
* e.g. when a field has the "columnDefinition" keyword.
* Only "AUTOINCREMENT" and "PRIMARY KEY" are added if appropriate.
* Only "AUTOINCREMENT" and "PRIMARY KEY" are added if appropriate.
*
*
* @param array $columnDef
* @return string
* @return string
*/
*/
public
function
getCustomTypeDeclarationSQL
(
array
$columnDef
)
public
function
getCustomTypeDeclarationSQL
(
array
$columnDef
)
...
@@ -1789,6 +1799,7 @@ abstract class AbstractPlatform
...
@@ -1789,6 +1799,7 @@ abstract class AbstractPlatform
* Obtain DBMS specific SQL code portion needed to set an index
* Obtain DBMS specific SQL code portion needed to set an index
* declaration to be used in statements like CREATE TABLE.
* declaration to be used in statements like CREATE TABLE.
*
*
* @param array $fields
* @return string
* @return string
*/
*/
public
function
getIndexFieldDeclarationListSQL
(
array
$fields
)
public
function
getIndexFieldDeclarationListSQL
(
array
$fields
)
...
@@ -1918,7 +1929,7 @@ abstract class AbstractPlatform
...
@@ -1918,7 +1929,7 @@ abstract class AbstractPlatform
*
*
* @throws Doctrine_Exception_Exception if unknown referential action given
* @throws Doctrine_Exception_Exception if unknown referential action given
* @param string $action foreign key referential action
* @param string $action foreign key referential action
* @
param string foreign key referential action in uppercase
* @
return string
*/
*/
public
function
getForeignKeyReferentialActionSQL
(
$action
)
public
function
getForeignKeyReferentialActionSQL
(
$action
)
{
{
...
@@ -2035,6 +2046,7 @@ abstract class AbstractPlatform
...
@@ -2035,6 +2046,7 @@ abstract class AbstractPlatform
* The default conversion in this implementation converts to integers (false => 0, true => 1).
* The default conversion in this implementation converts to integers (false => 0, true => 1).
*
*
* @param mixed $item
* @param mixed $item
* @return mixed
*/
*/
public
function
convertBooleans
(
$item
)
public
function
convertBooleans
(
$item
)
{
{
...
@@ -2572,7 +2584,7 @@ abstract class AbstractPlatform
...
@@ -2572,7 +2584,7 @@ abstract class AbstractPlatform
* Makes any fixes to a name of a schema element (table, sequence, ...) that are required
* Makes any fixes to a name of a schema element (table, sequence, ...) that are required
* by restrictions of the platform, like a maximum length.
* by restrictions of the platform, like a maximum length.
*
*
* @param string $schemaName
* @param string $schema
Element
Name
* @return string
* @return string
*/
*/
public
function
fixSchemaElementName
(
$schemaElementName
)
public
function
fixSchemaElementName
(
$schemaElementName
)
...
...
lib/Doctrine/DBAL/Query/Expression/CompositeExpression.php
View file @
f9f92d92
...
@@ -66,7 +66,7 @@ class CompositeExpression implements \Countable
...
@@ -66,7 +66,7 @@ class CompositeExpression implements \Countable
/**
/**
* Adds multiple parts to composite expression.
* Adds multiple parts to composite expression.
*
*
* @param array $
arg
s
* @param array $
part
s
*
*
* @return CompositeExpression
* @return CompositeExpression
*/
*/
...
...
lib/Doctrine/DBAL/Query/Expression/ExpressionBuilder.php
View file @
f9f92d92
...
@@ -94,7 +94,7 @@ class ExpressionBuilder
...
@@ -94,7 +94,7 @@ class ExpressionBuilder
* Creates a comparison expression.
* Creates a comparison expression.
*
*
* @param mixed $x Left expression
* @param mixed $x Left expression
* @param string $operator One of the ExpressionBui
k
der::* constants.
* @param string $operator One of the ExpressionBui
l
der::* constants.
* @param mixed $y Right expression
* @param mixed $y Right expression
* @return string
* @return string
*/
*/
...
...
lib/Doctrine/DBAL/Query/QueryBuilder.php
View file @
f9f92d92
...
@@ -134,7 +134,7 @@ class QueryBuilder
...
@@ -134,7 +134,7 @@ class QueryBuilder
* For more complex expression construction, consider storing the expression
* For more complex expression construction, consider storing the expression
* builder object in a local variable.
* builder object in a local variable.
*
*
* @return \Doctrine\DBAL\Query\ExpressionBuilder
* @return \Doctrine\DBAL\Query\Expression
\Expression
Builder
*/
*/
public
function
expr
()
public
function
expr
()
{
{
...
@@ -271,6 +271,7 @@ class QueryBuilder
...
@@ -271,6 +271,7 @@ class QueryBuilder
* </code>
* </code>
*
*
* @param array $params The query parameters to set.
* @param array $params The query parameters to set.
* @param array $types The query parameters types to set.
* @return QueryBuilder This QueryBuilder instance.
* @return QueryBuilder This QueryBuilder instance.
*/
*/
public
function
setParameters
(
array
$params
,
array
$types
=
array
())
public
function
setParameters
(
array
$params
,
array
$types
=
array
())
...
@@ -358,7 +359,7 @@ class QueryBuilder
...
@@ -358,7 +359,7 @@ class QueryBuilder
*
*
* @param string $sqlPartName
* @param string $sqlPartName
* @param string $sqlPart
* @param string $sqlPart
* @param
string
$append
* @param
boolean
$append
* @return \Doctrine\DBAL\Query\QueryBuilder This QueryBuilder instance.
* @return \Doctrine\DBAL\Query\QueryBuilder This QueryBuilder instance.
*/
*/
public
function
add
(
$sqlPartName
,
$sqlPart
,
$append
=
false
)
public
function
add
(
$sqlPartName
,
$sqlPart
,
$append
=
false
)
...
@@ -940,11 +941,6 @@ class QueryBuilder
...
@@ -940,11 +941,6 @@ class QueryBuilder
return
$this
;
return
$this
;
}
}
/**
* Converts this instance into a SELECT string in SQL.
*
* @return string
*/
private
function
getSQLForSelect
()
private
function
getSQLForSelect
()
{
{
$query
=
'SELECT '
.
implode
(
', '
,
$this
->
sqlParts
[
'select'
])
.
' FROM '
;
$query
=
'SELECT '
.
implode
(
', '
,
$this
->
sqlParts
[
'select'
])
.
' FROM '
;
...
...
lib/Doctrine/DBAL/SQLParserUtils.php
View file @
f9f92d92
...
@@ -82,6 +82,7 @@ class SQLParserUtils
...
@@ -82,6 +82,7 @@ class SQLParserUtils
* @param string $query
* @param string $query
* @param array $params
* @param array $params
* @param array $types
* @param array $types
* @return array
*/
*/
static
public
function
expandListParameters
(
$query
,
$params
,
$types
)
static
public
function
expandListParameters
(
$query
,
$params
,
$types
)
{
{
...
...
lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php
View file @
f9f92d92
...
@@ -68,7 +68,7 @@ abstract class AbstractSchemaManager
...
@@ -68,7 +68,7 @@ abstract class AbstractSchemaManager
/**
/**
* Return associated platform.
* Return associated platform.
*
*
* @return \Doctrine\DBAL\Platform\AbstractPlatform
* @return \Doctrine\DBAL\Platform
s
\AbstractPlatform
*/
*/
public
function
getDatabasePlatform
()
public
function
getDatabasePlatform
()
{
{
...
@@ -497,7 +497,7 @@ abstract class AbstractSchemaManager
...
@@ -497,7 +497,7 @@ abstract class AbstractSchemaManager
* Drop and create a new sequence
* Drop and create a new sequence
*
*
* @param Sequence $sequence
* @param Sequence $sequence
* @throws Doctrine\DBAL\ConnectionException if something fails at database level
* @throws
\
Doctrine\DBAL\ConnectionException if something fails at database level
*/
*/
public
function
dropAndCreateSequence
(
Sequence
$sequence
)
public
function
dropAndCreateSequence
(
Sequence
$sequence
)
{
{
...
...
lib/Doctrine/DBAL/Statement.php
View file @
f9f92d92
...
@@ -43,15 +43,15 @@ class Statement implements \IteratorAggregate, DriverStatement
...
@@ -43,15 +43,15 @@ class Statement implements \IteratorAggregate, DriverStatement
*/
*/
protected
$params
=
array
();
protected
$params
=
array
();
/**
/**
* @var Doctrine\DBAL\Driver\Statement The underlying driver statement.
* @var
\
Doctrine\DBAL\Driver\Statement The underlying driver statement.
*/
*/
protected
$stmt
;
protected
$stmt
;
/**
/**
* @var Doctrine\DBAL\Platforms\AbstractPlatform The underlying database platform.
* @var
\
Doctrine\DBAL\Platforms\AbstractPlatform The underlying database platform.
*/
*/
protected
$platform
;
protected
$platform
;
/**
/**
* @var Doctrine\DBAL\Connection The connection this statement is bound to and executed on.
* @var
\
Doctrine\DBAL\Connection The connection this statement is bound to and executed on.
*/
*/
protected
$conn
;
protected
$conn
;
...
@@ -77,8 +77,8 @@ class Statement implements \IteratorAggregate, DriverStatement
...
@@ -77,8 +77,8 @@ class Statement implements \IteratorAggregate, DriverStatement
* type and the value undergoes the conversion routines of the mapping type before
* type and the value undergoes the conversion routines of the mapping type before
* being bound.
* being bound.
*
*
* @param $name The name or position of the parameter.
* @param
string
$name The name or position of the parameter.
* @param $value The value of the parameter.
* @param
mixed
$value The value of the parameter.
* @param mixed $type Either a PDO binding type or a DBAL mapping type name or instance.
* @param mixed $type Either a PDO binding type or a DBAL mapping type name or instance.
* @return boolean TRUE on success, FALSE on failure.
* @return boolean TRUE on success, FALSE on failure.
*/
*/
...
@@ -107,7 +107,7 @@ class Statement implements \IteratorAggregate, DriverStatement
...
@@ -107,7 +107,7 @@ class Statement implements \IteratorAggregate, DriverStatement
* Binding a parameter by reference does not support DBAL mapping types.
* Binding a parameter by reference does not support DBAL mapping types.
*
*
* @param string $name The name or position of the parameter.
* @param string $name The name or position of the parameter.
* @param mixed $va
lue
The reference to the variable to bind
* @param mixed $va
r
The reference to the variable to bind
* @param integer $type The PDO binding type.
* @param integer $type The PDO binding type.
* @return boolean TRUE on success, FALSE on failure.
* @return boolean TRUE on success, FALSE on failure.
*/
*/
...
@@ -119,6 +119,7 @@ class Statement implements \IteratorAggregate, DriverStatement
...
@@ -119,6 +119,7 @@ class Statement implements \IteratorAggregate, DriverStatement
/**
/**
* Executes the statement with the currently bound parameters.
* Executes the statement with the currently bound parameters.
*
*
* @param array $params
* @return boolean TRUE on success, FALSE on failure.
* @return boolean TRUE on success, FALSE on failure.
*/
*/
public
function
execute
(
$params
=
null
)
public
function
execute
(
$params
=
null
)
...
...
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