Commit Graph

17 Commits

Author SHA1 Message Date
javrucebo 66804a6281 Allow '==' to be parsed as equal operator in expressions.
SQLite allows for this and it is in the same spirit as allowing both != and <>
for non equality.
(see https://sqlite.org/lang_expr.html#collateop)
2018-01-22 18:54:52 +01:00
Lawrence a578842117 Fix order of table_ref 2018-01-17 16:47:57 +01:00
javrucebo daf8fe7a45 Changing Grammar to extend CASE WHEN statement:
- allow multiple WHEN statements
- allow for syntax like `CASE x WHEN 1 THEN 2 WHEN 3 THEN 4 ELSE 5 END`
NOTE: This changes also the way the CASE operator is stored:
- CASE [expr] exprList [ELSE expr2] END
- exprList holds each of the WHEN statements with:
  expr := WHEN, expr2 := THEN

Added also tests in test/select_tests.cpp
and adapted the existing one to reflect the new storage
2018-01-16 00:45:55 +01:00
Moritz Eyssen 09f821e383 Add test for schema ref in FROM 2017-10-12 20:07:30 +02:00
Tim Zimmermann 6a05b8e94b Add enum types for formerly 'simple' operands (#48)
* Add enum types for formerly 'simple' operands

* Use non-semantic names

* Formatting

* Add generated files
2017-06-29 13:40:24 +02:00
Pedro Flemming 128cd74670 fix token generator for negative numbers (#41) 2017-04-25 17:25:00 +02:00
Pedro Flemming 793258f872 Add capability for multi join table references (#40) 2017-04-21 22:03:12 +02:00
Pedro Flemming 6b22e22162 update tests to use the new Parser interface 2017-04-07 16:26:00 +02:00
Pedro Flemming eddd799c26 rename operators to match constant naming style. Move the enum out of Expr 2017-04-06 17:25:47 +02:00
Pedro b7828e698e implement CASE WHEN expressions 2017-03-07 14:55:51 +01:00
Pedro 5605dbab7e implement EXISTS conditional 2017-03-07 14:37:19 +01:00
Pedro cf1c84d46d Add select statement as possible operand in expressions 2017-03-07 14:22:52 +01:00
Pedro 35b8b569eb Implement BETWEEN operator 2017-03-07 13:49:56 +01:00
Pedro 9ecfa8e8f6 Allow function expressions to have variable length of parameters 2017-03-07 02:51:04 +01:00
Pedro f82504b319 Allow order by to define a list of expressions to order by 2017-03-07 02:30:44 +01:00
Pedro 36adab70c5 add 10 tpch style queries and test for them 2017-03-07 02:01:00 +01:00
Pedro 681fbe42d2 refactor tests to use the microtest framework 2017-02-10 21:41:34 +01:00