Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .claude/skills/mendix/bootstrap-app/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,9 @@ with these deltas:
against the host name rather than the listen address:

```sql
alter settings configuration 'Default'
ApplicationRootUrl = 'http://backend.local:8080/';
alter settings configuration 'Default' (
ApplicationRootUrl: 'http://backend.local:8080/'
);
```

`run --local` picks that up at boot and prints which configuration it came from.
Expand Down
6 changes: 3 additions & 3 deletions .claude/skills/mendix/create-page/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ create [or replace] page Module.PageName
page is opened in a pop-up. They are optional — omitting them uses the Mendix defaults
(600 × 600, not resizable). Unlike the other header keywords, these property names are
**case-sensitive** and must be written exactly as shown. They can also be changed later
with `alter page … { set PopupWidth = …; }` (see the alter-page skill).
with `alter page … { set (PopupWidth: …); }` (see the alter-page skill).

**Page CSS class / style** (`Class` / `Style`) set the page's Appearance — a CSS class
and inline style applied to the whole page (e.g. `Class: 'container-fluid bg-light'`).
Both are optional and can be changed later with `alter page … { set Class = '…'; }`.
Both are optional and can be changed later with `alter page … { set (Class: '…'); }`.

**Page Variables**: Local variables at the page level for use in expressions (e.g., column visibility).
- DataType: `boolean`, `string`, `integer`, `decimal`, `datetime`
Expand Down Expand Up @@ -243,7 +243,7 @@ To make targeted changes to an existing page (change a label, add a field, remov
```sql
-- Change a button caption and add a field
alter page Module.Customer_Edit {
set caption = 'Save & Close' on btnSave;
set (caption: 'Save & Close') on btnSave;
insert after txtEmail {
textbox txtPhone (label: 'Phone', attribute: Phone)
}
Expand Down
15 changes: 8 additions & 7 deletions .claude/skills/mendix/demo-data/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,14 @@ For full credentials (username, password):

Example output:
```sql
alter settings configuration 'Default'
DatabaseType = 'PostgreSql',
DatabaseUrl = 'localhost:5434',
DatabaseName = 'mxcli2-dev',
DatabaseUserName = 'mendix',
DatabasePassword = 'mendix',
HttpPortNumber = 8080;
alter settings configuration 'Default' (
DatabaseType: 'PostgreSql',
DatabaseUrl: 'localhost:5434',
DatabaseName: 'mxcli2-dev',
DatabaseUserName: 'mendix',
DatabasePassword: 'mendix',
HttpPortNumber: 8080
);
```

---
Expand Down
2 changes: 1 addition & 1 deletion .claude/skills/mendix/migrate-design-prototype/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ Use `alter page` to attach a class without rewriting the page (see `alter-page`)

```sql
alter page ResourceScheduling.Approvals {
set Class = 'ss-appr-card ss-appr-card--conflict' on queueCard;
set (Class: 'ss-appr-card ss-appr-card--conflict') on queueCard;
}
```

Expand Down
2 changes: 1 addition & 1 deletion .claude/skills/mendix/odata-data-sharing/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Then re-import: `CREATE OR MODIFY EXTERNAL ENTITIES FROM F1Now.NowApi` maps the
new entity sets. Do **not** `DROP CONSUMED ODATA SERVICE` and recreate it to force a
refresh — that invalidates the client ID the existing external entities point at.

Note that `ALTER CONSUMED ODATA SERVICE SET MetadataUrl = …` does *not* re-fetch. Use
Note that `ALTER CONSUMED ODATA SERVICE … SET ( MetadataUrl: … )` does *not* re-fetch. Use
`CREATE OR MODIFY` when the contract is what changed.

**Use Cases for Local Metadata:**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,8 @@ from consumed odata service ShopClient.ShopApiClient
);

-- Toggle the flag without recreating the entity.
alter entity ShopClient.Product set allow_create_change_locally = true;
alter entity ShopClient.Product set allow_create_change_locally = false;
alter entity ShopClient.Product set ( AllowCreateChangeLocally: true );
alter entity ShopClient.Product set ( AllowCreateChangeLocally: false );
```
## Publishing a Non-Persistable Entity (no copy of the data)

Expand Down
104 changes: 55 additions & 49 deletions .claude/skills/mendix/project-settings/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,22 @@ describe settings;
### Modify Model Settings

```sql
alter settings runtime AfterStartupMicroflow = 'Module.MF_Startup'; -- must return Boolean (CE0142)
alter settings runtime BeforeShutdownMicroflow = 'Module.MF_Shutdown';
alter settings runtime HealthCheckMicroflow = 'Module.MF_HealthCheck';
alter settings runtime HashAlgorithm = 'BCrypt';
alter settings runtime BcryptCost = 12;
alter settings runtime JavaVersion = 'Java21'; -- or '21'; see note below
alter settings runtime RoundingMode = 'HalfUp';
alter settings runtime AllowUserMultipleSessions = true;
alter settings runtime ScheduledEventTimeZoneCode = 'Etc/UTC';
alter settings runtime DefaultTimeZoneCode = 'Europe/Amsterdam';
alter settings runtime FirstDayOfWeek = 'Monday'; -- Default, Monday..Sunday
alter settings runtime DecimalScale = 8;
alter settings runtime EnableDataStorageOptimisticLocking = true;
alter settings runtime UseDatabaseForeignKeyConstraints = true;
alter settings runtime UseOQLVersion2 = true;
alter settings runtime SslCertificateAlgorithm = 'PKIX'; -- PKIX or SunX509
alter settings runtime ( AfterStartupMicroflow: 'Module.MF_Startup' ); -- must return Boolean (CE0142)
alter settings runtime ( BeforeShutdownMicroflow: 'Module.MF_Shutdown' );
alter settings runtime ( HealthCheckMicroflow: 'Module.MF_HealthCheck' );
alter settings runtime ( HashAlgorithm: 'BCrypt' );
alter settings runtime ( BcryptCost: 12 );
alter settings runtime ( JavaVersion: 'Java21' ); -- or '21'; see note below
alter settings runtime ( RoundingMode: 'HalfUp' );
alter settings runtime ( AllowUserMultipleSessions: true );
alter settings runtime ( ScheduledEventTimeZoneCode: 'Etc/UTC' );
alter settings runtime ( DefaultTimeZoneCode: 'Europe/Amsterdam' );
alter settings runtime ( FirstDayOfWeek: 'Monday' ); -- Default, Monday..Sunday
alter settings runtime ( DecimalScale: 8 );
alter settings runtime ( EnableDataStorageOptimisticLocking: true );
alter settings runtime ( UseDatabaseForeignKeyConstraints: true );
alter settings runtime ( UseOQLVersion2: true );
alter settings runtime ( SslCertificateAlgorithm: 'PKIX' ); -- PKIX or SunX509
```

**Not every project stores every setting.** Mendix adds model settings over time —
Expand Down Expand Up @@ -97,18 +97,20 @@ configuration, add `DatabasePassword = '…'` yourself.

```sql
-- Full database configuration
alter settings configuration 'Default'
DatabaseType = 'PostgreSql',
DatabaseUrl = 'localhost:5432',
DatabaseName = 'mydb',
DatabaseUserName = 'mendix',
DatabasePassword = 'mendix',
HttpPortNumber = 8080,
ServerPortNumber = 8090;
alter settings configuration 'Default' (
DatabaseType: 'PostgreSql',
DatabaseUrl: 'localhost:5432',
DatabaseName: 'mydb',
DatabaseUserName: 'mendix',
DatabasePassword: 'mendix',
HttpPortNumber: 8080,
ServerPortNumber: 8090
);

-- Update a single field
alter settings configuration 'Default'
DatabaseUrl = 'newhost:5432';
alter settings configuration 'Default' (
DatabaseUrl: 'newhost:5432'
);
```

`HttpPortNumber`, `ServerPortNumber`, `BcryptCost`, `DefaultTaskParallelism` and
Expand Down Expand Up @@ -169,10 +171,11 @@ on shared values only:
create configuration 'Staging';

-- Create with properties
create configuration 'Production'
DatabaseType = 'PostgreSql',
DatabaseUrl = 'prod-db:5432',
HttpPortNumber = 8080;
create configuration 'Production' (
DatabaseType: 'PostgreSql',
DatabaseUrl: 'prod-db:5432',
HttpPortNumber: 8080
);

-- Drop a configuration
drop configuration 'Staging';
Expand All @@ -197,7 +200,7 @@ alter settings LANGUAGE modify 'de_DE' (CheckCompleteness: true);
alter settings LANGUAGE remove 'de_DE';

-- the default must already be enabled
alter settings LANGUAGE DefaultLanguageCode = 'en_US';
alter settings LANGUAGE ( DefaultLanguageCode: 'en_US' );
```

A language is identified by its **code** — "Arabic, Sudan" is derived from
Expand All @@ -213,7 +216,7 @@ A language is identified by its **code** — "Arabic, Sudan" is derived from

**Set the default language BEFORE authoring content.** The default is not only a
fallback — it is the language a new caption is stored under, because Mendix has no
language-neutral text. `alter settings LANGUAGE DefaultLanguageCode = 'nl_NL'`
language-neutral text. `alter settings LANGUAGE (DefaultLanguageCode: 'nl_NL')`
*after* creating a page leaves that page's texts in the old language, and nothing
reports it: `mx check` is 0 errors either way and the symptom shows up only in
Studio Pro, as the empty-caption placeholder plus a "no translation" warning.
Expand All @@ -231,9 +234,10 @@ list.

```sql

alter settings workflows
UserEntity = 'System.User',
DefaultTaskParallelism = 3;
alter settings workflows (
UserEntity: 'System.User',
DefaultTaskParallelism: 3
);
```

### Workflow Groups (Mendix 11.2+)
Expand Down Expand Up @@ -281,24 +285,26 @@ Four things worth knowing:

### PostgreSQL Configuration
```sql
alter settings configuration 'Default'
DatabaseType = 'PostgreSql',
DatabaseUrl = 'localhost:5432',
DatabaseName = 'myapp',
DatabaseUserName = 'mendix',
DatabasePassword = 'mendix',
HttpPortNumber = 8080;
alter settings configuration 'Default' (
DatabaseType: 'PostgreSql',
DatabaseUrl: 'localhost:5432',
DatabaseName: 'myapp',
DatabaseUserName: 'mendix',
DatabasePassword: 'mendix',
HttpPortNumber: 8080
);
```

### SQL Server Configuration
```sql
alter settings configuration 'Default'
DatabaseType = 'SqlServer',
DatabaseUrl = 'localhost:1433',
DatabaseName = 'myapp',
DatabaseUserName = 'sa',
DatabasePassword = 'MyPassword',
HttpPortNumber = 8080;
alter settings configuration 'Default' (
DatabaseType: 'SqlServer',
DatabaseUrl: 'localhost:1433',
DatabaseName: 'myapp',
DatabaseUserName: 'sa',
DatabasePassword: 'MyPassword',
HttpPortNumber: 8080
);
```

## Checklist
Expand Down
2 changes: 1 addition & 1 deletion .claude/skills/mendix/regular-expressions/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ create entity Val.Person (
Code: String(20) unique error message 'Code must be unique'
);

alter entity Val.Person modify attribute Email String(200)
alter entity Val.Person modify attribute Email: String(200)
not null error message 'Email is required';
```

Expand Down
4 changes: 2 additions & 2 deletions .claude/skills/mendix/write-layouts/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ survive. Same operations as `ALTER PAGE`:
```sql
alter layout MyModule.App_Default {
insert into layoutContainer.top { snippetcall bar (snippet: MyModule.SNIPPET_ThemeBar) };
set Content = 'My App' on brandText;
drop widget oldBanner;
set (Content: 'My App') on brandText;
drop oldBanner;
};
```

Expand Down
2 changes: 1 addition & 1 deletion cmd/mxcli/cmd_new.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ Examples:
if lowered, err := alignJavaVersion(mprPath, os.Stdout); err != nil {
fmt.Fprintf(os.Stderr, " Warning: could not align the project's Java version: %v\n", err)
fmt.Fprintln(os.Stderr, " If the first build fails with 'release version NN not supported',")
fmt.Fprintln(os.Stderr, " run: mxcli -p <project>.mpr -c \"alter settings runtime JavaVersion = '21'\"")
fmt.Fprintln(os.Stderr, " run: mxcli -p <project>.mpr -c \"alter settings runtime ( JavaVersion: '21' )\"")
} else if lowered {
fmt.Println()
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/mxcli/cmd_new_java.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ func alignJavaVersion(projectPath string, out io.Writer) (bool, error) {
return false, nil
}

script := fmt.Sprintf("alter settings runtime JavaVersion = '%d';\n", fallback)
script := fmt.Sprintf("alter settings runtime ( JavaVersion: '%d' );\n", fallback)
if err := runMDL(projectPath, script, io.Discard); err != nil {
return false, fmt.Errorf("lowering JavaVersion from %d to %d: %w", major, fallback, err)
}
fmt.Fprintf(out, " Java %d → %d: no JDK %d on this machine, and the project would not build.\n",
major, fallback, major)
fmt.Fprintf(out, " Install a JDK %d and set JavaVersion back to %d to build for it:\n", major, major)
fmt.Fprintf(out, " mxcli -p <project>.mpr -c \"alter settings runtime JavaVersion = '%d'\"\n", major)
fmt.Fprintf(out, " mxcli -p <project>.mpr -c \"alter settings runtime ( JavaVersion: '%d' )\"\n", major)
return true, nil
}
2 changes: 1 addition & 1 deletion cmd/mxcli/docker/detect.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ func resolveJDK(major int) (string, error) {
// be noise.
if major != DefaultJavaMajor {
msg += fmt.Sprintf("\n This is the project's own Settings > Model > JavaVersion. To build for a"+
"\n release you already have instead: mxcli -p <project>.mpr -c \"alter settings runtime JavaVersion = '%d'\"", DefaultJavaMajor)
"\n release you already have instead: mxcli -p <project>.mpr -c \"alter settings runtime ( JavaVersion: '%d' )\"", DefaultJavaMajor)
}
return "", fmt.Errorf("%s", msg)
}
Expand Down
Loading
Loading