@dbml/connector 5.1.0 → 5.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/__tests__/connector.test.ts +1 -1
- package/__tests__/connectors/mssql/expect-out-files/schema.json +98 -7
- package/__tests__/connectors/mssql/out-files/schema.json +2165 -0
- package/__tests__/connectors/mysql/expect-out-files/schema.json +99 -9
- package/__tests__/connectors/mysql/out-files/schema.json +1520 -0
- package/__tests__/connectors/oracle/connection.json +4 -0
- package/__tests__/connectors/oracle/expect-out-files/schema.json +3866 -0
- package/__tests__/connectors/oracle/out-files/schema.json +3866 -0
- package/__tests__/connectors/postgres/expect-out-files/schema.json +119 -8
- package/__tests__/connectors/postgres/out-files/schema.json +1830 -0
- package/dist/connectors/{bigqueryConnector.d.ts → bigquery/index.d.ts} +1 -1
- package/dist/connectors/{bigqueryConnector.js → bigquery/index.js} +3 -4
- package/dist/connectors/connector.js +13 -10
- package/dist/connectors/{snowflakeConnector.d.ts → mssql/index.d.ts} +1 -1
- package/dist/connectors/{mssqlConnector.js → mssql/index.js} +13 -10
- package/dist/connectors/{mysqlConnector.d.ts → mysql/index.d.ts} +1 -1
- package/dist/connectors/{mysqlConnector.js → mysql/index.js} +1 -1
- package/dist/connectors/oracle/constraints.d.ts +7 -0
- package/dist/connectors/oracle/constraints.js +112 -0
- package/dist/connectors/oracle/index.d.ts +3 -0
- package/dist/connectors/oracle/index.js +68 -0
- package/dist/connectors/oracle/indexes.d.ts +3 -0
- package/dist/connectors/oracle/indexes.js +65 -0
- package/dist/connectors/oracle/refs.d.ts +3 -0
- package/dist/connectors/oracle/refs.js +67 -0
- package/dist/connectors/oracle/tables.d.ts +7 -0
- package/dist/connectors/oracle/tables.js +280 -0
- package/dist/connectors/oracle/utils.d.ts +9 -0
- package/dist/connectors/oracle/utils.js +27 -0
- package/dist/connectors/{postgresConnector.d.ts → postgres/index.d.ts} +1 -1
- package/dist/connectors/{postgresConnector.js → postgres/index.js} +21 -16
- package/dist/connectors/{mssqlConnector.d.ts → snowflake/index.d.ts} +1 -1
- package/dist/connectors/{snowflakeConnector.js → snowflake/index.js} +1 -2
- package/dist/connectors/types.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +17 -7
- package/dist/utils/parseSchema.d.ts +1 -1
- package/dist/utils/parseSchema.js +13 -13
- package/eslint.config.ts +70 -0
- package/jest.config.ts +2 -2
- package/package.json +17 -6
- package/src/connectors/{bigqueryConnector.ts → bigquery/index.ts} +4 -5
- package/src/connectors/connector.ts +8 -5
- package/src/connectors/{mssqlConnector.ts → mssql/index.ts} +20 -15
- package/src/connectors/{mysqlConnector.ts → mysql/index.ts} +3 -3
- package/src/connectors/oracle/constraints.ts +113 -0
- package/src/connectors/oracle/index.ts +76 -0
- package/src/connectors/oracle/indexes.ts +71 -0
- package/src/connectors/oracle/refs.ts +73 -0
- package/src/connectors/oracle/tables.ts +305 -0
- package/src/connectors/oracle/utils.ts +23 -0
- package/src/connectors/{postgresConnector.ts → postgres/index.ts} +25 -18
- package/src/connectors/{snowflakeConnector.ts → snowflake/index.ts} +7 -6
- package/src/connectors/types.ts +14 -13
- package/src/index.ts +1 -1
- package/src/utils/parseSchema.ts +11 -11
- package/tsconfig.json +1 -1
- package/.eslintrc.json +0 -24
|
@@ -97,6 +97,13 @@
|
|
|
97
97
|
"note": {
|
|
98
98
|
"value": ""
|
|
99
99
|
}
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "table_with_composite_primary_and_unique_indexes",
|
|
103
|
+
"schemaName": "public",
|
|
104
|
+
"note": {
|
|
105
|
+
"value": ""
|
|
106
|
+
}
|
|
100
107
|
}
|
|
101
108
|
],
|
|
102
109
|
"fields": {
|
|
@@ -1270,6 +1277,60 @@
|
|
|
1270
1277
|
"value": ""
|
|
1271
1278
|
}
|
|
1272
1279
|
}
|
|
1280
|
+
],
|
|
1281
|
+
"public.table_with_composite_primary_and_unique_indexes": [
|
|
1282
|
+
{
|
|
1283
|
+
"name": "col1",
|
|
1284
|
+
"type": {
|
|
1285
|
+
"type_name": "int4",
|
|
1286
|
+
"schemaName": null
|
|
1287
|
+
},
|
|
1288
|
+
"dbdefault": null,
|
|
1289
|
+
"not_null": true,
|
|
1290
|
+
"increment": false,
|
|
1291
|
+
"note": {
|
|
1292
|
+
"value": ""
|
|
1293
|
+
}
|
|
1294
|
+
},
|
|
1295
|
+
{
|
|
1296
|
+
"name": "col2",
|
|
1297
|
+
"type": {
|
|
1298
|
+
"type_name": "int4",
|
|
1299
|
+
"schemaName": null
|
|
1300
|
+
},
|
|
1301
|
+
"dbdefault": null,
|
|
1302
|
+
"not_null": true,
|
|
1303
|
+
"increment": false,
|
|
1304
|
+
"note": {
|
|
1305
|
+
"value": ""
|
|
1306
|
+
}
|
|
1307
|
+
},
|
|
1308
|
+
{
|
|
1309
|
+
"name": "col3",
|
|
1310
|
+
"type": {
|
|
1311
|
+
"type_name": "int4",
|
|
1312
|
+
"schemaName": null
|
|
1313
|
+
},
|
|
1314
|
+
"dbdefault": null,
|
|
1315
|
+
"not_null": false,
|
|
1316
|
+
"increment": false,
|
|
1317
|
+
"note": {
|
|
1318
|
+
"value": ""
|
|
1319
|
+
}
|
|
1320
|
+
},
|
|
1321
|
+
{
|
|
1322
|
+
"name": "col4",
|
|
1323
|
+
"type": {
|
|
1324
|
+
"type_name": "int4",
|
|
1325
|
+
"schemaName": null
|
|
1326
|
+
},
|
|
1327
|
+
"dbdefault": null,
|
|
1328
|
+
"not_null": false,
|
|
1329
|
+
"increment": false,
|
|
1330
|
+
"note": {
|
|
1331
|
+
"value": ""
|
|
1332
|
+
}
|
|
1333
|
+
}
|
|
1273
1334
|
]
|
|
1274
1335
|
},
|
|
1275
1336
|
"refs": [
|
|
@@ -1447,7 +1508,9 @@
|
|
|
1447
1508
|
"type": "column",
|
|
1448
1509
|
"value": "nationalityid"
|
|
1449
1510
|
}
|
|
1450
|
-
]
|
|
1511
|
+
],
|
|
1512
|
+
"pk": true,
|
|
1513
|
+
"unique": false
|
|
1451
1514
|
}
|
|
1452
1515
|
],
|
|
1453
1516
|
"public.order_items": [
|
|
@@ -1463,7 +1526,9 @@
|
|
|
1463
1526
|
"type": "column",
|
|
1464
1527
|
"value": "product_id"
|
|
1465
1528
|
}
|
|
1466
|
-
]
|
|
1529
|
+
],
|
|
1530
|
+
"pk": false,
|
|
1531
|
+
"unique": true
|
|
1467
1532
|
},
|
|
1468
1533
|
{
|
|
1469
1534
|
"name": "idx_order_items_order_product",
|
|
@@ -1477,7 +1542,9 @@
|
|
|
1477
1542
|
"type": "column",
|
|
1478
1543
|
"value": "product_id"
|
|
1479
1544
|
}
|
|
1480
|
-
]
|
|
1545
|
+
],
|
|
1546
|
+
"pk": false,
|
|
1547
|
+
"unique": false
|
|
1481
1548
|
}
|
|
1482
1549
|
],
|
|
1483
1550
|
"public.orders": [
|
|
@@ -1493,7 +1560,9 @@
|
|
|
1493
1560
|
"type": "column",
|
|
1494
1561
|
"value": "order_date"
|
|
1495
1562
|
}
|
|
1496
|
-
]
|
|
1563
|
+
],
|
|
1564
|
+
"pk": false,
|
|
1565
|
+
"unique": false
|
|
1497
1566
|
}
|
|
1498
1567
|
],
|
|
1499
1568
|
"public.products": [
|
|
@@ -1505,7 +1574,43 @@
|
|
|
1505
1574
|
"type": "column",
|
|
1506
1575
|
"value": "category"
|
|
1507
1576
|
}
|
|
1508
|
-
]
|
|
1577
|
+
],
|
|
1578
|
+
"pk": false,
|
|
1579
|
+
"unique": false
|
|
1580
|
+
}
|
|
1581
|
+
],
|
|
1582
|
+
"public.table_with_composite_primary_and_unique_indexes": [
|
|
1583
|
+
{
|
|
1584
|
+
"name": "table_with_composite_primary_and_unique_indexes_pkey",
|
|
1585
|
+
"type": "btree",
|
|
1586
|
+
"columns": [
|
|
1587
|
+
{
|
|
1588
|
+
"type": "column",
|
|
1589
|
+
"value": "col1"
|
|
1590
|
+
},
|
|
1591
|
+
{
|
|
1592
|
+
"type": "column",
|
|
1593
|
+
"value": "col2"
|
|
1594
|
+
}
|
|
1595
|
+
],
|
|
1596
|
+
"pk": true,
|
|
1597
|
+
"unique": false
|
|
1598
|
+
},
|
|
1599
|
+
{
|
|
1600
|
+
"name": "table_with_composite_primary_and_unique_indexes_col3_col4_key",
|
|
1601
|
+
"type": "btree",
|
|
1602
|
+
"columns": [
|
|
1603
|
+
{
|
|
1604
|
+
"type": "column",
|
|
1605
|
+
"value": "col3"
|
|
1606
|
+
},
|
|
1607
|
+
{
|
|
1608
|
+
"type": "column",
|
|
1609
|
+
"value": "col4"
|
|
1610
|
+
}
|
|
1611
|
+
],
|
|
1612
|
+
"pk": false,
|
|
1613
|
+
"unique": true
|
|
1509
1614
|
}
|
|
1510
1615
|
],
|
|
1511
1616
|
"public.users": [
|
|
@@ -1517,7 +1622,9 @@
|
|
|
1517
1622
|
"type": "column",
|
|
1518
1623
|
"value": "full_name"
|
|
1519
1624
|
}
|
|
1520
|
-
]
|
|
1625
|
+
],
|
|
1626
|
+
"pk": false,
|
|
1627
|
+
"unique": false
|
|
1521
1628
|
},
|
|
1522
1629
|
{
|
|
1523
1630
|
"name": "idx_users_email",
|
|
@@ -1527,7 +1634,9 @@
|
|
|
1527
1634
|
"type": "column",
|
|
1528
1635
|
"value": "email"
|
|
1529
1636
|
}
|
|
1530
|
-
]
|
|
1637
|
+
],
|
|
1638
|
+
"pk": false,
|
|
1639
|
+
"unique": false
|
|
1531
1640
|
},
|
|
1532
1641
|
{
|
|
1533
1642
|
"name": "users_is_active_lower_idx",
|
|
@@ -1541,7 +1650,9 @@
|
|
|
1541
1650
|
"type": "expression",
|
|
1542
1651
|
"value": "lower((full_name)::text)"
|
|
1543
1652
|
}
|
|
1544
|
-
]
|
|
1653
|
+
],
|
|
1654
|
+
"pk": false,
|
|
1655
|
+
"unique": false
|
|
1545
1656
|
}
|
|
1546
1657
|
]
|
|
1547
1658
|
},
|