Skip to content

Commit aa93097

Browse files
akoclaude
andcommitted
docs: add SHOW CONSTANT VALUES and catalog tables to all docs
Update help topics, quick reference, language reference, site docs (catalog schema, show-constants, show-settings), and project-settings skill to document the new SHOW CONSTANT VALUES command and CATALOG.CONSTANTS / CATALOG.CONSTANT_VALUES tables. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 5614b14 commit aa93097

File tree

8 files changed

+79
-2
lines changed

8 files changed

+79
-2
lines changed

.claude/skills/mendix/project-settings.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ ALTER SETTINGS CONFIGURATION 'Default'
5757
### Constant Overrides
5858

5959
```sql
60+
-- View constant values across all configurations
61+
SHOW CONSTANT VALUES;
62+
SHOW CONSTANT VALUES IN MyModule; -- Filter by module
63+
6064
-- Override a constant value in a configuration
6165
ALTER SETTINGS CONSTANT 'BusinessEvents.ServerUrl' VALUE 'kafka:9092'
6266
IN CONFIGURATION 'Default';

cmd/mxcli/help_topics/constant.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ Show constants:
2020
SHOW CONSTANTS; -- All constants
2121
SHOW CONSTANTS IN MyModule; -- Filter by module
2222

23+
Show constant values across configurations:
24+
SHOW CONSTANT VALUES; -- All constants with per-config overrides
25+
SHOW CONSTANT VALUES IN MyModule; -- Filter by module
26+
2327
Describe a constant:
2428
DESCRIBE CONSTANT Module.Name;
2529

docs-site/src/internals/catalog-schema.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,35 @@ CREATE TABLE ENUMERATIONS (
8888
);
8989
```
9090

91+
### CONSTANTS
92+
93+
```sql
94+
CREATE TABLE CONSTANTS (
95+
Id TEXT PRIMARY KEY,
96+
Name TEXT,
97+
QualifiedName TEXT,
98+
ModuleName TEXT,
99+
Folder TEXT,
100+
Description TEXT,
101+
DataType TEXT, -- String, Integer, Boolean, etc.
102+
DefaultValue TEXT,
103+
ExposedToClient INTEGER DEFAULT 0
104+
);
105+
```
106+
107+
### CONSTANT_VALUES
108+
109+
Per-configuration constant overrides. Join with `CONSTANTS` on `ConstantName = QualifiedName`.
110+
111+
```sql
112+
CREATE TABLE CONSTANT_VALUES (
113+
Id INTEGER PRIMARY KEY AUTOINCREMENT,
114+
ConstantName TEXT NOT NULL, -- Qualified: Module.Constant
115+
ConfigurationName TEXT NOT NULL, -- e.g., "Default", "Production"
116+
Value TEXT
117+
);
118+
```
119+
91120
### WORKFLOWS
92121

93122
```sql
@@ -189,4 +218,14 @@ WHERE TargetName = 'Sales.Customer';
189218
-- Full-text search
190219
SELECT name, kind, snippet(STRINGS, 2, '<b>', '</b>', '...', 20)
191220
FROM CATALOG.STRINGS WHERE strings MATCH 'validation error';
221+
222+
-- Find constants exposed to client
223+
SELECT QualifiedName, DataType, DefaultValue FROM CATALOG.CONSTANTS
224+
WHERE ExposedToClient = 1;
225+
226+
-- Compare constant values across configurations
227+
SELECT c.QualifiedName, cv.ConfigurationName, cv.Value
228+
FROM CATALOG.CONSTANTS c
229+
JOIN CATALOG.CONSTANT_VALUES cv ON c.QualifiedName = cv.ConstantName
230+
ORDER BY c.QualifiedName, cv.ConfigurationName;
192231
```

docs-site/src/internals/catalog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ LIMIT 10;
6363
| `PAGES` | Page names, layouts, URLs | `REFRESH CATALOG` |
6464
| `SNIPPETS` | Snippet names | `REFRESH CATALOG` |
6565
| `ENUMERATIONS` | Enumeration names and value counts | `REFRESH CATALOG` |
66+
| `CONSTANTS` | Constant names, types, default values | `REFRESH CATALOG` |
67+
| `CONSTANT_VALUES` | Per-configuration constant overrides | `REFRESH CATALOG` |
6668
| `WORKFLOWS` | Workflow names and activity counts | `REFRESH CATALOG` |
6769
| `ACTIVITIES` | Individual microflow activities | `REFRESH CATALOG FULL` |
6870
| `WIDGETS` | Widget instances across all pages | `REFRESH CATALOG FULL` |

docs-site/src/reference/query/show-constants.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@
44

55
SHOW CONSTANTS [IN <module>]
66

7+
SHOW CONSTANT VALUES [IN <module>]
8+
79
## Description
810

911
Lists constants defined in the project. Without the `IN` clause, lists all constants across all modules. With `IN <module>`, restricts the listing to constants in the specified module.
1012

1113
Constants are named values (strings, integers, booleans, etc.) that can be configured per deployment environment. They are typically used for API URLs, feature flags, and configuration values.
1214

15+
`SHOW CONSTANT VALUES` shows one row per constant per configuration, making it easy to compare constant overrides across configurations (e.g., Default, Acceptance, Production). Each constant's default value is shown first, followed by any per-configuration overrides.
16+
1317
## Parameters
1418

1519
*module*
@@ -29,6 +33,18 @@ List constants in a specific module:
2933
SHOW CONSTANTS IN MyModule
3034
```
3135

36+
Compare constant values across all configurations:
37+
38+
```sql
39+
SHOW CONSTANT VALUES
40+
```
41+
42+
Compare constant values for a specific module:
43+
44+
```sql
45+
SHOW CONSTANT VALUES IN MyModule
46+
```
47+
3248
## See Also
3349

34-
[SHOW MODULES](show-modules.md), [SHOW STRUCTURE](show-structure.md)
50+
[SHOW MODULES](show-modules.md), [SHOW STRUCTURE](show-structure.md), [SHOW / DESCRIBE SETTINGS](../settings/show-settings.md)

docs-site/src/reference/settings/show-settings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ DESCRIBE SETTINGS WORKFLOWS;
6161

6262
## See Also
6363

64-
[ALTER SETTINGS](alter-settings.md)
64+
[ALTER SETTINGS](alter-settings.md), [SHOW CONSTANT VALUES](../query/show-constants.md)

docs/01-project/MDL_QUICK_REFERENCE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ ALTER ENTITY Sales.Customer
6767
| Statement | Syntax | Notes |
6868
|-----------|--------|-------|
6969
| Show constants | `SHOW CONSTANTS [IN Module];` | List all or filter by module |
70+
| Show constant values | `SHOW CONSTANT VALUES [IN Module];` | Compare values across configurations |
7071
| Describe constant | `DESCRIBE CONSTANT Module.Name;` | Full MDL output |
7172
| Create constant | `CREATE [OR MODIFY] CONSTANT Module.Name TYPE DataType DEFAULT 'value';` | String, Integer, Boolean, etc. |
7273
| Drop constant | `DROP CONSTANT Module.Name;` | |

docs/05-mdl-specification/01-language-reference.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,6 +1163,14 @@ SHOW SETTINGS -- Overview of all settings
11631163
DESCRIBE SETTINGS -- Full MDL output (round-trippable)
11641164
```
11651165

1166+
### SHOW CONSTANT VALUES
1167+
1168+
```sql
1169+
SHOW CONSTANT VALUES [IN Module] -- Compare constant values across configurations
1170+
```
1171+
1172+
Displays one row per constant per configuration. Shows the default value followed by any per-configuration overrides.
1173+
11661174
### ALTER SETTINGS
11671175

11681176
```sql
@@ -1178,6 +1186,9 @@ ALTER SETTINGS WORKFLOWS Key = Value;
11781186
ALTER SETTINGS MODEL AfterStartupMicroflow = 'MyModule.ACT_Startup';
11791187
ALTER SETTINGS CONFIGURATION 'default' DatabaseType = 'POSTGRESQL';
11801188
ALTER SETTINGS LANGUAGE DefaultLanguageCode = 'en_US';
1189+
1190+
-- View constant values across all configurations
1191+
SHOW CONSTANT VALUES;
11811192
```
11821193

11831194
---

0 commit comments

Comments
 (0)