|
3 | 3 |
|
4 | 4 | Available through https://crates.io/crates/typeql. |
5 | 5 | ``` |
6 | | - |
| 6 | + |
7 | 7 | ``` |
8 | 8 |
|
9 | 9 |
|
10 | 10 | ## New Features |
| 11 | +- **Add query end marker** |
| 12 | + |
| 13 | + TypeQL query pipelines cannot be distinguished since query stages can be arbitrarily chained and concatenated. To resolve this, we introduce the `end;` marker. For example: |
| 14 | + ``` |
| 15 | + match ... |
| 16 | + insert ... |
| 17 | + end; |
| 18 | + match ... |
| 19 | + insert... |
| 20 | + ``` |
| 21 | + |
| 22 | + Is now correctly interpretable as two separate match-insert queries! Compared to before: |
| 23 | + ``` |
| 24 | + match ... |
| 25 | + insert ... |
| 26 | + match ... |
| 27 | + insert ... |
| 28 | + ``` |
| 29 | + |
| 30 | + Where it was not clear if this is one match-insert-match-insert pipeline, two match-insert pipelines, or 4 separate queries, or anything in between! |
| 31 | + |
| 32 | + For simplicity, any query can be terminated with an 'end;` marker, though it is redundant in for schema queries and 'fetch' queries: |
| 33 | + ``` |
| 34 | + define ...; |
| 35 | + end; # redundant! |
| 36 | + |
| 37 | + match ... |
| 38 | + insert ... |
| 39 | + end; # not redundant! |
| 40 | + |
| 41 | + match ... |
| 42 | + insert ... |
| 43 | + fetch { ... }; |
| 44 | + end; # redundant! |
| 45 | + ``` |
| 46 | + |
| 47 | + |
| 48 | +- **Add prefix query parser** |
| 49 | + |
| 50 | + We create a "query prefix parsing" API, which attempts to parse the maximal query prefix from the input. |
| 51 | + |
| 52 | + This is designed to help applications like Console consume a single complete query at a time from a set of concatenated queries. |
11 | 53 |
|
12 | 54 |
|
13 | | -## Bugs Fixed |
| 55 | +- **Allow relates overrides to have lists** |
14 | 56 |
|
| 57 | + We fix one syntactic inconsistency, grammatically allowing list overrides for relation's roles: |
| 58 | + ``` |
| 59 | + define |
| 60 | + relation sub-rel, relates sub-role[] as super-role[]; |
| 61 | + ``` |
15 | 62 |
|
16 | | -## Code Refactors |
| 63 | +## Bugs Fixed |
17 | 64 |
|
18 | 65 |
|
19 | | -## Other Improvements |
20 | | -- **Update dependencies reference** |
21 | | - Update dependencies reference to avoid conflicts with TypeDB server. |
| 66 | +## Code Refactors |
| 67 | +- **Refactor grammar: partial rules, cleanup** |
| 68 | + |
| 69 | + We rename rules used for partial parsing to have suffix `_partial` rather than `_no_test` (randomized tests only use complete queries). |
22 | 70 |
|
23 | 71 |
|
| 72 | + |
| 73 | +## Other Improvements |
| 74 | +- **Fix unit test checks** |
| 75 | + |
| 76 | +- **Improve TypeQL syntax errors** |
| 77 | + |
| 78 | +- **Update README.md** |
| 79 | + |
24 | 80 |
|
25 | 81 |
|
0 commit comments