CelEnvironment class
The variable environment of one evaluation (05 §3.5).
Constructors
-
CelEnvironment({required DateTime requestTime, RecordLookup? lookup, String? userId, String? accountType, Map<
String, Object?> claims = const {}, Map<String, Object?> ? record, Map<String, Object?> ? newRecord, List<String> ? changedFields, Map<String, Object?> params = const {}, Set<String> owned = const {}, Map<String, Object?> ? fieldTypes, Map<String, Object?> ? claimTypes, Map<String, Object?> ? paramTypes})
Properties
- accountType → String?
-
user.accountType—guestorfull; null when unauthenticated.final -
changedFields
→ List<
String> ? -
What
changedFields()returns: changedFieldNames for this update; absent outside update evaluation.final -
claims
→ Map<
String, Object?> -
user.claims.<name>— the custom-claim snapshot; an absent claim is null (has()is false).final -
claimTypes
→ Map<
String, Object?> ? -
The declared custom-claim types, by name; read only when fieldTypes
is given.
final
-
fieldTypes
→ Map<
String, Object?> ? -
The declared type of each
recordandnewRecordfield, by name (a map subfield bymap.subfield), as the platform's rules engine types them ({kind, element?, …}; celFieldTypes builds them from a model's fields). Given, the evaluation is the platform's own (evaluate.ts): every wire value is read aswireToValuereads it — a declared timestamp is an instant whatever its fraction digits, a declared double is a double and any other whole number an integer (so10.0on the web, or5.0in an integer field, reads as FFX reads it), a declared list types its items, and a deeper path no type declares is an evaluation error — every instant counts whole milliseconds (Date.parse), and strings order by UTF-16 code units (JavaScript's<). Null keeps the schema-free reading the emulator uses: microseconds and code-point order (05 §3.3).final - hashCode → int
-
The hash code for this object.
no setterinherited
- lookup → RecordLookup?
-
final
-
newRecord
→ Map<
String, Object?> ? -
The resolved proposed update; absent outside update evaluation.
final
-
owned
→ Set<
String> -
The unlocks the end user owns, which
owns("…")reads (05 §3.4).final -
params
→ Map<
String, Object?> -
params.<name>— the executed named query's params (list/subscribe only; empty for every other operation).final -
paramTypes
→ Map<
String, Object?> ? -
The declared query param types, by name; read only when fieldTypes
is given.
final
-
record
→ Map<
String, Object?> ? -
record.<field>— the bound wire document including the system fieldsid,createdAt,updatedAt,version(05 §2.2). Null when no record is bound, in which case anyrecordread is an evaluation error.final - requestTime → DateTime
-
request.time— server receive time, fixed once per request.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- userId → String?
-
user.id; null when the request is unauthenticated (05 §2.4).final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited