concept rule methods: .get_then() does not include curly braces and is missing final semicolon
Description
In the concept rule API, the rule.get_when() method returns a string that includes an outer pair of curly braces around the when statements.
rule.get_then() returns a string without curly braces, and that lacks the final semicolon that would make it a valid typeql statement.
Thanks for the report!
@flyingsilverfin please confirm: As far as I know this is the intended behaviour, because in client-java, RuleImpl internally stores fields when and then as Conjunction<? extends Pattern> and ThingVariable<?>.
However:
- the interface
Rulein client-java abstracts both types away asPattern, which may result in unexpected behaviour for the user - client-python and client-nodejs return strings because they don't have TypeQL libraries
- the return type in client-java is incorrectly documented in the docs (and the docs make no indication that
get_whenwill include outer braces since it's a Conjunction under the hood)
Looks like the internal types in client-java should be made explicit and the docs updated with the correct typings and examples?
Yeah that sounds about right, we should clarify the client docs and internals