@dbml/connector 8.3.1 → 8.4.0-alpha.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.
@@ -1,3 +0,0 @@
1
- import { DatabaseSchema } from './types';
2
- declare const fetchSchemaJson: (connection: string, databaseType: string) => Promise<DatabaseSchema>;
3
- export { fetchSchemaJson, };
@@ -1,3 +0,0 @@
1
- import { DatabaseSchema } from '../types';
2
- declare const fetchSchemaJson: (connection: string) => Promise<DatabaseSchema>;
3
- export { fetchSchemaJson, };
@@ -1,3 +0,0 @@
1
- import { DatabaseSchema } from '../types';
2
- declare function fetchSchemaJson(connection: string): Promise<DatabaseSchema>;
3
- export { fetchSchemaJson, };
@@ -1,3 +0,0 @@
1
- import { Connection } from 'oracledb';
2
- import { IndexesDictionary } from '../types';
3
- export declare function generateIndexes(client: Connection): Promise<IndexesDictionary>;
@@ -1,3 +0,0 @@
1
- import { DatabaseSchema } from '../types';
2
- declare const fetchSchemaJson: (connection: string) => Promise<DatabaseSchema>;
3
- export { fetchSchemaJson, };
@@ -1,10 +0,0 @@
1
- export declare const parseSchema: (schemas: string | undefined) => string[];
2
- export declare const parseJdbcSchema: (connectionString: string) => {
3
- connectionString: string;
4
- schemas: string[];
5
- };
6
- export declare const parseConnectionString: (connectionString: string, connectionStringType: "jdbc" | "odbc") => {
7
- connectionString: string;
8
- schemas: string[];
9
- };
10
- export declare const buildSchemaQuery: (columnName: string, schemas: string[], prefix?: string) => string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package",
3
3
  "name": "@dbml/connector",
4
- "version": "8.3.1",
4
+ "version": "8.4.0-alpha.0",
5
5
  "description": "This package was created to fetch the schema JSON from many kind of databases.",
6
6
  "author": "huy.phung.sw@gmail.com",
7
7
  "license": "MIT",
@@ -38,5 +38,5 @@
38
38
  "engines": {
39
39
  "node": ">=18"
40
40
  },
41
- "gitHead": "b062d22d3608d8bb2969051721237cf5de28e069"
41
+ "gitHead": "cfef823a35cf8174da9a12a6f878726f83f474ca"
42
42
  }
@@ -1,565 +0,0 @@
1
- {
2
- "tables": [
3
- {
4
- "name": "test_all_index",
5
- "note": {
6
- "value": ""
7
- },
8
- "schemaName": "dbml_test"
9
- },
10
- {
11
- "name": "test_constraint_1",
12
- "note": {
13
- "value": ""
14
- },
15
- "schemaName": "dbml_test"
16
- },
17
- {
18
- "name": "test_constraint_2",
19
- "note": {
20
- "value": ""
21
- },
22
- "schemaName": "dbml_test"
23
- },
24
- {
25
- "name": "test_constraint_3",
26
- "note": {
27
- "value": ""
28
- },
29
- "schemaName": "dbml_test"
30
- },
31
- {
32
- "name": "test_constraint_4",
33
- "note": {
34
- "value": ""
35
- },
36
- "schemaName": "dbml_test"
37
- },
38
- {
39
- "name": "test_data_type_default",
40
- "note": {
41
- "value": ""
42
- },
43
- "schemaName": "dbml_test"
44
- },
45
- {
46
- "name": "test_index",
47
- "note": {
48
- "value": ""
49
- },
50
- "schemaName": "dbml_test"
51
- },
52
- {
53
- "name": "test_multi_index",
54
- "note": {
55
- "value": ""
56
- },
57
- "schemaName": "dbml_test"
58
- }
59
- ],
60
- "fields": {
61
- "dbml_test.test_all_index": [
62
- {
63
- "name": "a",
64
- "not_null": false,
65
- "type": {
66
- "type_name": "STRING",
67
- "schemaName": null
68
- },
69
- "note": {
70
- "value": ""
71
- },
72
- "dbdefault": null,
73
- "increment": false
74
- },
75
- {
76
- "name": "b",
77
- "not_null": false,
78
- "type": {
79
- "type_name": "INT64",
80
- "schemaName": null
81
- },
82
- "note": {
83
- "value": ""
84
- },
85
- "dbdefault": null,
86
- "increment": false
87
- },
88
- {
89
- "name": "c",
90
- "not_null": false,
91
- "type": {
92
- "type_name": "STRUCT<d INT64, e ARRAY<STRING>, f STRUCT<g STRING, h INT64>>",
93
- "schemaName": null
94
- },
95
- "note": {
96
- "value": ""
97
- },
98
- "dbdefault": null,
99
- "increment": false
100
- }
101
- ],
102
- "dbml_test.test_constraint_1": [
103
- {
104
- "name": "id",
105
- "not_null": false,
106
- "type": {
107
- "type_name": "INT64",
108
- "schemaName": null
109
- },
110
- "note": {
111
- "value": ""
112
- },
113
- "dbdefault": null,
114
- "increment": false
115
- }
116
- ],
117
- "dbml_test.test_constraint_2": [
118
- {
119
- "name": "id",
120
- "not_null": false,
121
- "type": {
122
- "type_name": "INT64",
123
- "schemaName": null
124
- },
125
- "note": {
126
- "value": ""
127
- },
128
- "dbdefault": null,
129
- "increment": false
130
- },
131
- {
132
- "name": "name",
133
- "not_null": false,
134
- "type": {
135
- "type_name": "STRING",
136
- "schemaName": null
137
- },
138
- "note": {
139
- "value": ""
140
- },
141
- "dbdefault": null,
142
- "increment": false
143
- }
144
- ],
145
- "dbml_test.test_constraint_3": [
146
- {
147
- "name": "id",
148
- "not_null": false,
149
- "type": {
150
- "type_name": "INT64",
151
- "schemaName": null
152
- },
153
- "note": {
154
- "value": ""
155
- },
156
- "dbdefault": null,
157
- "increment": false
158
- },
159
- {
160
- "name": "fk_id",
161
- "not_null": false,
162
- "type": {
163
- "type_name": "INT64",
164
- "schemaName": null
165
- },
166
- "note": {
167
- "value": ""
168
- },
169
- "dbdefault": null,
170
- "increment": false
171
- }
172
- ],
173
- "dbml_test.test_constraint_4": [
174
- {
175
- "name": "fk_id",
176
- "not_null": false,
177
- "type": {
178
- "type_name": "INT64",
179
- "schemaName": null
180
- },
181
- "note": {
182
- "value": ""
183
- },
184
- "dbdefault": null,
185
- "increment": false
186
- },
187
- {
188
- "name": "fk_name",
189
- "not_null": false,
190
- "type": {
191
- "type_name": "STRING",
192
- "schemaName": null
193
- },
194
- "note": {
195
- "value": ""
196
- },
197
- "dbdefault": null,
198
- "increment": false
199
- }
200
- ],
201
- "dbml_test.test_data_type_default": [
202
- {
203
- "name": "t_int",
204
- "not_null": false,
205
- "type": {
206
- "type_name": "INT64",
207
- "schemaName": null
208
- },
209
- "note": {
210
- "value": "Int64 column"
211
- },
212
- "dbdefault": {
213
- "value": "1",
214
- "type": "number"
215
- },
216
- "increment": false
217
- },
218
- {
219
- "name": "t_bool_1",
220
- "not_null": false,
221
- "type": {
222
- "type_name": "BOOL",
223
- "schemaName": null
224
- },
225
- "note": {
226
- "value": ""
227
- },
228
- "dbdefault": {
229
- "value": "true",
230
- "type": "boolean"
231
- },
232
- "increment": false
233
- },
234
- {
235
- "name": "t_bool_2",
236
- "not_null": false,
237
- "type": {
238
- "type_name": "BOOL",
239
- "schemaName": null
240
- },
241
- "note": {
242
- "value": ""
243
- },
244
- "dbdefault": {
245
- "value": "True",
246
- "type": "boolean"
247
- },
248
- "increment": false
249
- },
250
- {
251
- "name": "t_string_1",
252
- "not_null": false,
253
- "type": {
254
- "type_name": "STRING",
255
- "schemaName": null
256
- },
257
- "note": {
258
- "value": ""
259
- },
260
- "dbdefault": {
261
- "value": "string column\\'s description 1",
262
- "type": "string"
263
- },
264
- "increment": false
265
- },
266
- {
267
- "name": "t_string_2",
268
- "not_null": false,
269
- "type": {
270
- "type_name": "STRING",
271
- "schemaName": null
272
- },
273
- "note": {
274
- "value": ""
275
- },
276
- "dbdefault": {
277
- "value": "string column's description 2",
278
- "type": "string"
279
- },
280
- "increment": false
281
- },
282
- {
283
- "name": "t_string_3",
284
- "not_null": false,
285
- "type": {
286
- "type_name": "STRING",
287
- "schemaName": null
288
- },
289
- "note": {
290
- "value": ""
291
- },
292
- "dbdefault": {
293
- "value": "NULL",
294
- "type": "string"
295
- },
296
- "increment": false
297
- },
298
- {
299
- "name": "t_float",
300
- "not_null": false,
301
- "type": {
302
- "type_name": "FLOAT64",
303
- "schemaName": null
304
- },
305
- "note": {
306
- "value": ""
307
- },
308
- "dbdefault": {
309
- "value": "123.456e-67",
310
- "type": "number"
311
- },
312
- "increment": false
313
- },
314
- {
315
- "name": "t_decimal",
316
- "not_null": false,
317
- "type": {
318
- "type_name": "NUMERIC",
319
- "schemaName": null
320
- },
321
- "note": {
322
- "value": ""
323
- },
324
- "dbdefault": {
325
- "value": "10",
326
- "type": "number"
327
- },
328
- "increment": false
329
- },
330
- {
331
- "name": "t_date",
332
- "not_null": false,
333
- "type": {
334
- "type_name": "DATE",
335
- "schemaName": null
336
- },
337
- "note": {
338
- "value": ""
339
- },
340
- "dbdefault": {
341
- "value": "CURRENT_DATE",
342
- "type": "expression"
343
- },
344
- "increment": false
345
- },
346
- {
347
- "name": "t_datetime",
348
- "not_null": false,
349
- "type": {
350
- "type_name": "DATETIME",
351
- "schemaName": null
352
- },
353
- "note": {
354
- "value": ""
355
- },
356
- "dbdefault": {
357
- "value": "CURRENT_DATETIME",
358
- "type": "expression"
359
- },
360
- "increment": false
361
- },
362
- {
363
- "name": "t_timestamp",
364
- "not_null": false,
365
- "type": {
366
- "type_name": "TIMESTAMP",
367
- "schemaName": null
368
- },
369
- "note": {
370
- "value": ""
371
- },
372
- "dbdefault": {
373
- "value": "CURRENT_TIMESTAMP",
374
- "type": "expression"
375
- },
376
- "increment": false
377
- },
378
- {
379
- "name": "t_array",
380
- "not_null": true,
381
- "type": {
382
- "type_name": "ARRAY<INT64>",
383
- "schemaName": null
384
- },
385
- "note": {
386
- "value": ""
387
- },
388
- "dbdefault": {
389
- "value": "ARRAY<INT64>[1, 2, 3]",
390
- "type": "expression"
391
- },
392
- "increment": false
393
- },
394
- {
395
- "name": "t_struct",
396
- "not_null": false,
397
- "type": {
398
- "type_name": "STRUCT<street STRING, city STRING, zip_code INT64>",
399
- "schemaName": null
400
- },
401
- "note": {
402
- "value": ""
403
- },
404
- "dbdefault": {
405
- "value": "STRUCT('123 Example St', 'Sample City', 12345)",
406
- "type": "expression"
407
- },
408
- "increment": false
409
- },
410
- {
411
- "name": "t_interval",
412
- "not_null": false,
413
- "type": {
414
- "type_name": "INTERVAL",
415
- "schemaName": null
416
- },
417
- "note": {
418
- "value": ""
419
- },
420
- "dbdefault": null,
421
- "increment": false
422
- },
423
- {
424
- "name": "t_geo",
425
- "not_null": false,
426
- "type": {
427
- "type_name": "GEOGRAPHY",
428
- "schemaName": null
429
- },
430
- "note": {
431
- "value": ""
432
- },
433
- "dbdefault": null,
434
- "increment": false
435
- }
436
- ],
437
- "dbml_test.test_index": [
438
- {
439
- "name": "a",
440
- "not_null": false,
441
- "type": {
442
- "type_name": "STRING",
443
- "schemaName": null
444
- },
445
- "note": {
446
- "value": ""
447
- },
448
- "dbdefault": null,
449
- "increment": false
450
- },
451
- {
452
- "name": "b",
453
- "not_null": false,
454
- "type": {
455
- "type_name": "INT64",
456
- "schemaName": null
457
- },
458
- "note": {
459
- "value": ""
460
- },
461
- "dbdefault": null,
462
- "increment": false
463
- }
464
- ],
465
- "dbml_test.test_multi_index": [
466
- {
467
- "name": "a",
468
- "not_null": false,
469
- "type": {
470
- "type_name": "STRING",
471
- "schemaName": null
472
- },
473
- "note": {
474
- "value": ""
475
- },
476
- "dbdefault": null,
477
- "increment": false
478
- },
479
- {
480
- "name": "b",
481
- "not_null": false,
482
- "type": {
483
- "type_name": "INT64",
484
- "schemaName": null
485
- },
486
- "note": {
487
- "value": ""
488
- },
489
- "dbdefault": null,
490
- "increment": false
491
- },
492
- {
493
- "name": "c",
494
- "not_null": false,
495
- "type": {
496
- "type_name": "JSON",
497
- "schemaName": null
498
- },
499
- "note": {
500
- "value": ""
501
- },
502
- "dbdefault": null,
503
- "increment": false
504
- },
505
- {
506
- "name": "d",
507
- "not_null": false,
508
- "type": {
509
- "type_name": "TIMESTAMP",
510
- "schemaName": null
511
- },
512
- "note": {
513
- "value": ""
514
- },
515
- "dbdefault": null,
516
- "increment": false
517
- }
518
- ]
519
- },
520
- "tableConstraints": {
521
- "dbml_test.test_constraint_1": {
522
- "id": {
523
- "pk": true
524
- }
525
- }
526
- },
527
- "indexes": {
528
- "dbml_test.test_constraint_2": [
529
- {
530
- "name": "test_constraint_2.pk$",
531
- "type": "",
532
- "columns": [
533
- {
534
- "type": "column",
535
- "value": "id"
536
- },
537
- {
538
- "type": "column",
539
- "value": "name"
540
- }
541
- ],
542
- "pk": true
543
- }
544
- ],
545
- "dbml_test.test_constraint_4": [
546
- {
547
- "name": "test_constraint_4.pk$",
548
- "type": "",
549
- "columns": [
550
- {
551
- "type": "column",
552
- "value": "fk_id"
553
- },
554
- {
555
- "type": "column",
556
- "value": "fk_name"
557
- }
558
- ],
559
- "pk": true
560
- }
561
- ]
562
- },
563
- "refs": [],
564
- "enums": []
565
- }