vaticle / typedb-benchmark

TypeDB Simulation and Benchmarking Library
GNU Affero General Public License v3.0
9 stars 15 forks source link

Added logic to separate multiple queries in schema file. #147

Closed james-whiteside closed 1 year ago

james-whiteside commented 1 year ago

What is the goal of this PR?

Currently, a string containing multiple queries will be succesfully executed in TypeDB Studio or Console but will throw an exception in TypeDB Driver Clients due to requiring one API call per query. This means that schema files must contain only one query each, which is not practical for complex and/or modular schemas. While this asymmetry in client behaviour should be addressed, this PR provides a workaround in the meantime that divides a single query string into multiple queries so they can be executed separately.

What are the changes implemented in this PR?

Made modifications to the initSchema method of TypeDBSimulation, which now uses TypeQL.parseQueries rather than TypeQL.parseQuery.