@@ -27,15 +27,19 @@ class SQLParserUtilsTest extends \Doctrine\Tests\DbalTestCase
...
@@ -27,15 +27,19 @@ class SQLParserUtilsTest extends \Doctrine\Tests\DbalTestCase
array('SELECT "?" FROM foo',true,array()),
array('SELECT "?" FROM foo',true,array()),
array("SELECT '?' FROM foo",true,array()),
array("SELECT '?' FROM foo",true,array()),
array("SELECT `?` FROM foo",true,array()),// Ticket DBAL-552
array("SELECT `?` FROM foo",true,array()),// Ticket DBAL-552
array("SELECT [?] FROM foo",true,array()),
array("SELECT 'Doctrine\DBAL?' FROM foo",true,array()),// Ticket DBAL-558
array("SELECT 'Doctrine\DBAL?' FROM foo",true,array()),// Ticket DBAL-558
array('SELECT "Doctrine\DBAL?" FROM foo',true,array()),// Ticket DBAL-558
array('SELECT "Doctrine\DBAL?" FROM foo',true,array()),// Ticket DBAL-558
array('SELECT `Doctrine\DBAL?` FROM foo',true,array()),// Ticket DBAL-558
array('SELECT `Doctrine\DBAL?` FROM foo',true,array()),// Ticket DBAL-558
array('SELECT [Doctrine\DBAL?] FROM foo',true,array()),// Ticket DBAL-558
array('SELECT "?" FROM foo WHERE bar = ?',true,array(32)),
array('SELECT "?" FROM foo WHERE bar = ?',true,array(32)),
array("SELECT '?' FROM foo WHERE bar = ?",true,array(32)),
array("SELECT '?' FROM foo WHERE bar = ?",true,array(32)),
array("SELECT `?` FROM foo WHERE bar = ?",true,array(32)),// Ticket DBAL-552
array("SELECT `?` FROM foo WHERE bar = ?",true,array(32)),// Ticket DBAL-552
array("SELECT [?] FROM foo WHERE bar = ?",true,array(32)),
array("SELECT 'Doctrine\DBAL?' FROM foo WHERE bar = ?",true,array(45)),// Ticket DBAL-558
array("SELECT 'Doctrine\DBAL?' FROM foo WHERE bar = ?",true,array(45)),// Ticket DBAL-558
array('SELECT "Doctrine\DBAL?" FROM foo WHERE bar = ?',true,array(45)),// Ticket DBAL-558
array('SELECT "Doctrine\DBAL?" FROM foo WHERE bar = ?',true,array(45)),// Ticket DBAL-558
array('SELECT `Doctrine\DBAL?` FROM foo WHERE bar = ?',true,array(45)),// Ticket DBAL-558
array('SELECT `Doctrine\DBAL?` FROM foo WHERE bar = ?',true,array(45)),// Ticket DBAL-558
array('SELECT [Doctrine\DBAL?] FROM foo WHERE bar = ?',true,array(45)),// Ticket DBAL-558
array(
array(
<<<'SQLDATA'
<<<'SQLDATA'
SELECT * FROM foo WHERE bar = 'it\'s a trap? \\' OR bar = ?
SELECT * FROM foo WHERE bar = 'it\'s a trap? \\' OR bar = ?
...
@@ -55,6 +59,7 @@ SQLDATA
...
@@ -55,6 +59,7 @@ SQLDATA
array('SELECT * FROM Foo WHERE bar > :start_date AND baz > :start_date',false,array(30=>'start_date',52=>'start_date')),// Ticket GH-113
array('SELECT * FROM Foo WHERE bar > :start_date AND baz > :start_date',false,array(30=>'start_date',52=>'start_date')),// Ticket GH-113
array('SELECT foo::date as date FROM Foo WHERE bar > :start_date AND baz > :start_date',false,array(46=>'start_date',68=>'start_date')),// Ticket GH-259
array('SELECT foo::date as date FROM Foo WHERE bar > :start_date AND baz > :start_date',false,array(46=>'start_date',68=>'start_date')),// Ticket GH-259
array('SELECT `d.ns:col_name` FROM my_table d WHERE `d.date` >= :param1',false,array(57=>'param1')),// Ticket DBAL-552
array('SELECT `d.ns:col_name` FROM my_table d WHERE `d.date` >= :param1',false,array(57=>'param1')),// Ticket DBAL-552
array('SELECT [d.ns:col_name] FROM my_table d WHERE [d.date] >= :param1',false,array(57=>'param1')),// Ticket DBAL-552