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
2c9fae14
Unverified
Commit
2c9fae14
authored
Jul 01, 2020
by
Sergei Morozov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove irrelevant references to PDO from the documentation
parent
5bca2b72
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
11 additions
and
32 deletions
+11
-32
phpcs.xml.dist
phpcs.xml.dist
+1
-0
ColumnCase.php
src/ColumnCase.php
+0
-4
Connection.php
src/Connection.php
+3
-8
Connection.php
src/Driver/Connection.php
+0
-2
Connection.php
src/Driver/Mysqli/Connection.php
+1
-1
Statement.php
src/Driver/Statement.php
+2
-2
DriverManager.php
src/DriverManager.php
+0
-4
ParameterType.php
src/ParameterType.php
+0
-6
QueryBuilder.php
src/Query/QueryBuilder.php
+2
-3
Statement.php
src/Statement.php
+2
-2
No files found.
phpcs.xml.dist
View file @
2c9fae14
...
@@ -104,6 +104,7 @@
...
@@ -104,6 +104,7 @@
<!-- See https://github.com/slevomat/coding-standard/issues/770 -->
<!-- See https://github.com/slevomat/coding-standard/issues/770 -->
<rule
ref=
"SlevomatCodingStandard.Namespaces.UnusedUses"
>
<rule
ref=
"SlevomatCodingStandard.Namespaces.UnusedUses"
>
<exclude-pattern>
src/Driver/ExceptionConverterDriver.php
</exclude-pattern>
<exclude-pattern>
src/Driver/ExceptionConverterDriver.php
</exclude-pattern>
<exclude-pattern>
src/Query/QueryBuilder.php
</exclude-pattern>
</rule>
</rule>
<!-- see https://github.com/doctrine/dbal/issues/3377 -->
<!-- see https://github.com/doctrine/dbal/issues/3377 -->
...
...
src/ColumnCase.php
View file @
2c9fae14
...
@@ -9,15 +9,11 @@ final class ColumnCase
...
@@ -9,15 +9,11 @@ final class ColumnCase
{
{
/**
/**
* Convert column names to upper case.
* Convert column names to upper case.
*
* @see \PDO::CASE_UPPER
*/
*/
public
const
UPPER
=
1
;
public
const
UPPER
=
1
;
/**
/**
* Convert column names to lower case.
* Convert column names to lower case.
*
* @see \PDO::CASE_LOWER
*/
*/
public
const
LOWER
=
2
;
public
const
LOWER
=
2
;
...
...
src/Connection.php
View file @
2c9fae14
...
@@ -1034,8 +1034,6 @@ class Connection implements DriverConnection
...
@@ -1034,8 +1034,6 @@ class Connection implements DriverConnection
* Executes an SQL INSERT/UPDATE/DELETE query with the given parameters
* Executes an SQL INSERT/UPDATE/DELETE query with the given parameters
* and returns the number of affected rows.
* and returns the number of affected rows.
*
*
* This method supports PDO binding types as well as DBAL mapping types.
*
* @param string $query The SQL query.
* @param string $query The SQL query.
* @param array<mixed> $params The query parameters.
* @param array<mixed> $params The query parameters.
* @param array<int|string|null> $types The parameter types.
* @param array<int|string|null> $types The parameter types.
...
@@ -1511,16 +1509,13 @@ class Connection implements DriverConnection
...
@@ -1511,16 +1509,13 @@ 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.
*
*
* @internal Duck-typing used on the $stmt parameter to support driver statements as well as
* raw PDOStatement instances.
*
* @param DriverStatement $stmt The statement to bind the values to.
* @param DriverStatement $stmt The statement to bind the values to.
* @param mixed[] $params The map/list of named/positional parameters.
* @param mixed[] $params The map/list of named/positional parameters.
* @param int[]|string[] $types The parameter types (PDO binding types or DBAL mapping types).
* @param int[]|string[] $types The parameter types (PDO binding types or DBAL mapping types).
*/
*/
private
function
_bindTypedValues
(
DriverStatement
$stmt
,
array
$params
,
array
$types
)
:
void
private
function
_bindTypedValues
(
DriverStatement
$stmt
,
array
$params
,
array
$types
)
:
void
{
{
// Check whether parameters are positional or named. Mixing is not allowed
, just like in PDO
.
// Check whether parameters are positional or named. Mixing is not allowed.
if
(
is_int
(
key
(
$params
)))
{
if
(
is_int
(
key
(
$params
)))
{
// Positional parameters
// Positional parameters
$typeOffset
=
array_key_exists
(
0
,
$types
)
?
-
1
:
0
;
$typeOffset
=
array_key_exists
(
0
,
$types
)
?
-
1
:
0
;
...
@@ -1552,7 +1547,7 @@ class Connection implements DriverConnection
...
@@ -1552,7 +1547,7 @@ class Connection implements DriverConnection
}
}
/**
/**
* Gets the binding type of a given type.
The given type can be a PDO or DBAL mapping type.
* Gets the binding type of a given type.
*
*
* @param mixed $value The value to bind.
* @param mixed $value The value to bind.
* @param int|string|null $type The type to bind (PDO or DBAL).
* @param int|string|null $type The type to bind (PDO or DBAL).
...
@@ -1590,7 +1585,7 @@ class Connection implements DriverConnection
...
@@ -1590,7 +1585,7 @@ class Connection implements DriverConnection
{
{
$resolvedParams
=
[];
$resolvedParams
=
[];
// Check whether parameters are positional or named. Mixing is not allowed
, just like in PDO
.
// Check whether parameters are positional or named. Mixing is not allowed.
if
(
is_int
(
key
(
$params
)))
{
if
(
is_int
(
key
(
$params
)))
{
// Positional parameters
// Positional parameters
$typeOffset
=
array_key_exists
(
0
,
$types
)
?
-
1
:
0
;
$typeOffset
=
array_key_exists
(
0
,
$types
)
?
-
1
:
0
;
...
...
src/Driver/Connection.php
View file @
2c9fae14
...
@@ -7,8 +7,6 @@ use Doctrine\DBAL\ParameterType;
...
@@ -7,8 +7,6 @@ use Doctrine\DBAL\ParameterType;
/**
/**
* Connection interface.
* Connection interface.
* Driver connections must implement this interface.
* Driver connections must implement this interface.
*
* This resembles (a subset of) the PDO interface.
*/
*/
interface
Connection
interface
Connection
{
{
...
...
src/Driver/Mysqli/Connection.php
View file @
2c9fae14
...
@@ -147,7 +147,7 @@ final class Connection implements ServerInfoAwareConnection
...
@@ -147,7 +147,7 @@ final class Connection implements ServerInfoAwareConnection
}
}
/**
/**
* {@inheritdoc}
non-PHPdoc)
* {@inheritdoc}
*/
*/
public
function
rollBack
()
public
function
rollBack
()
{
{
...
...
src/Driver/Statement.php
View file @
2c9fae14
...
@@ -31,7 +31,7 @@ interface Statement
...
@@ -31,7 +31,7 @@ interface Statement
/**
/**
* Binds a PHP variable to a corresponding named (not supported by mysqli driver, see comment below) or question
* Binds a PHP variable to a corresponding named (not supported by mysqli driver, see comment below) or question
* mark placeholder in the SQL statement that was use to prepare the statement. Unlike
PDOStatement->bindValue()
,
* mark placeholder in the SQL statement that was use to prepare the statement. Unlike
{@link bindValue()}
,
* the variable is bound as a reference and will only be evaluated at the time
* the variable is bound as a reference and will only be evaluated at the time
* that PDOStatement->execute() is called.
* that PDOStatement->execute() is called.
*
*
...
@@ -62,7 +62,7 @@ interface Statement
...
@@ -62,7 +62,7 @@ interface Statement
* Executes a prepared statement
* Executes a prepared statement
*
*
* If the prepared statement included parameter markers, you must either:
* If the prepared statement included parameter markers, you must either:
* call
PDOStatement->bindParam()
to bind PHP variables to the parameter markers:
* call
{@link bindParam()}
to bind PHP variables to the parameter markers:
* bound variables pass their value as input and receive the output value,
* bound variables pass their value as input and receive the output value,
* if any, of their associated parameter markers or pass an array of input-only
* if any, of their associated parameter markers or pass an array of input-only
* parameter values.
* parameter values.
...
...
src/DriverManager.php
View file @
2c9fae14
...
@@ -100,10 +100,6 @@ final class DriverManager
...
@@ -100,10 +100,6 @@ final class DriverManager
* Any additional driver-specific options for the driver. These are just passed
* Any additional driver-specific options for the driver. These are just passed
* through to the driver.
* through to the driver.
*
*
* <b>pdo</b>:
* You can pass an existing PDO instance through this parameter. The PDO
* instance will be wrapped in a Doctrine\DBAL\Connection.
*
* <b>wrapperClass</b>:
* <b>wrapperClass</b>:
* You may specify a custom wrapper class through the 'wrapperClass'
* You may specify a custom wrapper class through the 'wrapperClass'
* parameter but this class MUST inherit from Doctrine\DBAL\Connection.
* parameter but this class MUST inherit from Doctrine\DBAL\Connection.
...
...
src/ParameterType.php
View file @
2c9fae14
...
@@ -9,15 +9,11 @@ final class ParameterType
...
@@ -9,15 +9,11 @@ final class ParameterType
{
{
/**
/**
* Represents the SQL NULL data type.
* Represents the SQL NULL data type.
*
* @see \PDO::PARAM_NULL
*/
*/
public
const
NULL
=
0
;
public
const
NULL
=
0
;
/**
/**
* Represents the SQL INTEGER data type.
* Represents the SQL INTEGER data type.
*
* @see \PDO::PARAM_INT
*/
*/
public
const
INTEGER
=
1
;
public
const
INTEGER
=
1
;
...
@@ -30,8 +26,6 @@ final class ParameterType
...
@@ -30,8 +26,6 @@ final class ParameterType
/**
/**
* Represents the SQL large object data type.
* Represents the SQL large object data type.
*
* @see \PDO::PARAM_LOB
*/
*/
public
const
LARGE_OBJECT
=
3
;
public
const
LARGE_OBJECT
=
3
;
...
...
src/Query/QueryBuilder.php
View file @
2c9fae14
...
@@ -7,6 +7,7 @@ use Doctrine\DBAL\Driver\Result;
...
@@ -7,6 +7,7 @@ use Doctrine\DBAL\Driver\Result;
use
Doctrine\DBAL\ParameterType
;
use
Doctrine\DBAL\ParameterType
;
use
Doctrine\DBAL\Query\Expression\CompositeExpression
;
use
Doctrine\DBAL\Query\Expression\CompositeExpression
;
use
Doctrine\DBAL\Query\Expression\ExpressionBuilder
;
use
Doctrine\DBAL\Query\Expression\ExpressionBuilder
;
use
Doctrine\DBAL\Statement
;
use
function
array_key_exists
;
use
function
array_key_exists
;
use
function
array_keys
;
use
function
array_keys
;
...
@@ -1258,7 +1259,7 @@ class QueryBuilder
...
@@ -1258,7 +1259,7 @@ class QueryBuilder
/**
/**
* Creates a new named parameter and bind the value $value to it.
* Creates a new named parameter and bind the value $value to it.
*
*
* This method provides a shortcut for
PDOStatement::bindValue
* This method provides a shortcut for
{@link Statement::bindValue()}
* when using prepared statements.
* when using prepared statements.
*
*
* The parameter $value specifies the value that you want to bind. If
* The parameter $value specifies the value that you want to bind. If
...
@@ -1266,8 +1267,6 @@ class QueryBuilder
...
@@ -1266,8 +1267,6 @@ class QueryBuilder
* placeholder for you. An automatic placeholder will be of the name
* placeholder for you. An automatic placeholder will be of the name
* ':dcValue1', ':dcValue2' etc.
* ':dcValue1', ':dcValue2' etc.
*
*
* For more information see {@link http://php.net/pdostatement-bindparam}
*
* Example:
* Example:
* <code>
* <code>
* $value = 2;
* $value = 2;
...
...
src/Statement.php
View file @
2c9fae14
...
@@ -77,7 +77,7 @@ class Statement implements DriverStatement
...
@@ -77,7 +77,7 @@ class Statement implements DriverStatement
/**
/**
* Binds a parameter value to the statement.
* Binds a parameter value to the statement.
*
*
* The value can optionally be bound with a
PDO binding type or a
DBAL mapping type.
* The value can optionally be bound with a DBAL mapping type.
* If bound with a DBAL mapping type, the binding type is derived from the mapping
* If bound with a DBAL mapping type, the binding type is derived from the mapping
* 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.
...
@@ -117,7 +117,7 @@ class Statement implements DriverStatement
...
@@ -117,7 +117,7 @@ class Statement implements DriverStatement
*
*
* @param string|int $name The name or position of the parameter.
* @param string|int $name The name or position of the parameter.
* @param mixed $var The reference to the variable to bind.
* @param mixed $var The reference to the variable to bind.
* @param int $type The
PDO
binding type.
* @param int $type The binding type.
* @param int|null $length Must be specified when using an OUT bind
* @param int|null $length Must be specified when using an OUT bind
* so that PHP allocates enough memory to hold the returned value.
* so that PHP allocates enough memory to hold the returned value.
*
*
...
...
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