1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631
|
-- This file is part of the KDE project
-- Copyright (C) 2012 Jarosław Staniek <staniek@kde.org>
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Library General Public
-- License as published by the Free Software Foundation; either
-- version 2 of the License, or (at your option) any later version.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Library General Public License for more details.
--
-- You should have received a copy of the GNU Library General Public License
-- along with this library; see the file COPYING.LIB. If not, write to
-- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-- Boston, MA 02110-1301, USA.
-- SQLITEFILE: sqlParserTest.kexi --
---------- CATEGORY: General --------------
-- The same field used in two columns
select id, id from persons;
-- No args: OK
select;
-- Whitespace between table-identifier, dot field-identifier/asterisk
select persons . id from persons;
select persons . * from persons;
-- ERROR: Multiple asterisks
select *, * from persons;
-- ERROR: Identifier cannot start with a number
select 1id from persons;
-- ERROR: Asterisk not allowed: no tables specified
select *;
-- Empty tables set
select 1, 2;
-- Empty column set (KDbSQL EXTENSION)
select from cars;
-- Totally empty statement (KDbSQL EXTENSION)
select;
-- Keywords and constants are case insensitive
SElEcT * FroM cars;
select TRue;
select FaLse;
selecT FALse oR TRuE;
selecT 1 LIKe 1;
-- Constants
select -12;
select 7777777;
select -1048576;
select 16777216;
select "01234567890";
select '01234567890';
select '"';
select '\\';
select '\"';
select 3.14159;
select 3.;
select NULL;
-- Date Constants (KDbSQL EXTENSION)
-- https://community.kde.org/Kexi/Plugins/Queries/SQL_Constants
-- Date Constants: AD
select #2018-09-17#;
select #09/17/2018#;
select #2018-9-17#;
select #9/17/2018#;
select #2018-9-07#;
select #9/07/2018#;
select #2018-9-7#;
select #9/7/2018#;
select #2018-09-7#;
select #09/7/2018#;
select #1900-01-01#;
select #01/01/1900#;
select #1500-02-02#;
select #02/02/1500#;
select #0001-01-21#;
select #01/21/0001#;
-- ERROR: Date Constants: Invalid month
select #2018-00-17#;
select #00/17/2018#;
select #2018-0-17#;
select #0/17/2018#;
select #2018-13-17#;
select #13/17/2018#;
select #2018-99-17#;
select #99/17/2018#;
-- ERROR: Date Constants: Invalid day
select #2018-01-00#;
select #01/00/2018#;
select #2018-01-0#;
select #01/0/2018#;
select #2018-02-29#;
select #02/29/2018#;
select #2018-01-32#;
select #01/32/2018#;
-- ERROR: Date Constants: too many digits
select #2018-001-30#;
select #001/30/2018#;
select #2018-001-030#;
select #001/030/2018#;
select #2018-01-030#;
select #01/030/2018#;
-- ERROR: Date Constants: invalid characters/format
select #2018-1a-30#;
select #1a/30/2018#;
select #2018--30#;
select #/30/2018#;
select #2018-a-30#;
select #a/30/2018#;
select #2018-01-3o#;
select #01/3o/2018#;
select #2018-01-30;
select #01/30/2018;
select #2018_01-30#;
select #01/30_2018#;
select #2018-01_30;
select #01_30/2018#;
select #2018_01_30;
select #2018-01/30;
select #20180130;
select #2018;
select #2018-;
select #2018/;
select #/2018;
select #2018-01;
select #01/2018;
select #2018-01-;
select #/01/2018;
select #2018/01;
select #-2018-01-;
select #/01/2018;
select #-2018;
select ##-2018;
select ##/2018;
select #;
select ##;
select #2018-01-01-01#;
select #01/01/01/2018#;
select #++18119-10-30#;
select #10/30/++18119#;
select #+-18119-10-30#;
select #10/30/+-18119#;
select #-+18119-10-30#;
select #10/30/-+18119#;
select #--18119-10-30#;
select #10/30/--18119#;
select # 2018-03-08#;
select #2018-03-08 #;
select # 2018-03-08 #;
select # 2018 -03-08 #;
select #2018-03 -08#;
select #2018 - 03 - 08#;
select #201 -03-08 #;
select #2018- 3-08 #;
select #2018-03- 8 #;
-- ERROR: Date Constant: at least 4 digit year required
select #189-12-13#;
select #12/13/189#;
-- Date Constants: optional "+" prefix for years 1-9999
select #+2018-12-02#;
select #12/02/+2018#;
select #+1500-02-02#;
select #12/02/+1500#;
select #+1500-3-2#;
select #3/02/+1500#;
select #+02012-12-13#;
select #12/13/+02012#;
-- Date Constants, year > 9999
select #+123456789-12-13#;
select #12/13/+123456789#;
select #+000123456789-12-13#;
select #12/13/+000123456789#;
-- ERROR: Date Constant: More than 4-digit year so "+" prefix is required
select #123456789-12-13#;
select #12/13/123456789#;
-- 1 BC Date Constants
select #+0000-01-30#;
select #01/30/+0000#;
-- ERROR: Date Constant: 1 BC requires +0000 year
select #0000-01-01#;
select #01/01/0000#;
select #-0000-01-01#;
select #01/01/-0000#;
select #+000-01-01#;
select #01/01/+000#;
select #-000-01-01#;
select #01/01/-000#;
select #+00-01-01#;
select #01/01/+00#;
select #-00-01-01#;
select #01/01/-00#;
select #+0-01-01#;
select #01/01/+0#;
select #-0-01-01#;
select #01/01/-0#;
-- 2 BC Date Constants
select #-0001-03-04#;
select #03/04/-0001#;
select #-5001-03-04#;
select #03/04/-5001#;
-- <= 10000 BC Date Constants
select #-9999-03-04#;
select #04/03/-9999#;
select #-10000-03-04#;
select #04/03/-10000#;
select #-543210000-03-04#;
select #04/03/-543210000#;
select #-00543210000-03-04#;
select #04/03/-00543210000#;
-- ERROR: Date Constant: MSA format
select #24 Dec 2014#;
select #24 December 2014#;
select #December 24, 2014#;
select #Dec 24, 2014#;
-- Time Constants (KDbSQL EXTENSION)
-- https://community.kde.org/Kexi/Plugins/Queries/SQL_Constants
-- Time Constants: 24h mode
select #01:17:59#;
select #01:07:59#;
select #01:07:09#;
select #1:07:09#;
select #01:7:09#;
select #01:07:9#;
select #01:7:9#;
select #1:7:09#;
select #1:07:9#;
select #1:7:9#;
select #0:0:0#;
select #23:11:29#;
select #13:17:59#;
select #23:11#;
select #03:01#;
select #3:01#;
select #03:1#;
select #3:1#;
-- Time Constants: 12h mode
select #11:11:29 AM#;
select #11:11:29 PM#;
select #11:11:29AM#;
select #11:11:29PM#;
select #11:11:29am#;
select #11:11:29pm#;
select #11:11:29 AM#;
select #11:11:29 PM#;
select #1:31:19 aM#;
select #1:31:19 Am#;
select #1:31:19 am#;
select #1:31:19 pM#;
select #1:31:19 pM#;
select #11:11 AM#;
select #11:11 PM#;
select #11:11 AM#;
select #11:11 PM#;
select #11:11AM#;
select #11:11PM#;
select #11:11am#;
select #11:11pm#;
select #1:31 aM#;
select #1:31 Am#;
select #1:31 am#;
select #1:31 pM#;
select #1:31 pM#;
-- ERROR: Time Constants: invalid characters/format
select #001:17:59#;
select #01:017:59#;
select #01:017:059#;
select #001:017:59#;
select #01:017:059#;
select #001:17:059#;
select #001;017:059#;
select #01:17:59;
select #01::17:59#;
select ##01::17:59#;
select #01#;
select #0#;
select #11:17 #;
select #11: 17#;
select #11 : 17#;
select #11 :17#;
select #11::17#;
select # 11:17#;
select #11:17 AM #;
select #1:17 PM #;
select # 11:17 AM#;
select # 11:17 AM #;
select # 1:17 PM#;
select # 1:17 PM #;
select #o1:17#;
select #1:17a#;
select #1:17p#;
select #1:17 p#;
select #1:17 pr#;
-- ERROR: Time Constants: invalid hour
select #24:17:59#;
select #28:17:59#;
select #13:17:59 AM#;
select #23:17:59 PM#;
select #13:17 AM#;
select #23:17 PM#;
-- Date/Time Constants (KDbSQL EXTENSION)
-- https://community.kde.org/Kexi/Plugins/Queries/SQL_Constants
-- TODO
-- TRUE and FALSE constants (KDbSQL EXTENSION)
select TRUE;
select TRUE, NOT FALSE;
select NOT NOT TRUE;
select NOT NULL;
select NOT (NOT TRUE);
select TRUE != FALSE;
select TRUE <> FALSE;
select TRUE OR FALSE;
select TRUE XOR FALSE;
select TRUE AND NOT FALSE;
select TRUE < FALSE;
select TRUE IS NULL;
select TRUE <> TRUE OR FALSE == TRUE;
-- ERROR: 'IS' is reserved keyword
select TRUE IS NOT FALSE;
-- IS NULL/IS NOT NULL
select 1 IS NOT NULL;
select NULL IS NULL;
select NULL IS NOT NULL;
-- ERROR: Extra ';'
select 1; 2;
-- Unary operators
select -1;
select --1;
select +1;
select ++1;
select +--+-1;
select -NULL;
select +NULL;
-- Binary operators
select 1+2;
select 1-2;
select 1*2;
select 1/2;
select 1&2;
select 1|2;
select 1%2;
select 2 >> 4;
select 2 << 4;
select 2 <> 4;
select 2 != -4;
select 2 = -4;
select 2 == -4;
select 2 > 4;
select 2 < 4;
select 2 <= 4;
select 2 >= -4;
select NULL + NULL;
select 7 + NULL;
select NULL - NULL;
select 7 - NULL;
select NULL * NULL;
select 7 * NULL;
select NULL / NULL;
select 7 / NULL;
select NULL & NULL;
select 7 & NULL;
select NULL | NULL;
select 7 | NULL;
select NULL % NULL;
select 7 % NULL;
select NULL >> NULL;
select 7 >> NULL;
select NULL << NULL;
select 7 << NULL;
select NULL <> NULL;
select 7 <> NULL;
select NULL != NULL;
select 7 != NULL;
select NULL == NULL;
select 7 == NULL;
select NULL > NULL;
select 7 > NULL;
select NULL < NULL;
select 7 < NULL;
select NULL >= NULL;
select 7 >= NULL;
select NULL <= NULL;
select 7 <= NULL;
select 'ABC' LIKE 'A%';
select 'ABC' NOT LIKE 'A%';
select 'ABC' LIKE NULL;
select NULL LIKE NULL;
select NULL NOT LIKE NULL;
select 1 BETWEEN 0 AND 5;
select NULL BETWEEN 1 AND 5;
select 1 BETWEEN NULL AND 5;
select 1 BETWEEN 0 AND NULL;
select NULL BETWEEN NULL AND NULL;
select 3 SIMILAR TO 4;
select NULL SIMILAR TO 4;
select 3 NOT SIMILAR TO 4;
select NULL SIMILAR TO NULL;
select 'AB' || 'CD';
select "AB" ||"CD";
select 'AB'||"CD"a;
select 'AB' || 'CD' || 'EF';
select 'AB' + 'CD' || 'EF' + 'GH' || '';
select NULL || NULL;
select NULL || 'AB';
select 'AB' + NULL;
-- ERROR: ||
select 'AB' || 1;
select 'AB' + 1;
select 7 || 'AB';
select 7 + 'AB';
select 7 || 1;
-- ERROR: Type error near "1"
select 'ABC' NOT LIKE 1;
select 'ABC' NOT LIKE;
select 3 SIMILAR TO;
select 1 BETWEEN 'a' AND 5;
-- ERROR: **
select 1**2;
-- ERROR: * or / are not unary operators
select *2;
select /2;
-- ERROR: operators after argument
select 2+;
select 2-;
select 2*;
select 2/;
-- ERROR: unfinished '
select ';
select ";
select \';
select \"a";
select 1';
---------- CATEGORY: Aliases in select statement --------------
-- Aliases for columns
select id myid from persons;
select id as myid from persons;
-- Aliases for tables
select id from persons p;
-- ERROR: There's no "persons" table in this query (alias "p" covers it)
select persons.id from persons p;
-- Alias "p" for table "persons" is used
select p.id from persons p;
-- Multiple aliases for the same table
select persons.id from persons, persons p, persons p2;
-- ERROR: Column "id" is defined in both tables (so "id" column is ambiguous)
select id from persons p, cars p;
select id from persons p, cars c;
-- ERROR: Table alias "p" is assigned twice
select p.id from persons p, cars p;
select 1 from persons p, cars p;
select p.model from persons p, cars p;
-- ERROR: Table alias "p" is assigned twice and both have "id" column referenced by "p.*" so "p.*" is ambiguous
select p.* from persons p, cars p;
-- ERROR: Table alias "persons" is assigned and "persons" table is also used; both have "id" column referenced by "persons.*" so "persons.*" is ambiguous
select persons.* from persons, cars persons;
-- ERROR: Table alias "p" is assigned twice and both have "id" column referenced by "*" so "*" is ambiguous
select * from persons p, cars p;
-- ERROR: Column alias not allowed for all-tables asterisk
select * as c from cars;
-- ERROR: Column alias not allowed for table asterisk
select cars.* as c from cars;
---------- CATEGORY: Expressions with infix operators in columns of select statement --------------
-- Complex expressions support, operators precedence, and brackets
select NULL IS NOT NULL from cars;
select 2+3*4 from cars;
select (2+3)*4 from cars;
-- Support for aliases for complex-expression columns
select (2+3)*4 from cars;
-- ERROR: Column names are invalidated inside a complex expressions
select one*two from persons;
-- ERROR: Like "select p.id from persons p, cars p" but ambiguous column is inside a complex expression
select id*2 from persons p, cars p;
-- Operators precedence: arithmetic before relational
select 1 + 2 < 3;
-- *,/ before +,-
select 1+2*3;
-- Unary expressions before binary expressions
select 1+-2;
-- ERROR: column not found in expression
select 2 * foo;
-- ERROR: 'NOT' operator cannot be applied to integer
select NOT 2 * 4;
-- Nested '()'
select ((2));
select (( (2 ) ));
-- ERROR: unmatched '('
select (2;
select 2);
select ((2);
select (2)));
-- column names in expression
select id * id - 2 / id from cars;
select model || "---" || model from cars;
---------- CATEGORY: Expressions with scalar functions --------------
-- ABS
SELECT ABS(-27), abs(-3.1415), ABS(NULL + 1);
-- ERROR: ABS
SELECT ABS(); -- 1 arg expected
SELECT ABS(1, 2); -- 1 arg expected
SELECT ABS("a"); -- type error
-- CEILING
SELECT CEILING(3.14), ceiling(-99.001);
SELECT CEILING(0 + 0);
SELECT CEILING(NULL);
-- ERROR: CEILING
SELECT CEILING(); -- 1 arg expected
SELECT CEILING(1, 2); -- 1 arg expected
SELECT CEILING("a"); -- type error
-- CHAR
SELECT CHAR(75,69,88,73), CHAR();
SELECT CHAR(NULL);
SELECT CHAR(NULL, NULL);
-- ERROR: CHAR
SELECT CHAR(''); -- type error
SELECT CHAR(1.23); -- type error
-- COALESCE
SELECT COALESCE(NULL, 17, NULL, "A");
SELECT COALESCE(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); -- 100 args == KDB_MAX_FUNCTION_ARGS
-- ERROR: COALESCE
SELECT COALESCE(); -- 2 or more args expected
SELECT COALESCE(1); -- 2 or more args expected
SELECT COALESCE(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); -- 101 args is more than KDB_MAX_FUNCTION_ARGS
-- FLOOR
SELECT FLOOR(3.14), FLOOR(-99.001);
SELECT FLOOR(0 + 0);
SELECT FLOOR(NULL);
-- ERROR: FLOOR
SELECT FLOOR(); -- 1 arg expected
SELECT FLOOR(1, 2); -- 1 arg expected
SELECT FLOOR("a"); -- type error
-- TODO: more functions...
-- ERROR: unknown scalar function
SELECT foobar();
---------- CATEGORY: "WHERE" section --------------
-- ERROR: Empty WHERE section
select id from cars where;
-- WHERE section without columns
select from cars where TRUE;
-- Complex expressions in WHERE section
select id from cars where (id > 2 OR cars.owner IS NULL) AND 2 * id < 5;
---------- CATEGORY: "ORDER BY" section of select statement --------------
-- Simple ORDER BY
select id from cars order by id;
-- Simple ORDER BY with DESC
select id from cars order by id DESC;
-- Simple ORDER BY with ASC
select id from cars order by id ASC;
-- Simple ORDER BY with ASC and DESC
select id, model from cars order by id ASC, model DESC;
-- Simple ORDER BY with WHERE
select id from cars order by id WHERE id < 5;
-- Simple ORDER BY with WHERE; opposite direction
select id from cars WHERE id < 5 order by id;
-- Simple ORDER BY, sorting field 'owner' is not in the list of displayed fields
select id from cars order by owner;
-- ORDER BY with many arguments
select id from cars order by owner, model, id;
-- ORDER BY where column numbers are used instead of names
select id, model from cars order by 2, 1;
-- ERROR: ORDER BY column number 2 out of range - should be between 1 and 1
-- (there's only one visible field)
select id from cars order by 2, 1;
---------- CATEGORY: JOINs -------
-- Join persons and cars tables
SELECT persons.name, persons.surname, persons.age, cars.model FROM persons, cars WHERE persons.id = cars.owner;
-- Join persons and cars tables, skip table names where possible
SELECT name, surname, age, model FROM persons, cars WHERE persons.id = owner;
-- Join persons and cars tables, sort by surname+name
SELECT persons.name, persons.surname, persons.age, cars.model FROM persons, cars WHERE persons.id = cars.owner ORDER BY 2, 1;
-- Join persons and cars tables, sort using aliases
SELECT persons.name as p_name, persons.surname, persons.age as p_age, cars.model FROM persons, cars WHERE persons.id = cars.owner ORDER BY p_age, p_name;
---------- CATEGORY: Parameters -------
-- Parameters in column expressions
SELECT [p];
SELECT [p q];
SELECT [ą]; -- non-latin1 character
SELECT ["];
SELECT ['];
SELECT [`];
SELECT [\];
SELECT [=];
SELECT [*];
SELECT [;];
SELECT [,];
SELECT [(];
SELECT [)];
SELECT [%];
SELECT [p] + [q];
SELECT [p] + [p];
SELECT [p]||[q];
SELECT [p], [q];
SELECT [p], [p]; -- two the same parameters
SELECT [SELECT]; -- keywords as parameter names allowed
SELECT [p]a; -- [p] AS a
SELECT[p]; -- no whitespace needed
SELECT TRIM(name, [c]) FROM persons;
SELECT [c] FROM persons;
-- ERROR: unexpected character after parameter in column expression
SELECT [p]a/2;
SELECT [p][q];
SELECT [p] [q];
-- ERROR: unexpected character in parameter name
SELECT [[];
SELECT [\[];
-- ERROR: empty parameter name
SELECT [];
-- ERROR: parameter in alias name
SELECT [p] AS [q];
-- ERROR: parameter in ORDER BY argument
SELECT * FROM cars ORDER BY [x];
-- Parameters in conditions
SELECT name, surname, age, model FROM persons, cars WHERE persons.id = owner AND model = [Enter model];
SELECT [Enter], name, surname, age, model FROM persons, cars WHERE persons.id = [Enter ID] AND [Enter model] = model;
SELECT * FROM cars WHERE [Boolean condition];
SELECT * FROM cars WHERE [a] < [b];
SELECT FROM cars WHERE [a] < [b];
SELECT LTRIM(name, [c]) FROM persons, cars WHERE persons.id = owner AND name = [Enter model];
-- ERROR: unexpected character in parameter name in condition
SELECT * FROM cars WHERE model = [Boolean condition]a;
-- ERROR: empty parameter name in condition
SELECT * FROM cars WHERE model = [];
|