Commit graph

29 commits

Author SHA1 Message Date
Matt Jaffee
1c1204fc77
modify PQL parser to handle escapes in string values
This modifies the parser to properly "unquote" incoming strings. So if
a string comes in double or single quoted, we approximately follow Go
rules for removing the quotes and processing escape sequences.

The differences from Go are:
1. we only support backslash, quote, tab and newline escape
sequenences.
2. Single quoted strings are supported and work just like double
quoted strings.
3. The peg parser won't actually accept backquoted strings (I don't
think)

Fixes: #411
2020-05-29 07:58:50 -05:00
Travis
963affcc30 WIP: use pql.Decimal instead of float64
This commit introduces a new type: pql.Decimal
We use that instead of float64 in order to ensure
that the string representation is consistent.

One unfortunate discovery during implementation is
that the RowAttrs and ColAttrs support floats, and
the PEG file was treating them as such. So I had
to split the PEG definitions into float-specific
items and decimal-specific items.
2020-03-14 22:33:52 -05:00
Matt Jaffee
9c8ad727b5
allow floats in PQL queries for decimal fields
had to workaround some cruft in the parser that was trying to only
support a BETWEEN query as LTE, LTE. Now we have operations for all
combinations of LT and LTE.

unrelated - changed the port a test was binding to as it conflicted
with a port I was using locally.
2019-11-13 10:07:24 -06:00
Matt Jaffee
a414cada4f
add decimal field support to Inspect
I tested this manually with BloomRPC and curl, but need to write real
tests. Also need to get floats for decimal fields coming out of QueryPQL.
2019-10-30 11:13:48 -05:00
Matt Jaffee
5458a42ad0
add parser rule to catch old-style Range query 2019-04-04 19:46:02 -05:00
Yuce Tekol
dc735c17b8
Fixes #1805. Fixes Store call error messages 2019-01-16 20:52:33 +03:00
Ben Johnson
9d1e5ca8ce
Merge Range() into Row() call.
This commit refactors the `Range()` call and merges its functionality
into the `Row()` call.
2019-01-09 15:10:49 -07:00
Ben Johnson
727659644b
Add GroupBy filter. 2018-12-07 10:35:57 -07:00
Yuce Tekol
44e436f571
removed unused rule from peg grammar 2018-11-09 08:08:43 +03:00
Yuce Tekol
cad9d83c40
fix double escapes 2018-11-07 01:10:58 +03:00
Yuce Tekol
1e30a9372d
Disabled unquoting for single quoted attribute values; updated test 2018-11-06 22:58:37 +03:00
Yuce Tekol
b158f1c378
unquote attribute values 2018-11-06 22:47:09 +03:00
Yuce Tekol
2a8f2c2026
minor grammar fix 2018-11-06 14:09:32 +03:00
Yuce Tekol
3cb3a065dd
allow backlash, carriage return in pql strings 2018-11-01 21:56:34 +03:00
Travis Turner
3d33cdbb74
implement Store() in the executor (i.e. setRow()) 2018-10-05 08:45:07 -05:00
Travis Turner
b6e99734f0
implement ClearRow() query 2018-09-24 15:52:43 -05:00
Travis Turner
dfd529b2f5
update parser to handle row keys on SetRowAttrs() 2018-07-27 10:50:04 -05:00
Ben Johnson
bcd15ef271
peg: Allow single quoted key 'col'. 2018-07-09 18:31:27 +01:00
Matt Jaffee
f757e10255
support newlines in more places 2018-07-03 16:28:51 -05:00
Matt Jaffee
4ab9c66070
allow dashes in frame names 2018-06-26 07:00:13 -05:00
Alan Bernstein
5bf9af4df3 Parser and test updates 2018-06-22 08:07:31 -05:00
Matt Jaffee
205b7620bd
update SetColumnAttrs name 2018-06-20 09:31:20 -05:00
Matt Jaffee
08e84aa07f
time range support 2018-06-19 14:07:03 -05:00
Matt Jaffee
a6b6442ef4
more tests and fix range 2018-06-18 11:32:21 -05:00
Matt Jaffee
23bca175ae
add tests, fix tests, fix bugs 2018-06-15 15:02:41 -05:00
Matt Jaffee
4b856bea55
change parser for new PQL 2018-06-15 12:22:16 -05:00
Matt Jaffee
1e05920742
fuzz testing and bug fixes 2018-06-15 08:34:14 -05:00
Matt Jaffee
3656bc83a0
support quoted strings properly 2018-06-15 08:34:13 -05:00
Matt Jaffee
47233c8bee
replace PQL parser with one created by PEG parser generator 2018-06-15 08:34:12 -05:00