src code

class method SpahQL.QueryRunner.assert

SpahQL.QueryRunner.assert(query, rootData[, scopeData][, scopePath]) → Boolean result
  • query (SpahQL.Query) – A parsed query instance
  • rootData (Object) – The root data context against which to run the query
  • scopeData (Object) – An optional additional data context which will be the local scope for this query. If not set, will be set internally to rootData.
  • scopePath (String) – An optional path indicating the scope to which this query has been restricted.

Executes and ssserts the truthiness of a selection or assertion query against the given dataset. Returns a boolean indicating the overall result of the query - if the query is not an assertion query, it will return true if the query returns one or more results.