uc-apx create computation
Splice a computation into a page. The computation writes a value into
the page item named by —item at the chosen execution point. —type picks
the source kind; supported values: function-body, item, plsql-expression, sql-query, static-value.
uc-apx create computation [flags]| Flag | Type | Default | Description |
|---|---|---|---|
--code | string | PL/SQL or SQL body (literal or @path/to/file) for expression/function-body/sql-query | |
--dry-run | Print rendered computation to stdout without writing | ||
--force | Overwrite an existing computation with the same id | ||
--id | string | Construct id (default: kebab-case of —name, or —item lowercase when —name absent) | |
--item | itemName: | Target item name to write into (becomes itemName: on the computation) [required] | |
--name | string | Display name (optional — real exports often omit it; used to derive —id when —id is absent) | |
--page | string | Target page (numeric ID, alias, or name) [required] | |
--point | string | beforeHeader | execution.point: afterFooter, afterHeader, afterRegions, afterSubmit, beforeFooter, beforeHeader, beforeRegions, newSession |
--sequence | int | execution.sequence (default: max existing computation sequence at this point + 10) | |
--source-item | itemName: | Source item name (required when —type item; becomes inner itemName:) | |
--type | string | Computation source kind: function-body, item, plsql-expression, sql-query, static-value [required] | |
--value | string | Literal value (required when —type static-value) |
Global Flags
Section titled “Global Flags”| Flag | Type | Default | Description |
|---|---|---|---|
--app-dir | string | . | Path to the APEX application directory |
--json-pretty | Output in pretty-printed JSON (human-readable) instead of minified JSON | ||
--toon | Output in TOON format (human-readable, token-efficient) instead of JSON |
Examples (from help)
Section titled “Examples (from help)”uc-apx create computation \ --page 50 \ --name "Last viewed customer" \ --item LAST_VIEW \ --type static-value \ --value 50Example Generated APEXlang
Section titled “Example Generated APEXlang”Using --dry-run to preview the generated construct (no files are written):
uc-apx --app-dir examples/brookstrut create computation --page 46 --item P46_NAVIGATION --type static-value --value LIST --dry-runGenerated APEXlang
computation p46_navigation ( itemName: P46_NAVIGATION execution { sequence: 10 point: beforeHeader } computation { type: staticValue staticValue: LIST } )