How to use QueryBuilder?

I came across the context.createQueryBuilder method. How do I use it, in what situations and can it work with created form records that aren’t stored in the models yet?

context.createQueryBuilder method can be used to create dynamic queries for a model inside a view. It mostly used for complex queries, the ones that are not possible via platform query config page. However, this method cannot be used to query the records that aren’t saved in db.


For querying records (or json-objects in general) that are not yet persisted, you could make use of json-path which is available via context.jsonpath