assertQueryStatement
Function: assertQueryStatement()
assertQueryStatement(
query):void
Defined in: packages/core/src/models/permissions.ts:471
Refuse what the Query operations do not run: DELETE and UPDATE statements, and aggregations
Statements are parsed by WebdaQL and run by the repositories (deleteMany, updateMany), never through the
Query operations exposed to clients; aggregations go through Model.aggregate(). A plain filter and a
SELECT f1, f2.g field list are accepted: the field list projects the results
(queryModelWithPermissions).
Parameters
query
QueryValidator
the parsed client query
Returns
void
Throws
WebdaError.BadRequest for a DELETE or UPDATE statement, or an aggregation