uc-apx create region comments
Insert a themeTemplateComponent/comments region backed by an inline
SQL query — a threaded discussion / status-feed list.
Required mappings: —comment-text-column, —user-name-column, —date-column.
Optional avatar (—avatar-type initials|icon + source), chat styling (—style chatSpeechBubbles + —alignment-column), and per-row actions (—action POS[:LABEL], POS ∈ avatarLink|userNameLink|actions).
uc-apx create region comments [flags]| Flag | Type | Default | Description |
|---|---|---|---|
--action | stringArray | Per-row action POS[:LABEL] (repeatable). POS ∈ avatarLink, userNameLink, actions | |
--alignment-column | string | Column driving inbound/outbound alignment (emitted as &COL.) | |
--apply-theme-colors | Set settings.applyThemeColors (only emitted when the flag is passed) | ||
--attributes | string | Trailing attributes/metadata (static text or substitution, e.g. (&CREATED.)) | |
--avatar-icon | string | Static fa-* class (when —avatar-type icon) | |
--avatar-initials-column | string | Column holding initials (when —avatar-type initials) | |
--avatar-shape | string | Avatar shape: rounded, circular, square (optional) | |
--avatar-type | string | Avatar source type for plugin-avatar: initials or icon | |
--column | string | Comma-separated columns the SQL projects. Syntax: NAME[:TYPE[:LENGTH]] [required] | |
--column-span | int | 12-col grid span for the region’s layout (0 = omit) | |
--comment-text-column | string | Column mapped to the comment body [required] | |
--date-column | string | Column mapped to the comment date [required] | |
--dry-run | Print rendered region to stdout without writing | ||
--entity-plural | string | entityTitle.plural, e.g. comments (optional) | |
--entity-singular | string | entityTitle.singular, e.g. comment (optional) | |
--force | Replace an existing same-id region on the page | ||
--id | string | Region id (default: kebab-case of —name) | |
--name | string | Display name of the region [required] | |
--no-new-row | Emit startNewRow: false so this region sits next to the previous one | ||
--page | string | Target page (numeric ID, alias, or name) [required] | |
--pagination-rows | int | entitiesPerPage for pagination (0 = omit) | |
--pagination-total-count | Set pagination.showTotalCount: true (requires —pagination-rows) | ||
--pk-column | string | Column to flag as the primary key (optional) | |
--row-selection | string | Row selection: multiple, single, or focusOnly | |
--sequence | int | Layout sequence (default: max existing + 10) | |
--slot | string | body | Page slot to place the region in |
--sql | string | Inline SQL query (or @path/to/file.sql; @@ escapes a literal leading @) [required] | |
--style | string | Comments style: chatSpeechBubbles (settings.style) | |
--user-name-column | string | Column mapped to the comment author [required] |
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 |
Example 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 region comments --page 46 --name Discussion --sql select id, body, author, created from comments --column ID:number,BODY,AUTHOR,CREATED:timestamp --pk-column ID --comment-text-column BODY --user-name-column AUTHOR --date-column CREATED --dry-runGenerated APEXlang
region discussion ( name: Discussion type: themeTemplateComponent/comments source { location: localDatabase type: sqlQuery sqlQuery: ```sql select id, body, author, created from comments ``` } layout { sequence: 50 slot: body } appearance { template: @/blank-with-attributes-no-grid templateOptions: #DEFAULT# } componentAppearance { display: report } settings { commentText: BODY userName: AUTHOR date: CREATED }
column ID ( layout { sequence: 10 } source { databaseColumn: ID dataType: number primaryKey: true } )
column BODY ( layout { sequence: 20 } source { databaseColumn: BODY dataType: varchar2 } )
column AUTHOR ( layout { sequence: 30 } source { databaseColumn: AUTHOR dataType: varchar2 } )
column CREATED ( layout { sequence: 40 } source { databaseColumn: CREATED dataType: timestamp } ) )