Skip to content

Commit 6c10061

Browse files
authored
feat: add pg driver (#141)
* add initial test for pg driver * add environment for test variable instead of hard-code * remove status change listener from driver * separate the test case for mysql and pg * add postgre icon * feat: handle postgre table list * feat: add correct pg format * feat: add suggestion * add data types * add id for column and table * massive rework schema structure * mapping the schema * add open structure support for postgre * merge * fixing all the typescript error
1 parent b97e695 commit 6c10061

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+2108
-1578
lines changed

.env.example

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
PG_HOST=
2+
PG_DATABASE=
3+
PG_PORT=
4+
PG_USERNAME=
5+
PG_PASSWORD=
6+
PG_PASSWORD=
7+
8+
MYSQL_HOST=
9+
MYSQL_DATABASE=
10+
MYSQL_PORT=
11+
MYSQL_USERNAME=
12+
MYSQL_PASSWORD=

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,6 @@ npm-debug.log.*
3030

3131
connections.json
3232
configs.json
33-
query-master-data/
33+
query-master-data/
34+
35+
.env

environment.d.ts

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
declare global {
2+
namespace NodeJS {
3+
interface ProcessEnv {
4+
PG_HOST: string;
5+
PG_DATABASE: string;
6+
PG_PORT: string;
7+
PG_USERNAME: string;
8+
PG_PASSWORD: string;
9+
10+
MYSQL_HOST: string;
11+
MYSQL_DATABASE: string;
12+
MYSQL_PORT: string;
13+
MYSQL_USERNAME: string;
14+
MYSQL_PASSWORD: string;
15+
16+
NODE_ENV: 'development' | 'production';
17+
}
18+
}
19+
}
20+
21+
// If this file has no import/export statements (i.e. is a script)
22+
// convert it into a module by adding an empty export statement.
23+
export {};

jest.config.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const config: Config = {
88
'<rootDir>/.erb/mocks/fileMock.js',
99
'\\.(css|less|sass|scss)$': 'identity-obj-proxy',
1010
},
11-
testEnvironment: 'jsdom',
11+
testEnvironment: 'node',
1212
testEnvironmentOptions: {
1313
url: 'http://localhost/',
1414
},
@@ -18,6 +18,7 @@ const config: Config = {
1818
},
1919
coverageDirectory: './coverage',
2020
collectCoverageFrom: ['./src/**/*.ts'],
21+
setupFiles: ['dotenv/config'],
2122
};
2223

2324
export default config;

0 commit comments

Comments
 (0)