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
7d30c4a2
Commit
7d30c4a2
authored
Oct 08, 2014
by
Steve Müller
Committed by
Steve Müller
Oct 15, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add test for explicit positional parameter keys
parent
c44b1046
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
SQLParserUtilsTest.php
tests/Doctrine/Tests/DBAL/SQLParserUtilsTest.php
+10
-0
No files found.
tests/Doctrine/Tests/DBAL/SQLParserUtilsTest.php
View file @
7d30c4a2
...
@@ -47,6 +47,7 @@ AND baz = "\"quote\" me on it? \\" OR baz = ?
...
@@ -47,6 +47,7 @@ AND baz = "\"quote\" me on it? \\" OR baz = ?
SQLDATA
SQLDATA
,
true
,
array
(
58
,
104
)
,
true
,
array
(
58
,
104
)
),
),
array
(
'SELECT * FROM foo WHERE foo = ? AND bar = ?'
,
true
,
array
(
1
=>
42
,
0
=>
30
)),
// explicit keys
// named
// named
array
(
'SELECT :foo FROM :bar'
,
false
,
array
(
7
=>
'foo'
,
17
=>
'bar'
)),
array
(
'SELECT :foo FROM :bar'
,
false
,
array
(
7
=>
'foo'
,
17
=>
'bar'
)),
...
@@ -138,6 +139,15 @@ SQLDATA
...
@@ -138,6 +139,15 @@ SQLDATA
array
(),
array
(),
array
()
array
()
),
),
// Positional: explicit keys for params and types
array
(
"SELECT * FROM Foo WHERE foo = ? AND bar = ? AND baz = ?"
,
array
(
1
=>
'bar'
,
2
=>
'baz'
,
0
=>
1
),
array
(
2
=>
\PDO
::
PARAM_STR
,
1
=>
\PDO
::
PARAM_STR
),
'SELECT * FROM Foo WHERE foo = ? AND bar = ? AND baz = ?'
,
array
(
1
=>
'bar'
,
0
=>
1
,
2
=>
'baz'
),
array
(
1
=>
\PDO
::
PARAM_STR
,
2
=>
\PDO
::
PARAM_STR
)
),
// Named parameters : Very simple with param int
// Named parameters : Very simple with param int
array
(
array
(
"SELECT * FROM Foo WHERE foo = :foo"
,
"SELECT * FROM Foo WHERE foo = :foo"
,
...
...
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