air-dml 2.1.9 → 2.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -15
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -120,8 +120,26 @@ Table table_name [alias: "論理名", pos_x: 100, pos_y: 200, color: "#1976D2"]
|
|
|
120
120
|
| `unique` | Unique constraint | `email varchar [unique]` |
|
|
121
121
|
| `not null` | NOT NULL constraint | `name varchar [not null]` |
|
|
122
122
|
| `increment` | Auto increment | `id integer [pk, increment]` |
|
|
123
|
+
| `hidden` | Hide column in canvas | `MANDT varchar [hidden]` |
|
|
123
124
|
| `alias: "name"` | Logical name | `[alias: "ユーザーID"]` |
|
|
124
125
|
| `note: "desc"` | Column description | `[note: "説明"]` |
|
|
126
|
+
| `values: "k=v/..."` | Enum / classification values | `[values: "1=有効/2=無効"]` |
|
|
127
|
+
| `default: "val"` | Default value | `[default: "active"]` |
|
|
128
|
+
|
|
129
|
+
#### `values:` — Enum / Classification Values
|
|
130
|
+
|
|
131
|
+
Define allowed values for a column (status codes, flags, etc.):
|
|
132
|
+
|
|
133
|
+
```dbml
|
|
134
|
+
status varchar(1) [
|
|
135
|
+
not null,
|
|
136
|
+
alias: "ステータス",
|
|
137
|
+
values: "1=有効/2=無効/3=削除済",
|
|
138
|
+
default: "1"
|
|
139
|
+
]
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Format: `"key=label/key2=label2/..."` — key and label separated by `=`, entries separated by `/`.
|
|
125
143
|
|
|
126
144
|
### Relationships
|
|
127
145
|
|
|
@@ -176,7 +194,7 @@ Table subscriptions [alias: "定期購入"] {
|
|
|
176
194
|
id serial [pk, alias: "定期購入ID"]
|
|
177
195
|
user_id integer [fk, not null, alias: "ユーザーID"]
|
|
178
196
|
product_id integer [fk, not null, alias: "商品ID"]
|
|
179
|
-
status
|
|
197
|
+
status varchar(1) [not null, alias: "ステータス", values: "1=有効/2=停止/3=解約", default: "1"]
|
|
180
198
|
created_at timestamp [not null, alias: "作成日時"]
|
|
181
199
|
}
|
|
182
200
|
|
|
@@ -184,6 +202,9 @@ Ref: subscriptions.user_id > users.id
|
|
|
184
202
|
Ref: subscriptions.product_id > products.id
|
|
185
203
|
```
|
|
186
204
|
|
|
205
|
+
**Use `values:` for any column with a fixed set of allowed values** (status, type, flag, etc.).
|
|
206
|
+
Format: `"key=label/key2=label2/..."` with `/` separator.
|
|
207
|
+
|
|
187
208
|
For complete AI generation guidelines, see [SPECIFICATION.md Section 5](./SPECIFICATION.md#5-ai生成時のガイドライン).
|
|
188
209
|
|
|
189
210
|
## API Reference
|
|
@@ -245,7 +266,10 @@ interface Column {
|
|
|
245
266
|
unique?: boolean;
|
|
246
267
|
notNull?: boolean;
|
|
247
268
|
increment?: boolean;
|
|
269
|
+
hidden?: boolean; // v2.1.8+
|
|
248
270
|
note?: string;
|
|
271
|
+
values?: string; // v2.1.9+ — "key=label/key2=label2/..."
|
|
272
|
+
defaultValue?: string; // v2.1.9+
|
|
249
273
|
leadingComments?: string[]; // v1.2.0+
|
|
250
274
|
}
|
|
251
275
|
|
|
@@ -291,30 +315,43 @@ interface Area {
|
|
|
291
315
|
|
|
292
316
|
## Changelog
|
|
293
317
|
|
|
318
|
+
### v2.1.9 (2026-04)
|
|
319
|
+
- Added `values: "key=label/..."` column attribute for enum/classification values
|
|
320
|
+
- Added `default: "value"` column attribute (redesigned with double-quote consistency)
|
|
321
|
+
- SAP R/3 namespace support: `/NAMESPACE/FIELDNAME` identifiers in lexer
|
|
322
|
+
|
|
323
|
+
### v2.1.8 (2026-04)
|
|
324
|
+
- Added `hidden` column attribute to hide columns from canvas display
|
|
325
|
+
|
|
326
|
+
### v2.1.7 (2026-04)
|
|
327
|
+
- Fixed: attribute keywords (`alias`, `note`, etc.) now usable as column names
|
|
328
|
+
|
|
329
|
+
### v2.1.6 (2026-03)
|
|
330
|
+
- Fixed: top-level keywords (`project`, `table`, `ref`, `area`) now usable as column names
|
|
331
|
+
|
|
332
|
+
### v2.1.5 (2026-03)
|
|
333
|
+
- Fixed: multi-word type names (e.g. `timestamp with time zone`) correctly quoted in export
|
|
334
|
+
|
|
335
|
+
### v2.1.4 (2026-03)
|
|
336
|
+
- Added SQL standard type names to PostgreSQL (character varying, time with time zone, etc.)
|
|
337
|
+
|
|
338
|
+
### v2.1.3 (2026-03)
|
|
339
|
+
- Expanded data type lists for all 8 databases (PostgreSQL, MySQL, Oracle, SQL Server, SQLite, BigQuery, Redshift, Snowflake)
|
|
340
|
+
|
|
341
|
+
### v2.1.2 (2026-03)
|
|
342
|
+
- Added Snowflake database type support
|
|
343
|
+
|
|
294
344
|
### v2.1.0 (2025-01)
|
|
295
|
-
- **Breaking**: Removed `default` column constraint
|
|
296
|
-
- Simplified parser by removing inconsistent quote handling for default values
|
|
345
|
+
- **Breaking**: Removed `default` column constraint (re-added in v2.1.9 with double-quote consistency)
|
|
297
346
|
|
|
298
347
|
### v2.0.0 (2025-01)
|
|
299
348
|
- **Major**: Replaced `@dbml/core` dependency with custom hand-written recursive descent parser
|
|
300
349
|
- Full AIR-DML syntax support without external dependencies
|
|
301
350
|
- Improved error messages in Japanese
|
|
302
|
-
- Better handling of Japanese identifiers and comments
|
|
303
|
-
|
|
304
|
-
### v1.2.3 (2025-01)
|
|
305
|
-
- Bug fixes for Area parsing with Japanese names
|
|
306
|
-
- Improved comment preservation
|
|
307
|
-
- Added AI generation guidelines to specification
|
|
308
351
|
|
|
309
352
|
### v1.2.0 (2025-01)
|
|
310
353
|
- Added leading comment preservation for Tables, References, and Areas
|
|
311
354
|
- Added `leadingComments` field to type definitions
|
|
312
|
-
- Export comments back to AIR-DML format
|
|
313
|
-
|
|
314
|
-
### v1.1.0 (2025-01)
|
|
315
|
-
- Added `labelHorizontal` and `labelVertical` attributes for Areas
|
|
316
|
-
- Added `swapEdge` attribute for References
|
|
317
|
-
- Improved Area attribute parsing
|
|
318
355
|
|
|
319
356
|
### v1.0.0 (2025-01)
|
|
320
357
|
- Initial release
|