my @sql_tests = (
- # WHERE condition - equal
+ # WHERE condition - equal
{
equal => 1,
statements => [
]
},
{
- equal => 0,
- statements => [
- 'SELECT a,b,c FROM foo',
- 'SELECT a,c,b FROM foo',
- 'SELECT b,a,c FROM foo',
- 'SELECT b,c,a FROM foo',
- 'SELECT c,a,b FROM foo',
- 'SELECT c,b,a FROM foo',
- ]
+ equal => 0,
+ statements => [
+ 'SELECT a,b,c FROM foo',
+ 'SELECT a,c,b FROM foo',
+ 'SELECT b,a,c FROM foo',
+ 'SELECT b,c,a FROM foo',
+ 'SELECT c,a,b FROM foo',
+ 'SELECT c,b,a FROM foo',
+ ],
},
{
- equal => 0,
- statements => [
- 'SELECT count(*) FROM foo',
- 'SELECT count(a) FROM foo',
- 'SELECT count(1) FROM foo',
- ]
+ equal => 0,
+ statements => [
+ 'SELECT * FROM foo WHERE a IN (1,2,3)',
+ 'SELECT * FROM foo WHERE a IN (1,3,2)',
+ 'SELECT * FROM foo WHERE a IN (2,1,3)',
+ 'SELECT * FROM foo WHERE a IN (2,3,1)',
+ 'SELECT * FROM foo WHERE a IN (3,1,2)',
+ 'SELECT * FROM foo WHERE a IN (3,2,1)',
+ ]
},
{
- equal => 0,
- statements => [
- 'SELECT * FROM foo WHERE a IN (1,2,3)',
- 'SELECT * FROM foo WHERE a IN (1,3,2)',
- 'SELECT * FROM foo WHERE a IN (2,1,3)',
- 'SELECT * FROM foo WHERE a IN (2,3,1)',
- 'SELECT * FROM foo WHERE a IN (3,1,2)',
- 'SELECT * FROM foo WHERE a IN (3,2,1)',
- ]
+ equal => 0,
+ statements => [
+ 'SELECT count(*) FROM foo',
+ 'SELECT count(*) AS bar FROM foo',
+ 'SELECT count(*) AS "bar" FROM foo',
+ 'SELECT count(a) FROM foo',
+ 'SELECT count(1) FROM foo',
+ ]
},
);