typeql
typeql copied to clipboard
Introduce a syntax element to explicitly end a query string
Problem to Solve
Currently, parsing of a string containing multiple concatenated queries (as in TypeDB Studio) has the possibility to generate ambiguous results. Specifically: (match, insert) cannot be distinguished from match-insert, and (match-delete, insert) cannot be distinguished from match-delete-insert.
Current Workaround
Interpose dummy queries that do nothing to separate multiple queries interpreted as multiple clauses of the same query.
Proposed Solution
Introduce an end; clause that can be placed after any previous clause to signify the end of a query. If the query up until end; is not correct syntax, then an error is thrown.