Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Minor version adding more json builtins and an improved built-in system.
This change adds some json builtins and also completely refactors the built-in system to make it more efficient. It also adds some quality of life improvements to the C++ API. The C API remains stable, but the C++ API exposes additional methods to make handling outputs of queries a bit easier.
New Features
json.filter,json.patch, andjson.removeare now availableOutputclass, which is returned from the newquery_outputmethod onInterpreter. It provides methods which are similar to those available in the C API for inspecting the output of a query.try_get_double,try_get_string, andtry_get_boolmethods which will attempt to get raw C++ types from Node objects.whitelistandblacklistmethods inBuiltInsDefprovide fine-grained control over which built-ins are allowed to be loaded.stmt_limitmethod onInterpreterprovides a time-out mechanism (defined as number of statements which the VM is allowed to execute)Improvements
Interpreterobject can now be created at almost no cost. A large portion of its construction cost was the creation of theBuiltInslookup structure, which now is defined statically in-code.Breaking Changes
get_stringmethod, which previously returned the raw string of the Trieste node, now tries to get a string from aJSONStringnode and strips it of its quotes (in line with the otherget_*methods). The previous functionality is available viaget_raw_string.Bug Fixes
SomeDeclin aNotExprregopynow performs some additional checks to ensure it is loading the correct shared library on all platformsCloses #186
Closes #187
Closes #191
Closes #138
Fixes #195
Fixes #196