@dbml/connector 8.3.1-custom-metadata.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-custom-metadata.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",
@@ -27,7 +27,7 @@
27
27
  "lint:fix": "eslint --fix ."
28
28
  },
29
29
  "dependencies": {
30
- "@google-cloud/bigquery": "^7.9.0",
30
+ "@google-cloud/bigquery": "^8.3.1",
31
31
  "lodash-es": "^4.18.1",
32
32
  "mssql": "^11.0.1",
33
33
  "mysql2": "^3.11.0",
@@ -38,5 +38,5 @@
38
38
  "engines": {
39
39
  "node": ">=18"
40
40
  },
41
- "gitHead": "152988f537ab87a9d8320bd41b478495c1acbb0c"
41
+ "gitHead": "cfef823a35cf8174da9a12a6f878726f83f474ca"
42
42
  }
@@ -1,3 +0,0 @@
1
- import { DatabaseSchema } from '../types';
2
- declare function fetchSchemaJson(keyFilename: string): Promise<DatabaseSchema>;
3
- export { fetchSchemaJson };
@@ -1,7 +0,0 @@
1
- import { Connection } from 'oracledb';
2
- import { CheckConstraintDictionary, IndexesDictionary, TableConstraintsDictionary } from '../types';
3
- export declare function generateConstraints(client: Connection): Promise<{
4
- indexes: IndexesDictionary;
5
- tableConstraints: TableConstraintsDictionary;
6
- checks: CheckConstraintDictionary;
7
- }>;
@@ -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 { Ref } from '../types';
3
- export declare function generateRawRefs(client: Connection): Promise<Ref[]>;
@@ -1,7 +0,0 @@
1
- import { Connection } from 'oracledb';
2
- import { FieldsDictionary, Table } from '../types';
3
- export declare function generateTablesAndFields(client: Connection): Promise<{
4
- tables: Table[];
5
- fields: FieldsDictionary;
6
- }>;
7
- export declare function getFieldType(dataType: string, characterMaximumLength: number, numericPrecision: number | null, numericScale: number | null): string;
@@ -1,9 +0,0 @@
1
- export declare const LIST_SEPARATOR = "@@@@@@@@";
2
- export declare const EXECUTE_OPTIONS: {
3
- outFormat: number;
4
- };
5
- export declare function processEasyConnectString(connection: string): {
6
- username: string;
7
- password: string;
8
- dbidentifier: string;
9
- };
@@ -1,3 +0,0 @@
1
- import { DatabaseSchema } from '../types';
2
- declare const fetchSchemaJson: (connection: string) => Promise<DatabaseSchema>;
3
- export { fetchSchemaJson, };
@@ -1,99 +0,0 @@
1
- interface NoteInfo {
2
- value: string;
3
- }
4
- interface TypeInfo {
5
- type_name: string;
6
- schemaName: string | null;
7
- }
8
- type DefaultType = 'string' | 'number' | 'boolean' | 'expression';
9
- interface DefaultInfo {
10
- type: DefaultType;
11
- value: string;
12
- }
13
- interface Field {
14
- name: string;
15
- type: TypeInfo;
16
- dbdefault: DefaultInfo | null;
17
- not_null: boolean;
18
- increment: boolean;
19
- pk?: boolean;
20
- unique?: boolean;
21
- note: NoteInfo;
22
- }
23
- interface Table {
24
- name: string;
25
- schemaName: string;
26
- note: NoteInfo;
27
- }
28
- interface FieldsDictionary {
29
- [key: string]: Field[];
30
- }
31
- interface CheckConstraint {
32
- name?: string;
33
- expression: string;
34
- }
35
- interface CheckConstraintDictionary {
36
- [tableName: string]: CheckConstraint[];
37
- }
38
- interface TableConstraint {
39
- [fieldName: string]: {
40
- pk?: boolean;
41
- unique?: boolean;
42
- checks: CheckConstraint[];
43
- };
44
- }
45
- interface TableConstraintsDictionary {
46
- [tableIdentifier: string]: TableConstraint;
47
- }
48
- interface RefEndpoint {
49
- tableName: string;
50
- schemaName: string;
51
- fieldNames: string[];
52
- relation: '*' | '1';
53
- }
54
- interface Ref {
55
- name: string;
56
- endpoints: RefEndpoint[];
57
- onDelete: string | null;
58
- onUpdate: string | null;
59
- }
60
- interface EnumValue {
61
- name: string;
62
- }
63
- interface Enum {
64
- name: string;
65
- schemaName: string;
66
- values: EnumValue[];
67
- }
68
- interface IndexColumn {
69
- type: 'column' | 'expression';
70
- value: string;
71
- }
72
- interface Index {
73
- name: string;
74
- type: string;
75
- unique?: boolean;
76
- pk?: boolean;
77
- columns: IndexColumn[];
78
- }
79
- interface IndexesDictionary {
80
- [tableIdentifier: string]: Index[];
81
- }
82
- interface DatabaseSchema {
83
- tables: Table[];
84
- fields: FieldsDictionary;
85
- enums: Enum[];
86
- tableConstraints: TableConstraintsDictionary;
87
- refs: Ref[];
88
- indexes: IndexesDictionary;
89
- checks: CheckConstraintDictionary;
90
- }
91
- interface BigQueryCredentials {
92
- projectId?: string;
93
- credentials?: {
94
- clientEmail: string;
95
- privateKey: string;
96
- };
97
- datasets: string[];
98
- }
99
- export { NoteInfo, TypeInfo, DefaultType, DefaultInfo, Field, Table, FieldsDictionary, TableConstraint, TableConstraintsDictionary, RefEndpoint, Ref, EnumValue, Enum, IndexColumn, Index, IndexesDictionary, DatabaseSchema, BigQueryCredentials, CheckConstraint, CheckConstraintDictionary, };