Commit graph

346 commits

Author SHA1 Message Date
Nickolay Ponomarev
de4ccd3cb7 Fail when expected keyword is not found
Add #[must_use] to warn against unchecked results of parse_keyword/s in
the future.
2019-01-13 01:07:58 +03:00
Nickolay Ponomarev
89cfa9e599 Don't consume a second DoubleColon in parse_pg_cast
The function is invoked after a DoubleColon was already matched.
2019-01-13 01:07:58 +03:00
Nickolay Ponomarev
dce09f8054 Fix a mistake in merge conflict resolution earlier 2019-01-13 00:56:51 +03:00
Andy Grove
ac365bd44e (cargo-release) start next development iteration 0.2.1-alpha.0 2019-01-12 11:23:33 -07:00
Andy Grove
a987503b2c (cargo-release) version 0.2.0 2019-01-12 11:23:20 -07:00
Andy Grove
115c8e5595
Merge pull request #33 from andygrove/not
implement NOT
2019-01-12 11:19:59 -07:00
Andy Grove
c0cafb7308 specialized parser for DEFAULT expression in CREATE TABLE 2019-01-12 11:18:21 -07:00
Andy Grove
777fd4c2ee Merge branch 'master' into not 2019-01-12 11:14:07 -07:00
Andy Grove
a52b59e3ab Merge branch 'fredrikroos-join-support' 2019-01-12 11:11:28 -07:00
Andy Grove
f8c6fa96f4 fix regression 2019-01-12 11:11:18 -07:00
Andy Grove
8c351fe10a Merge branch 'join-support' of https://github.com/fredrikroos/sqlparser-rs into fredrikroos-join-support 2019-01-12 11:09:41 -07:00
Andy Grove
32d53a6b7e Update README 2019-01-12 10:00:00 -07:00
Andy Grove
7233a7e71f (cargo-release) start next development iteration 0.1.11-alpha.0 2019-01-12 09:30:19 -07:00
Andy Grove
81954bffb8 (cargo-release) version 0.1.10 2019-01-12 09:30:08 -07:00
Andy Grove
25718b8028
Merge pull request #34 from nickolay/misc
Miscellaneous fixes
2019-01-12 09:29:11 -07:00
Andy Grove
ab423bc9dc
Merge branch 'master' into join-support 2019-01-12 08:33:12 -07:00
Nickolay Ponomarev
3b13e153a8 Fix parse_time() handling of fractional seconds
There's no Token::Period in such situation, so fractional part (from sec) was silently truncated.

Can't uncomment the test yet, because parse_timestamp() is effectively
unused: the code added to parse_value() in 5abd9e7dec
was wrong as it attempted to handle unquoted date/time literals. One
part of it was commented out earlier, the other can't work as far as I
can see, as it tries to parse a Number token - `([0-9]|\.)+` - as a
timestamp, so I removed it as well.
2019-01-11 02:37:36 +03:00
Nickolay Ponomarev
52277c3025 Remove parse_function_or_pg_cast, since fn(...) :: type is taken care of in parse_infix() 2019-01-11 02:37:36 +03:00
Nickolay Ponomarev
eff92a2dc1 Remove special handling of ::type1::type2 from parse_pg_cast
...it gets handled just as well by the infix parser.
(Add a test while we're at it.)
2019-01-11 02:37:36 +03:00
Nickolay Ponomarev
f21cd697c3 Simplify custom datatypes handling and add a test
1) Simplified the bit in parse_datatype()
2) Made sure it was covered by the test (the "public.year" bit)
2a) ...the rest of changes in the test are to fix incorrect variable
 names: c_name/c_lat/c_lng were copy-pasted from a previous test.
3) Removed the branch from parse_pg_cast, which duplicated what
parse_data_type already handled (added in the same commit even
2007995938 )
2019-01-11 02:37:36 +03:00
Nickolay Ponomarev
7c6e6970fa Simplify the {next|prev|peek}_token functions
Remove `pub` from the "internal" ones. Remove ones that duplicate each
other completely.
2019-01-11 02:37:36 +03:00
Nickolay Ponomarev
2873b0cee2 Combine multiple patterns with the same action in parse_prefix() 2019-01-11 01:49:13 +03:00
Andy Grove
ee1944b9d9 Implemented NOT LIKE 2018-12-16 16:30:32 -07:00
Andy Grove
5d62167d6e rename rex to expr in ASTNode 2018-12-16 14:04:51 -07:00
Andy Grove
7aab880387 implement NOT 2018-12-16 14:03:03 -07:00
Andy Grove
2240dd09ff (cargo-release) start next development iteration 0.1.10-alpha.0 2018-12-16 13:57:25 -07:00
Andy Grove
d0b5d5e882 (cargo-release) version 0.1.9 2018-12-16 13:57:12 -07:00
Andy Grove
e863bc041c cargo fmt, fix compiler warnings 2018-12-16 13:57:01 -07:00
Andy Grove
24af049930
Merge pull request #32 from cswinter/like
Add LIKE operator
2018-12-16 13:54:00 -07:00
Clemens Winter
9d3906d655 Add LIKE token GenericSQLDialect 2018-12-16 11:47:01 -08:00
Clemens Winter
91aa985ed0 Add LIKE operator 2018-12-16 11:26:09 -08:00
Fredrik Roos
72024661a9 More tests and some small bugfixes 2018-11-18 00:53:39 +01:00
Fredrik Roos
7624095738 Support for joins 2018-11-17 15:40:24 +01:00
Andy Grove
face97226b
Merge pull request #27 from virattara/fix_select_semi_colon
consume semi colon at the end of select and delete queries
2018-10-17 17:05:34 -06:00
virattara
9898e99eb2 unit tests for select, delete statements ending with semi colon 2018-10-17 15:54:49 +05:30
virattara
b75a22ce2e consume semi colon at the end of select and delete queries 2018-10-17 15:52:11 +05:30
Andy Grove
70a3ae93c8
Merge pull request #25 from nickolay/master
Support "searched" CASE expressions
2018-10-16 20:03:34 -06:00
Andy Grove
7af4bb55e6 (cargo-release) start next development iteration 0.1.9-alpha.0 2018-10-14 12:27:05 -06:00
Andy Grove
ff4f1f0b94 (cargo-release) version 0.1.8 2018-10-14 12:26:54 -06:00
Andy Grove
7e152cd0a9 revert one timestamp parsing case 2018-10-14 12:26:47 -06:00
Andy Grove
249b99e48f (cargo-release) start next development iteration 0.1.8-alpha.0 2018-10-14 12:13:34 -06:00
Andy Grove
cc5a6c335d (cargo-release) version 0.1.7 2018-10-14 12:13:25 -06:00
Andy Grove
1bb7149670 bug fix 2018-10-14 12:12:23 -06:00
Nickolay Ponomarev
5a396bb9b4 Support "searched" CASE expressions (#15)
https://jakewheat.github.io/sql-overview/sql-2011-foundation-grammar.html#searched-case
2018-10-14 20:45:32 +03:00
Andy Grove
5b7e89225b (cargo-release) start next development iteration 0.1.7-alpha.0 2018-10-14 11:43:13 -06:00
Andy Grove
8554ff1932 (cargo-release) version 0.1.6 2018-10-14 11:43:05 -06:00
Andy Grove
633aeb9162
Merge pull request #26 from virattara/fix_order_limit
fix for queries with both order by and limit
2018-10-14 10:13:22 -06:00
Andy Grove
038698c706
Merge pull request #24 from virattara/feat_paren_expr
added support for expressions with parentheses
2018-10-14 10:12:39 -06:00
virattara
9f47e8ac94 fix for queries with both order by and limit 2018-10-12 16:10:00 +05:30
virattara
94df7c22e6 added support for expressions with parentheses 2018-10-07 14:23:05 +05:30