jsonlogic, dal, block, raw, and json, for a value the short spelling cannot say.
Literal forms
Five words introduce a compiled value where the short spelling has no production. Each one is the document the platform stores, written out. The grammar is on Literals.
jsonlogic
A guard is requires, when, or guard jsonlogic { … }. The object may use any operator in the JSONLogic list. if is one of them, and the expression grammar has no spelling for it.
app reviews "Reviews" {}
entity Article {
owner: text
workflow {
initial Draft
states Draft, Published
terminal Published
publish: Draft -> Published guard jsonlogic { if: [{ var: "owner" }, true, false] }
}
}
dal
A query is a select, or dal { … } when you write the statement out. select has no join. This object is an inner join of Lead to Note, and projections: ["Star"] is *. The on value is the predicate. Here that predicate is true, so the line is showing the join itself.
app pipeline "Pipeline" {}
entity Lead {
company: text
}
entity Note {
body: text
}
query joined = dal { Select: { from: { Entity: { name: "Lead" } }, projections: ["Star"], joins: [{ kind: "Inner", source: { Entity: { name: "Note" } }, on: { Literal: { Boolean: true } } }], filter: null, group_by: [], having: null, order: [], limit: null, offset: null } }
block
block <type> [#id] { … } is a block whose type, or whose config, the sugar heads do not cover. #notes pins the id so a reorder keeps it. The sugar heads and the generic form compile to the same kind of block; see Pages.
app notes "Notes" {}
entity Item {
name: text
}
page item "Item" detail Item {
block entity_notes #notes {}
}
raw
name: raw { … } is the field object, including a key the field line has no word for. do raw { … } is an effect written as its action or its binding. An action_type is an engine action. A primitive is a binding, and the trigger is filled in when the object omits it.
app stock "Stock" {}
entity Sku {
code: raw { type: "text", mask: "AAA-000" }
workflow {
initial Open
states Open, Received
terminal Received
receive: Open -> Received {
do raw { action_type: "INVENTORY_RECEIPT", payload_template: { sku: "box" } }
}
}
}
json
json { … } is a block written as the compiled object. A rule uses the same word when it is neither a predicate nor a decision table.
app boards "Boards" {}
rule note json { kind: "custom", body: { anything: [1, 2, 3] } }
page items "Items" list {
json { type: "paragraph", text: "No config key here" }
}