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
b8066db4
Unverified
Commit
b8066db4
authored
Apr 06, 2020
by
Sergei Morozov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Declared Driver\Statement::bind(Parameter|Value) $name argument as string|ing
parent
559c6bae
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
14 deletions
+21
-14
DB2Statement.php
src/Driver/IBMDB2/DB2Statement.php
+4
-0
SQLAnywhereStatement.php
src/Driver/SQLAnywhere/SQLAnywhereStatement.php
+3
-0
Statement.php
src/Driver/Statement.php
+14
-14
No files found.
src/Driver/IBMDB2/DB2Statement.php
View file @
b8066db4
...
@@ -18,6 +18,7 @@ use const DB2_LONG;
...
@@ -18,6 +18,7 @@ use const DB2_LONG;
use
const
DB2_PARAM_FILE
;
use
const
DB2_PARAM_FILE
;
use
const
DB2_PARAM_IN
;
use
const
DB2_PARAM_IN
;
use
function
array_change_key_case
;
use
function
array_change_key_case
;
use
function
assert
;
use
function
count
;
use
function
count
;
use
function
db2_bind_param
;
use
function
db2_bind_param
;
use
function
db2_execute
;
use
function
db2_execute
;
...
@@ -34,6 +35,7 @@ use function error_get_last;
...
@@ -34,6 +35,7 @@ use function error_get_last;
use
function
fclose
;
use
function
fclose
;
use
function
fwrite
;
use
function
fwrite
;
use
function
gettype
;
use
function
gettype
;
use
function
is_int
;
use
function
is_object
;
use
function
is_object
;
use
function
is_resource
;
use
function
is_resource
;
use
function
is_string
;
use
function
is_string
;
...
@@ -97,6 +99,8 @@ class DB2Statement implements IteratorAggregate, Statement
...
@@ -97,6 +99,8 @@ class DB2Statement implements IteratorAggregate, Statement
*/
*/
public
function
bindParam
(
$column
,
&
$variable
,
$type
=
ParameterType
::
STRING
,
$length
=
null
)
public
function
bindParam
(
$column
,
&
$variable
,
$type
=
ParameterType
::
STRING
,
$length
=
null
)
{
{
assert
(
is_int
(
$column
));
switch
(
$type
)
{
switch
(
$type
)
{
case
ParameterType
::
INTEGER
:
case
ParameterType
::
INTEGER
:
$this
->
bind
(
$column
,
$variable
,
DB2_PARAM_IN
,
DB2_LONG
);
$this
->
bind
(
$column
,
$variable
,
DB2_PARAM_IN
,
DB2_LONG
);
...
...
src/Driver/SQLAnywhere/SQLAnywhereStatement.php
View file @
b8066db4
...
@@ -12,6 +12,7 @@ use ReflectionObject;
...
@@ -12,6 +12,7 @@ use ReflectionObject;
use
stdClass
;
use
stdClass
;
use
const
SASQL_BOTH
;
use
const
SASQL_BOTH
;
use
function
array_key_exists
;
use
function
array_key_exists
;
use
function
assert
;
use
function
count
;
use
function
count
;
use
function
gettype
;
use
function
gettype
;
use
function
is_int
;
use
function
is_int
;
...
@@ -88,6 +89,8 @@ class SQLAnywhereStatement implements IteratorAggregate, Statement
...
@@ -88,6 +89,8 @@ class SQLAnywhereStatement implements IteratorAggregate, Statement
*/
*/
public
function
bindParam
(
$column
,
&
$variable
,
$type
=
ParameterType
::
STRING
,
$length
=
null
)
public
function
bindParam
(
$column
,
&
$variable
,
$type
=
ParameterType
::
STRING
,
$length
=
null
)
{
{
assert
(
is_int
(
$column
));
switch
(
$type
)
{
switch
(
$type
)
{
case
ParameterType
::
INTEGER
:
case
ParameterType
::
INTEGER
:
case
ParameterType
::
BOOLEAN
:
case
ParameterType
::
BOOLEAN
:
...
...
src/Driver/Statement.php
View file @
b8066db4
...
@@ -19,12 +19,12 @@ interface Statement extends ResultStatement
...
@@ -19,12 +19,12 @@ interface Statement extends ResultStatement
* As mentioned above, the named parameters are not natively supported by the mysqli driver, use executeQuery(),
* As mentioned above, the named parameters are not natively supported by the mysqli driver, use executeQuery(),
* fetchAll(), fetchArray(), fetchColumn(), fetchAssoc() methods to have the named parameter emulated by doctrine.
* fetchAll(), fetchArray(), fetchColumn(), fetchAssoc() methods to have the named parameter emulated by doctrine.
*
*
* @param
mixed
$param Parameter identifier. For a prepared statement using named placeholders,
* @param
string|int
$param 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.
* @param mixed $value The value to bind to the parameter.
* @param mixed
$value The value to bind to the parameter.
* @param int $type Explicit data type for the parameter using the {@link \Doctrine\DBAL\ParameterType}
* @param int
$type Explicit data type for the parameter using the {@link \Doctrine\DBAL\ParameterType}
* constants.
*
constants.
*
*
* @return bool TRUE on success or FALSE on failure.
* @return bool TRUE on success or FALSE on failure.
*/
*/
...
@@ -44,14 +44,14 @@ interface Statement extends ResultStatement
...
@@ -44,14 +44,14 @@ 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
$column Parameter identifier. For a prepared statement using named placeholders,
* @param
string|int
$column Parameter identifier. For a prepared statement using named placeholders,
* this will be a parameter name of the form :name. For a prepared statement using
*
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.
*
question mark placeholders, this will be the 1-indexed position of the parameter.
* @param mixed $variable Name of the PHP variable to bind to the SQL statement parameter.
* @param mixed
$variable Name of the PHP variable to bind to the SQL statement parameter.
* @param int $type Explicit data type for the parameter using the {@link \Doctrine\DBAL\ParameterType}
* @param int
$type Explicit data type for the parameter using the {@link \Doctrine\DBAL\ParameterType}
* constants.
*
constants.
* @param int|null $length You must specify maxlength when using an OUT bind
* @param int|null
$length You must specify maxlength 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.
*
*
* @return bool TRUE on success or FALSE on failure.
* @return bool TRUE on success or FALSE on failure.
*/
*/
...
...
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