Expand description
include: expanding pointers into the objects they point at.
The algorithm is upstream’s (RestQuery.js:241-258 for path expansion, :1057-1288 for
execution). Every prefix of every dotted path is materialized and the paths are sorted by
depth, so a parent resolves before its children. Per level, the pointers at that path are
collected and grouped by target class, and one query is issued per target class per level
rather than one per pointer.
The part that is not an optimization: the nested query is a full read against the target class with the caller’s own scope, so the target class’s CLP, its object ACLs and its protected fields all apply. Grafting a row in without that is the classic Parse data leak, because the caller is authorized for the class holding the pointer and not for the class it points at. This module deliberately does not fetch anything; it collects and grafts, and the pipeline owns the read.
include=* is out of scope for 0.2.0 and is refused at parse time. See
crate::query_parse::parse_include.
Functions§
- collect_
pointers - Collect every pointer at
path, walking through arrays. - exclude_
keys_ for_ path - The
excludeKeysan included query inherits (RestQuery.js:1216-1234). - graft
- Replace the pointers at
pathwith the fetched objects. - keys_
for_ path - The
keysan included query inherits (RestQuery.js:1196-1214). - paths_
forced_ by_ projection - The extra include paths
keysandexcludeKeysforce (RestQuery.js:148-183). - shape_
included - Shape a fetched row for grafting:
__typeandclassName, and the_Userstripping.
Type Aliases§
- Pointers
ByClass - Pointers found at one path, grouped by target class, in encounter order.