Skip to content

Commit e267598

Browse files
akoclaude
andcommitted
docs: add doctype test examples for new configuration commands
Add SHOW CONSTANT VALUES, ALTER SETTINGS DROP CONSTANT, CREATE CONFIGURATION, and DROP CONFIGURATION examples to the doctype test files. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent dc0907a commit e267598

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

mdl-examples/doctype-tests/09-constant-examples.mdl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,19 @@ SHOW CONSTANTS;
9696
SHOW CONSTANTS IN CoTest;
9797
/
9898

99+
/**
100+
* Level 2.3: Show constant values across all configurations
101+
* Displays one row per constant per configuration for easy comparison.
102+
*/
103+
SHOW CONSTANT VALUES;
104+
/
105+
106+
/**
107+
* Level 2.4: Show constant values for a specific module
108+
*/
109+
SHOW CONSTANT VALUES IN CoTest;
110+
/
111+
99112
-- MARK: - Describe Constant
100113

101114
/**

mdl-examples/doctype-tests/14-project-settings-examples.mdl

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,41 @@ CREATE CONSTANT MyModule.ServerUrl TYPE String DEFAULT 'localhost:9092';
7777
ALTER SETTINGS CONSTANT 'MyModule.ServerUrl' VALUE 'kafka:9092'
7878
IN CONFIGURATION 'Default';
7979

80+
/**
81+
* Example 3.2: Remove a constant override (reset to default)
82+
*/
83+
ALTER SETTINGS DROP CONSTANT 'MyModule.ServerUrl' IN CONFIGURATION 'Default';
84+
85+
/**
86+
* Example 3.3: Alternative syntax for removing a constant override
87+
*/
88+
ALTER SETTINGS CONSTANT 'MyModule.ServerUrl' DROP IN CONFIGURATION 'Default';
89+
90+
-- MARK: Create / Drop Configuration
91+
92+
-- ============================================================================
93+
-- PART 3B: Create and Drop Configurations
94+
-- ============================================================================
95+
96+
/**
97+
* Example 3B.1: Create a new configuration with defaults
98+
*/
99+
CREATE CONFIGURATION 'Staging';
100+
101+
/**
102+
* Example 3B.2: Create a configuration with properties
103+
*/
104+
CREATE CONFIGURATION 'Production'
105+
DatabaseType = 'POSTGRESQL',
106+
DatabaseUrl = 'prod-db:5432',
107+
DatabaseName = 'myapp_prod',
108+
HttpPortNumber = 8080;
109+
110+
/**
111+
* Example 3B.3: Drop a configuration
112+
*/
113+
DROP CONFIGURATION 'Staging';
114+
80115
-- MARK: Language Settings
81116

82117
-- ============================================================================
@@ -101,6 +136,9 @@ ALTER SETTINGS WORKFLOWS UserEntity = 'System.User';
101136
-- ALTER SETTINGS MODEL (microflows, hash algorithm, Java version)
102137
-- ALTER SETTINGS CONFIGURATION (database connection, HTTP port)
103138
-- ALTER SETTINGS CONSTANT with IN CONFIGURATION
139+
-- ALTER SETTINGS DROP CONSTANT (remove override, both syntax forms)
140+
-- CREATE CONFIGURATION (with and without properties)
141+
-- DROP CONFIGURATION
104142
-- ALTER SETTINGS LANGUAGE
105143
-- ALTER SETTINGS WORKFLOWS
106144
-- SHOW SETTINGS / DESCRIBE SETTINGS (read-only)

0 commit comments

Comments
 (0)