@dbml/connector 3.13.0-alpha.0 → 3.13.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/.eslintrc.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "extends": [
3
+ "plugin:@typescript-eslint/recommended"
4
+ ],
5
+ "parser": "@typescript-eslint/parser",
6
+ "parserOptions": {
7
+ "sourceType": "module",
8
+ "ecmaVersion": 2020,
9
+ "project": "./tsconfig.json"
10
+ },
11
+ "settings": {
12
+ "import/resolver": {
13
+ "typescript": {
14
+ "alwaysTryTypes": true,
15
+ "project": "packages/*/{ts,js}config.json"
16
+ }
17
+ }
18
+ },
19
+ "plugins": ["@typescript-eslint"],
20
+ "ignorePatterns": ["**/*.test.ts"],
21
+ "rules": {
22
+ "@typescript-eslint/no-explicit-any": "off"
23
+ }
24
+ }
@@ -168,6 +168,7 @@ const generateTablesFieldsAndEnums = async (client, schemas) => {
168
168
  const tablesAndFieldsSql = `
169
169
  WITH tables_and_fields AS (
170
170
  SELECT
171
+ t.object_id AS table_id,
171
172
  s.name AS table_schema,
172
173
  t.name AS table_name,
173
174
  t.create_date as table_create_date,
@@ -260,6 +261,7 @@ const generateTablesFieldsAndEnums = async (client, schemas) => {
260
261
  ORDER BY
261
262
  table_schema,
262
263
  table_create_date,
264
+ table_id,
263
265
  column_id;
264
266
  `;
265
267
  const tablesAndFieldsResult = await client.query(tablesAndFieldsSql);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dbml/connector",
3
- "version": "3.13.0-alpha.0",
3
+ "version": "3.13.0",
4
4
  "description": "This package was created to fetch the schema JSON from many kind of databases.",
5
5
  "author": "huy.phung.sw@gmail.com",
6
6
  "license": "MIT",
@@ -16,6 +16,7 @@
16
16
  "@babel/preset-typescript": "^7.24.7",
17
17
  "@babel/runtime": "^7.21.0",
18
18
  "@types/jest": "^29.5.12",
19
+ "@types/lodash": "^4.17.16",
19
20
  "@types/mssql": "^9.1.5",
20
21
  "@types/node": "^22.2.0",
21
22
  "@types/pg": "^8.11.6",
@@ -32,6 +33,9 @@
32
33
  },
33
34
  "dependencies": {
34
35
  "@google-cloud/bigquery": "^7.9.0",
36
+ "@typescript-eslint/eslint-plugin": "^8.30.1",
37
+ "@typescript-eslint/parser": "^8.30.1",
38
+ "lodash": "^4.17.21",
35
39
  "mssql": "^11.0.1",
36
40
  "mysql2": "^3.11.0",
37
41
  "pg": "^8.12.0",
@@ -40,5 +44,5 @@
40
44
  "engines": {
41
45
  "node": ">=18"
42
46
  },
43
- "gitHead": "6b6edb8bc9804cd65849451820f1d43072d8c01c"
47
+ "gitHead": "4b705ec829db097bbeb21cf06b2b989cd16173b4"
44
48
  }
@@ -215,6 +215,7 @@ const generateTablesFieldsAndEnums = async (client: sql.ConnectionPool, schemas:
215
215
  const tablesAndFieldsSql = `
216
216
  WITH tables_and_fields AS (
217
217
  SELECT
218
+ t.object_id AS table_id,
218
219
  s.name AS table_schema,
219
220
  t.name AS table_name,
220
221
  t.create_date as table_create_date,
@@ -307,6 +308,7 @@ const generateTablesFieldsAndEnums = async (client: sql.ConnectionPool, schemas:
307
308
  ORDER BY
308
309
  table_schema,
309
310
  table_create_date,
311
+ table_id,
310
312
  column_id;
311
313
  `;
312
314