kw load
Contextual keyword — query expression (§5.9)
The list of words: §1.4
Syntax
Query = "from" Pattern "in" Expr { "where" Expr } [ "order" "by" Ord { "," Ord } ]
[ "group" "by" Expr "into" Ident ] [ "skip" Expr ] [ "take" Expr ]
[ "load" "(" IdentList ")" ] [ "select" Expr ] ;Grammar: App. A
Defined in
- 5.9 Query expressions — Form: from x in source (where e)\* (order by e (asc|desc)?, …)?
- 1.4 Keywords — Reserved (cannot be used as names)
- 13.4 Authorisation and policies — The subject of a policy
Examples
let top = from o in db.Order
where o.userId == uid && o.total > MIN_TOTAL
order by o.createdAt desc
skip page * PAGE_SIZE
take PAGE_SIZE
load(items)
let names = from u in users where u.active select u.name // in-memory List
let byRole = from u in users group by u.role into g select (g.key, g.count())Related diagnostics
query-not-sql, data-rights, missing-policy, unknown-policy-target