drizzle-docs-generator 0.1.1 → 0.3.0
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.ja.md +67 -8
- package/README.md +62 -3
- package/dist/adapter/index.d.ts +10 -0
- package/dist/adapter/index.d.ts.map +1 -0
- package/dist/adapter/types.d.ts +40 -0
- package/dist/adapter/types.d.ts.map +1 -0
- package/dist/adapter/v0-adapter.d.ts +73 -0
- package/dist/adapter/v0-adapter.d.ts.map +1 -0
- package/dist/adapter/v0-adapter.js +136 -0
- package/dist/adapter/v0-adapter.js.map +1 -0
- package/dist/adapter/v1-adapter.d.ts +40 -0
- package/dist/adapter/v1-adapter.d.ts.map +1 -0
- package/dist/adapter/v1-adapter.js +83 -0
- package/dist/adapter/v1-adapter.js.map +1 -0
- package/dist/cli/index.js +213 -40
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/integration-test-utils.d.ts +19 -0
- package/dist/cli/integration-test-utils.d.ts.map +1 -0
- package/dist/formatter/dbml-builder.d.ts +29 -0
- package/dist/formatter/dbml-builder.d.ts.map +1 -0
- package/dist/formatter/dbml-builder.js +39 -0
- package/dist/formatter/dbml-builder.js.map +1 -0
- package/dist/formatter/dbml.d.ts +81 -0
- package/dist/formatter/dbml.d.ts.map +1 -0
- package/dist/formatter/dbml.js +163 -0
- package/dist/formatter/dbml.js.map +1 -0
- package/dist/formatter/index.d.ts +7 -0
- package/dist/formatter/index.d.ts.map +1 -0
- package/dist/formatter/markdown.d.ts +125 -0
- package/dist/formatter/markdown.d.ts.map +1 -0
- package/dist/formatter/markdown.js +235 -0
- package/dist/formatter/markdown.js.map +1 -0
- package/dist/formatter/mermaid.d.ts +102 -0
- package/dist/formatter/mermaid.d.ts.map +1 -0
- package/dist/formatter/mermaid.js +177 -0
- package/dist/formatter/mermaid.js.map +1 -0
- package/dist/formatter/types.d.ts +37 -0
- package/dist/formatter/types.d.ts.map +1 -0
- package/dist/generator/common.d.ts +109 -211
- package/dist/generator/common.d.ts.map +1 -1
- package/dist/generator/common.js +252 -481
- package/dist/generator/common.js.map +1 -1
- package/dist/generator/index.d.ts +2 -1
- package/dist/generator/index.d.ts.map +1 -1
- package/dist/generator/mysql.js +3 -3
- package/dist/generator/pg.d.ts +8 -7
- package/dist/generator/pg.d.ts.map +1 -1
- package/dist/generator/pg.js +29 -31
- package/dist/generator/pg.js.map +1 -1
- package/dist/generator/sqlite.js +3 -3
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -9
- package/dist/index.js.map +1 -1
- package/dist/test-utils/cli-runner.d.ts +4 -0
- package/dist/test-utils/cli-runner.d.ts.map +1 -1
- package/dist/test-utils/dbml-validator.d.ts +37 -0
- package/dist/test-utils/dbml-validator.d.ts.map +1 -1
- package/dist/types.d.ts +132 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +4 -2
|
@@ -1,60 +1,71 @@
|
|
|
1
1
|
import { AnyColumn, Table } from 'drizzle-orm';
|
|
2
2
|
import { TableRelationalConfig } from 'drizzle-orm/relations';
|
|
3
|
-
import { GeneratedRef, GenerateOptions } from '../types';
|
|
3
|
+
import { GeneratedRef, GenerateOptions, IntermediateSchema, TableDefinition, ColumnDefinition, IndexDefinition, ConstraintDefinition, RelationDefinition, EnumDefinition, DatabaseType } from '../types';
|
|
4
4
|
import { SchemaComments } from '../parser/comments';
|
|
5
5
|
import { SchemaRelations } from '../parser/relations';
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
* This is a simplified type - the actual structure is more complex
|
|
7
|
+
* Configuration for different database dialects
|
|
9
8
|
*/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
9
|
+
export interface DialectConfig {
|
|
10
|
+
escapeName: (name: string) => string;
|
|
11
|
+
isIncrement: (column: AnyColumn) => boolean;
|
|
12
|
+
}
|
|
14
13
|
/**
|
|
15
|
-
*
|
|
14
|
+
* Configuration for an index definition
|
|
16
15
|
*/
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
* Decrease the indentation level by one (minimum 0)
|
|
27
|
-
* @returns This instance for method chaining
|
|
28
|
-
*/
|
|
29
|
-
dedent(): this;
|
|
30
|
-
/**
|
|
31
|
-
* Add a line with the current indentation level
|
|
32
|
-
* @param content - The content to add (empty string adds a blank line)
|
|
33
|
-
* @returns This instance for method chaining
|
|
34
|
-
*/
|
|
35
|
-
line(content?: string): this;
|
|
36
|
-
/**
|
|
37
|
-
* Build the final DBML string from all added lines
|
|
38
|
-
* @returns The complete DBML content as a string
|
|
39
|
-
*/
|
|
40
|
-
build(): string;
|
|
16
|
+
export interface IndexConfig {
|
|
17
|
+
config: {
|
|
18
|
+
columns: Array<{
|
|
19
|
+
name: string;
|
|
20
|
+
}>;
|
|
21
|
+
name?: string;
|
|
22
|
+
unique: boolean;
|
|
23
|
+
using?: string;
|
|
24
|
+
};
|
|
41
25
|
}
|
|
42
26
|
/**
|
|
43
|
-
* Configuration for
|
|
27
|
+
* Configuration for a primary key constraint
|
|
44
28
|
*/
|
|
45
|
-
export interface
|
|
46
|
-
|
|
47
|
-
|
|
29
|
+
export interface PrimaryKeyConfig {
|
|
30
|
+
columns: Array<{
|
|
31
|
+
name: string;
|
|
32
|
+
}>;
|
|
33
|
+
name?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Configuration for a unique constraint
|
|
37
|
+
*/
|
|
38
|
+
export interface UniqueConstraintConfig {
|
|
39
|
+
columns: Array<{
|
|
40
|
+
name: string;
|
|
41
|
+
}>;
|
|
42
|
+
name?: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Configuration for a foreign key constraint
|
|
46
|
+
*/
|
|
47
|
+
export interface ForeignKeyConfig {
|
|
48
|
+
reference: () => {
|
|
49
|
+
columns: Array<{
|
|
50
|
+
name: string;
|
|
51
|
+
}>;
|
|
52
|
+
foreignColumns: Array<{
|
|
53
|
+
name: string;
|
|
54
|
+
}>;
|
|
55
|
+
foreignTable: Table;
|
|
56
|
+
};
|
|
57
|
+
name?: string;
|
|
58
|
+
onDelete?: string;
|
|
59
|
+
onUpdate?: string;
|
|
48
60
|
}
|
|
49
61
|
/**
|
|
50
62
|
* Table configuration extracted from Drizzle tables
|
|
51
|
-
* Using 'any' types for dialect-agnostic handling
|
|
52
63
|
*/
|
|
53
64
|
export interface TableConfig {
|
|
54
|
-
indexes:
|
|
55
|
-
primaryKeys:
|
|
56
|
-
uniqueConstraints:
|
|
57
|
-
foreignKeys:
|
|
65
|
+
indexes: IndexConfig[];
|
|
66
|
+
primaryKeys: PrimaryKeyConfig[];
|
|
67
|
+
uniqueConstraints: UniqueConstraintConfig[];
|
|
68
|
+
foreignKeys: ForeignKeyConfig[];
|
|
58
69
|
}
|
|
59
70
|
/**
|
|
60
71
|
* Base generator class for DBML generation
|
|
@@ -102,24 +113,6 @@ export declare abstract class BaseGenerator<TSchema extends Record<string, unkno
|
|
|
102
113
|
* @returns True if value is a Drizzle table
|
|
103
114
|
*/
|
|
104
115
|
protected isTable(value: unknown): boolean;
|
|
105
|
-
/**
|
|
106
|
-
* Get all v0 relations from schema (legacy relations() API)
|
|
107
|
-
*
|
|
108
|
-
* Extracts legacy relations defined using the old relations() API.
|
|
109
|
-
* These are identified by having 'table' and 'config' properties.
|
|
110
|
-
*
|
|
111
|
-
* @returns Array of legacy relation objects
|
|
112
|
-
*/
|
|
113
|
-
protected getV0Relations(): LegacyRelations[];
|
|
114
|
-
/**
|
|
115
|
-
* Check if a value is a Drizzle v0 relations object (from relations())
|
|
116
|
-
*
|
|
117
|
-
* Validates the legacy relations() format by checking for 'table' and 'config' properties.
|
|
118
|
-
*
|
|
119
|
-
* @param value - The value to check
|
|
120
|
-
* @returns True if value is a legacy relations object
|
|
121
|
-
*/
|
|
122
|
-
protected isV0Relations(value: unknown): boolean;
|
|
123
116
|
/**
|
|
124
117
|
* Check if a value is a v1 relation entry (from defineRelations())
|
|
125
118
|
*
|
|
@@ -149,16 +142,6 @@ export declare abstract class BaseGenerator<TSchema extends Record<string, unkno
|
|
|
149
142
|
* @returns True if value is a full defineRelations() result
|
|
150
143
|
*/
|
|
151
144
|
protected isV1DefineRelationsResult(value: unknown): boolean;
|
|
152
|
-
/**
|
|
153
|
-
* Generate a table definition in DBML format
|
|
154
|
-
*
|
|
155
|
-
* Creates the complete table definition including columns, indexes, constraints,
|
|
156
|
-
* and table-level comments. Also collects foreign keys if not in relational mode.
|
|
157
|
-
*
|
|
158
|
-
* @param dbml - The DBML builder to add the table to
|
|
159
|
-
* @param table - The Drizzle table to generate
|
|
160
|
-
*/
|
|
161
|
-
protected generateTable(dbml: DbmlBuilder, table: Table): void;
|
|
162
145
|
/**
|
|
163
146
|
* Get table configuration from a Drizzle table
|
|
164
147
|
*
|
|
@@ -170,41 +153,13 @@ export declare abstract class BaseGenerator<TSchema extends Record<string, unkno
|
|
|
170
153
|
*/
|
|
171
154
|
protected getTableConfig(table: Table): TableConfig | undefined;
|
|
172
155
|
/**
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
* Creates a column line with type and attributes (primary key, not null, unique, etc.)
|
|
176
|
-
* and includes column-level comments if available.
|
|
177
|
-
*
|
|
178
|
-
* @param dbml - The DBML builder to add the column to
|
|
179
|
-
* @param column - The Drizzle column to generate
|
|
180
|
-
* @param tableName - Optional table name for looking up comments
|
|
181
|
-
*/
|
|
182
|
-
protected generateColumn(dbml: DbmlBuilder, column: AnyColumn, tableName?: string): void;
|
|
183
|
-
/**
|
|
184
|
-
* Get the SQL type for a column
|
|
185
|
-
*
|
|
186
|
-
* @param column - The column to get the SQL type from
|
|
187
|
-
* @returns The SQL type string (e.g., "varchar", "integer")
|
|
188
|
-
*/
|
|
189
|
-
protected getColumnType(column: AnyColumn): string;
|
|
190
|
-
/**
|
|
191
|
-
* Get column attributes for DBML
|
|
192
|
-
*
|
|
193
|
-
* Extracts attributes like primary key, not null, unique, increment, default value,
|
|
194
|
-
* and note from the column. Uses column metadata and comments if available.
|
|
195
|
-
*
|
|
196
|
-
* @param column - The column to get attributes from
|
|
197
|
-
* @param tableName - Optional table name for looking up comments
|
|
198
|
-
* @returns Array of attribute strings for DBML format
|
|
199
|
-
*/
|
|
200
|
-
protected getColumnAttributes(column: AnyColumn, tableName?: string): string[];
|
|
201
|
-
/**
|
|
202
|
-
* Format attributes into a string
|
|
156
|
+
* Map Drizzle's internal table config to our typed TableConfig
|
|
203
157
|
*
|
|
204
|
-
*
|
|
205
|
-
*
|
|
158
|
+
* Note: Drizzle ORM's columns type is `SQL<unknown> | IndexedColumn` union,
|
|
159
|
+
* so we use `{ name?: string }` and cast to access the name property.
|
|
160
|
+
* This is unavoidable due to Drizzle's internal type structure.
|
|
206
161
|
*/
|
|
207
|
-
|
|
162
|
+
private mapTableConfig;
|
|
208
163
|
/**
|
|
209
164
|
* Get the default value for a column
|
|
210
165
|
*
|
|
@@ -215,16 +170,6 @@ export declare abstract class BaseGenerator<TSchema extends Record<string, unkno
|
|
|
215
170
|
* @returns Formatted default value string or undefined
|
|
216
171
|
*/
|
|
217
172
|
protected getDefaultValue(column: AnyColumn): string | undefined;
|
|
218
|
-
/**
|
|
219
|
-
* Generate indexes block from table configuration
|
|
220
|
-
*
|
|
221
|
-
* Creates the indexes block containing primary keys, unique constraints,
|
|
222
|
-
* and regular indexes with their respective attributes.
|
|
223
|
-
*
|
|
224
|
-
* @param dbml - The DBML builder to add the indexes block to
|
|
225
|
-
* @param tableConfig - The table configuration containing index information
|
|
226
|
-
*/
|
|
227
|
-
protected generateIndexesBlock(dbml: DbmlBuilder, tableConfig: TableConfig): void;
|
|
228
173
|
/**
|
|
229
174
|
* Collect foreign keys from table configuration
|
|
230
175
|
*
|
|
@@ -234,7 +179,7 @@ export declare abstract class BaseGenerator<TSchema extends Record<string, unkno
|
|
|
234
179
|
* @param tableName - The name of the source table
|
|
235
180
|
* @param foreignKeys - Array of foreign key definitions from table config
|
|
236
181
|
*/
|
|
237
|
-
protected collectForeignKeysFromConfig(tableName: string, foreignKeys:
|
|
182
|
+
protected collectForeignKeysFromConfig(tableName: string, foreignKeys: ForeignKeyConfig[]): void;
|
|
238
183
|
/**
|
|
239
184
|
* Parse a foreign key into a GeneratedRef
|
|
240
185
|
*
|
|
@@ -243,141 +188,95 @@ export declare abstract class BaseGenerator<TSchema extends Record<string, unkno
|
|
|
243
188
|
*
|
|
244
189
|
* @param tableName - The name of the source table
|
|
245
190
|
* @param fk - The foreign key definition to parse
|
|
246
|
-
* @returns GeneratedRef object
|
|
247
|
-
*/
|
|
248
|
-
protected parseForeignKey(tableName: string, fk: unknown): GeneratedRef | undefined;
|
|
249
|
-
/**
|
|
250
|
-
* Get a mapping from variable names to table names in the schema
|
|
251
|
-
*
|
|
252
|
-
* Creates a map from TypeScript variable names (e.g., "usersTable") to
|
|
253
|
-
* actual database table names (e.g., "users").
|
|
254
|
-
*
|
|
255
|
-
* @returns Map of variable names to table names
|
|
191
|
+
* @returns GeneratedRef object
|
|
256
192
|
*/
|
|
257
|
-
protected
|
|
193
|
+
protected parseForeignKey(tableName: string, fk: ForeignKeyConfig): GeneratedRef;
|
|
258
194
|
/**
|
|
259
|
-
*
|
|
195
|
+
* Create the appropriate relation adapter based on schema contents
|
|
260
196
|
*
|
|
261
|
-
*
|
|
262
|
-
*
|
|
197
|
+
* Detects whether v1 or v0 relations are present and returns the
|
|
198
|
+
* corresponding adapter implementation.
|
|
263
199
|
*
|
|
264
|
-
* @
|
|
265
|
-
* @returns Map of property names to column names
|
|
200
|
+
* @returns RelationAdapter instance (V1RelationAdapter or V0RelationAdapter)
|
|
266
201
|
*/
|
|
267
|
-
|
|
202
|
+
private createRelationAdapter;
|
|
268
203
|
/**
|
|
269
|
-
*
|
|
204
|
+
* Convert a UnifiedRelation to a RelationDefinition
|
|
270
205
|
*
|
|
271
|
-
*
|
|
272
|
-
*
|
|
273
|
-
*
|
|
274
|
-
* @param sourceTable - The source table variable name
|
|
275
|
-
* @param targetTable - The target table variable name
|
|
276
|
-
* @param sourceFields - The source table's field names
|
|
277
|
-
* @param targetReferences - The target table's reference column names
|
|
278
|
-
* @returns True if a reverse one() relation exists
|
|
279
|
-
*/
|
|
280
|
-
protected hasReverseOneRelation(sourceTable: string, targetTable: string, sourceFields: string[], targetReferences: string[]): boolean;
|
|
281
|
-
/**
|
|
282
|
-
* Helper to check if two arrays are equal
|
|
206
|
+
* Maps the unified relation format from adapters to the intermediate
|
|
207
|
+
* schema's RelationDefinition format.
|
|
283
208
|
*
|
|
284
|
-
* @param
|
|
285
|
-
* @
|
|
286
|
-
* @returns True if arrays have same length and same elements in order
|
|
209
|
+
* @param unified - The unified relation from adapter
|
|
210
|
+
* @returns RelationDefinition for intermediate schema
|
|
287
211
|
*/
|
|
288
|
-
private
|
|
212
|
+
private unifiedRelationToDefinition;
|
|
289
213
|
/**
|
|
290
|
-
*
|
|
214
|
+
* Convert the Drizzle schema to an intermediate schema representation
|
|
291
215
|
*
|
|
292
|
-
*
|
|
293
|
-
*
|
|
216
|
+
* Creates a database-agnostic intermediate representation that can be
|
|
217
|
+
* used to generate various output formats (DBML, Markdown, JSON, etc.)
|
|
294
218
|
*
|
|
295
|
-
*
|
|
219
|
+
* @returns The intermediate schema representation
|
|
296
220
|
*/
|
|
297
|
-
|
|
221
|
+
toIntermediateSchema(): IntermediateSchema;
|
|
298
222
|
/**
|
|
299
|
-
*
|
|
300
|
-
*
|
|
301
|
-
* Uses official Drizzle v1 types (TableRelationalConfig, Relation, One).
|
|
302
|
-
* Processes One relations to extract foreign key information and generates
|
|
303
|
-
* DBML Ref lines. Detects one-to-one relationships with bidirectional checks.
|
|
223
|
+
* Determine the database type from a Drizzle table
|
|
304
224
|
*
|
|
305
|
-
* @param
|
|
225
|
+
* @param table - The table to check (can be undefined for empty schemas)
|
|
226
|
+
* @returns The database type
|
|
306
227
|
*/
|
|
307
|
-
protected
|
|
228
|
+
protected getDatabaseType(table: Table | undefined): DatabaseType;
|
|
308
229
|
/**
|
|
309
|
-
*
|
|
230
|
+
* Convert a Drizzle table to a TableDefinition
|
|
310
231
|
*
|
|
311
|
-
*
|
|
312
|
-
*
|
|
313
|
-
*
|
|
314
|
-
* @param entries - All v1 relation entries
|
|
315
|
-
* @param fromTableName - The table to search for reverse relation
|
|
316
|
-
* @param toTableName - The expected target table of the reverse relation
|
|
317
|
-
* @param fromColumns - The expected source columns of the reverse relation
|
|
318
|
-
* @param toColumns - The expected target columns of the reverse relation
|
|
319
|
-
* @returns True if a matching reverse One relation exists
|
|
232
|
+
* @param table - The Drizzle table to convert
|
|
233
|
+
* @returns The table definition
|
|
320
234
|
*/
|
|
321
|
-
protected
|
|
235
|
+
protected tableToDefinition(table: Table): TableDefinition;
|
|
322
236
|
/**
|
|
323
|
-
*
|
|
324
|
-
*
|
|
325
|
-
* Creates a consistent key by sorting table names alphabetically.
|
|
237
|
+
* Convert a Drizzle column to a ColumnDefinition
|
|
326
238
|
*
|
|
327
|
-
* @param
|
|
328
|
-
* @param
|
|
329
|
-
* @returns
|
|
239
|
+
* @param column - The Drizzle column to convert
|
|
240
|
+
* @param tableName - The name of the table containing the column
|
|
241
|
+
* @returns The column definition
|
|
330
242
|
*/
|
|
331
|
-
protected
|
|
243
|
+
protected columnToDefinition(column: AnyColumn, tableName: string): ColumnDefinition;
|
|
332
244
|
/**
|
|
333
|
-
*
|
|
245
|
+
* Extract index definitions from table config
|
|
334
246
|
*
|
|
335
|
-
*
|
|
336
|
-
*
|
|
337
|
-
*
|
|
338
|
-
* @param tableName - The source table name
|
|
339
|
-
* @param relation - The relation object to parse
|
|
340
|
-
* @returns GeneratedRef object or undefined if parsing fails
|
|
247
|
+
* @param tableConfig - The table configuration
|
|
248
|
+
* @returns Array of index definitions
|
|
341
249
|
*/
|
|
342
|
-
protected
|
|
250
|
+
protected extractIndexDefinitions(tableConfig: TableConfig | undefined): IndexDefinition[];
|
|
343
251
|
/**
|
|
344
|
-
*
|
|
345
|
-
*
|
|
346
|
-
* Creates a Ref line showing the relationship between tables with optional
|
|
347
|
-
* onDelete and onUpdate actions.
|
|
252
|
+
* Extract constraint definitions from table config
|
|
348
253
|
*
|
|
349
|
-
* @param
|
|
350
|
-
* @
|
|
254
|
+
* @param tableConfig - The table configuration
|
|
255
|
+
* @returns Array of constraint definitions
|
|
351
256
|
*/
|
|
352
|
-
protected
|
|
257
|
+
protected extractConstraintDefinitions(tableConfig: TableConfig | undefined): ConstraintDefinition[];
|
|
353
258
|
/**
|
|
354
|
-
*
|
|
259
|
+
* Parse a foreign key into a ConstraintDefinition
|
|
355
260
|
*
|
|
356
|
-
* @param
|
|
357
|
-
* @returns
|
|
261
|
+
* @param fk - The foreign key definition
|
|
262
|
+
* @returns ConstraintDefinition
|
|
358
263
|
*/
|
|
359
|
-
protected
|
|
264
|
+
protected parseForeignKeyForConstraint(fk: ForeignKeyConfig): ConstraintDefinition;
|
|
360
265
|
/**
|
|
361
|
-
*
|
|
266
|
+
* Convert a GeneratedRef to a RelationDefinition
|
|
362
267
|
*
|
|
363
|
-
* @param
|
|
364
|
-
* @returns
|
|
268
|
+
* @param ref - The generated reference
|
|
269
|
+
* @returns The relation definition
|
|
365
270
|
*/
|
|
366
|
-
protected
|
|
271
|
+
protected refToRelationDefinition(ref: GeneratedRef): RelationDefinition;
|
|
367
272
|
/**
|
|
368
|
-
*
|
|
273
|
+
* Collect enum definitions from the schema
|
|
369
274
|
*
|
|
370
|
-
*
|
|
371
|
-
* @returns Array of column names in the primary key
|
|
372
|
-
*/
|
|
373
|
-
protected getPrimaryKeyColumns(pk: unknown): string[];
|
|
374
|
-
/**
|
|
375
|
-
* Get column names from a unique constraint
|
|
275
|
+
* Override in subclasses for dialect-specific enum handling (e.g., PostgreSQL)
|
|
376
276
|
*
|
|
377
|
-
* @
|
|
378
|
-
* @returns Array of column names in the unique constraint
|
|
277
|
+
* @returns Array of enum definitions (empty by default)
|
|
379
278
|
*/
|
|
380
|
-
protected
|
|
279
|
+
protected collectEnumDefinitions(): EnumDefinition[];
|
|
381
280
|
}
|
|
382
281
|
/**
|
|
383
282
|
* Write DBML content to a file
|
|
@@ -389,5 +288,4 @@ export declare abstract class BaseGenerator<TSchema extends Record<string, unkno
|
|
|
389
288
|
* @param content - The DBML content to write
|
|
390
289
|
*/
|
|
391
290
|
export declare function writeDbmlFile(filePath: string, content: string): void;
|
|
392
|
-
export {};
|
|
393
291
|
//# sourceMappingURL=common.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/generator/common.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,KAAK,
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/generator/common.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,KAAK,EAKX,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAQnE,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,YAAY,EAEb,MAAM,UAAU,CAAC;AAClB,OAAO,EAAmB,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAoB,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAG7E;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACrC,WAAW,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,OAAO,CAAC;CAC7C;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE;QACN,OAAO,EAAE,KAAK,CAAC;YAAE,IAAI,EAAE,MAAM,CAA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