@l-v-yonsama/multi-platform-database-drivers 0.1.12 → 0.1.13
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/built/src/db/DBError.js +1 -4
- package/built/src/db/DBError.js.map +1 -1
- package/built/src/db/drivers/AwsS3Driver.js +105 -131
- package/built/src/db/drivers/AwsS3Driver.js.map +1 -1
- package/built/src/db/drivers/BaseDriver.js +65 -75
- package/built/src/db/drivers/BaseDriver.js.map +1 -1
- package/built/src/db/drivers/MySQLDriver.js +179 -201
- package/built/src/db/drivers/MySQLDriver.js.map +1 -1
- package/built/src/db/drivers/PostgresDriver.js +162 -186
- package/built/src/db/drivers/PostgresDriver.js.map +1 -1
- package/built/src/db/drivers/RedisDriver.js +160 -180
- package/built/src/db/drivers/RedisDriver.js.map +1 -1
- package/built/src/db/drivers/index.js +5 -8
- package/built/src/db/drivers/index.js.map +1 -1
- package/built/src/db/index.js +3 -6
- package/built/src/db/index.js.map +1 -1
- package/built/src/db/resource/DbResource.js +43 -58
- package/built/src/db/resource/DbResource.js.map +1 -1
- package/built/src/db/resource/MultipleResultSetDataHolder.js +5 -9
- package/built/src/db/resource/MultipleResultSetDataHolder.js.map +1 -1
- package/built/src/db/resource/ResourceHelper.js +1 -5
- package/built/src/db/resource/ResourceHelper.js.map +1 -1
- package/built/src/db/resource/ResultSetDataHolder.js +33 -43
- package/built/src/db/resource/ResultSetDataHolder.js.map +1 -1
- package/built/src/db/resource/index.js +5 -8
- package/built/src/db/resource/index.js.map +1 -1
- package/built/src/db/resource/types/DBType.js +3 -6
- package/built/src/db/resource/types/DBType.js.map +1 -1
- package/built/src/db/resource/types/GeneralColumnType.js +5 -8
- package/built/src/db/resource/types/GeneralColumnType.js.map +1 -1
- package/built/src/db/resource/types/MySQLColumnType.js +7 -10
- package/built/src/db/resource/types/MySQLColumnType.js.map +1 -1
- package/built/src/db/resource/types/ODBCVendorType.js +2 -5
- package/built/src/db/resource/types/ODBCVendorType.js.map +1 -1
- package/built/src/db/resource/types/PostgresColumnType.js +6 -9
- package/built/src/db/resource/types/PostgresColumnType.js.map +1 -1
- package/built/src/db/resource/types/RedisKeyType.js +5 -8
- package/built/src/db/resource/types/RedisKeyType.js.map +1 -1
- package/built/src/db/resource/types/ResourceType.js +2 -5
- package/built/src/db/resource/types/ResourceType.js.map +1 -1
- package/built/src/db/resource/types/index.js +7 -10
- package/built/src/db/resource/types/index.js.map +1 -1
- package/built/src/index.js +3 -6
- package/built/src/index.js.map +1 -1
- package/built/src/service/DBAccessService.js +246 -273
- package/built/src/service/DBAccessService.js.map +1 -1
- package/built/src/service/DBDriverResolver.js +32 -36
- package/built/src/service/DBDriverResolver.js.map +1 -1
- package/built/src/service/SQLService.js +3 -8
- package/built/src/service/SQLService.js.map +1 -1
- package/built/src/service/index.js +5 -8
- package/built/src/service/index.js.map +1 -1
- package/built/src/service/request/RedisRequest.js +2 -5
- package/built/src/service/request/RedisRequest.js.map +1 -1
- package/built/src/service/request/S3Request.js +2 -5
- package/built/src/service/request/S3Request.js.map +1 -1
- package/built/src/service/request/index.js +2 -5
- package/built/src/service/request/index.js.map +1 -1
- package/built/src/service/response/GeneralDBResponse.js +1 -2
- package/built/src/service/response/GeneralResponse.js +1 -5
- package/built/src/service/response/GeneralResponse.js.map +1 -1
- package/built/src/service/response/index.js +2 -5
- package/built/src/service/response/index.js.map +1 -1
- package/built/src/service/response/reply/ConnectionResult.js +1 -2
- package/built/src/service/response/reply/FileExportReply.js +4 -8
- package/built/src/service/response/reply/FileExportReply.js.map +1 -1
- package/built/src/service/response/reply/FileProcessResult.js +3 -7
- package/built/src/service/response/reply/FileProcessResult.js.map +1 -1
- package/built/src/service/response/reply/GeneralReply.js +1 -4
- package/built/src/service/response/reply/GeneralReply.js.map +1 -1
- package/built/src/service/response/reply/OutputReply.js +4 -8
- package/built/src/service/response/reply/OutputReply.js.map +1 -1
- package/built/src/service/response/reply/ProgressReply.js +2 -6
- package/built/src/service/response/reply/ProgressReply.js.map +1 -1
- package/built/src/service/response/reply/types/FileExportType.js +2 -5
- package/built/src/service/response/reply/types/FileExportType.js.map +1 -1
- package/built/src/service/response/reply/types/OutputType.js +2 -5
- package/built/src/service/response/reply/types/OutputType.js.map +1 -1
- package/built/src/service/response/reply/types/ReplyEventType.js +2 -5
- package/built/src/service/response/reply/types/ReplyEventType.js.map +1 -1
- package/built/src/types/DateModifiedType.js +3 -6
- package/built/src/types/DateModifiedType.js.map +1 -1
- package/built/src/types/FileKindType.js +3 -6
- package/built/src/types/FileKindType.js.map +1 -1
- package/built/src/types/index.js +2 -5
- package/built/src/types/index.js.map +1 -1
- package/package.json +2 -1
|
@@ -1,142 +1,129 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const RedisKeyType_1 = require("../resource/types/RedisKeyType");
|
|
9
|
-
const RedisRequest_1 = require("../../service/request/RedisRequest");
|
|
10
|
-
class RedisDriver extends BaseDriver_1.default {
|
|
1
|
+
import BaseDriver from './BaseDriver';
|
|
2
|
+
import { RedisDatabase, DbKey, } from '../resource/DbResource';
|
|
3
|
+
import { Redis } from 'ioredis';
|
|
4
|
+
import ResultSetDataHolder from '../resource/ResultSetDataHolder';
|
|
5
|
+
import { RedisKeyType } from '../resource/types/RedisKeyType';
|
|
6
|
+
import { RedisCommandType, } from '../../service/request/RedisRequest';
|
|
7
|
+
export default class RedisDriver extends BaseDriver {
|
|
11
8
|
constructor(conRes) {
|
|
12
9
|
super(conRes);
|
|
13
10
|
this.databases = 16;
|
|
14
11
|
}
|
|
15
|
-
connectSub() {
|
|
16
|
-
|
|
12
|
+
async connectSub() {
|
|
13
|
+
try {
|
|
14
|
+
const options = Object.assign({
|
|
15
|
+
port: 6379,
|
|
16
|
+
host: '127.0.0.1',
|
|
17
|
+
password: 'auth',
|
|
18
|
+
db: 0,
|
|
19
|
+
}, {
|
|
20
|
+
port: this.conRes.port,
|
|
21
|
+
host: this.conRes.host,
|
|
22
|
+
password: this.conRes.password,
|
|
23
|
+
db: this.conRes.database,
|
|
24
|
+
retryStrategy: function () {
|
|
25
|
+
return 'No!';
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
if (this.isNeedsSsh()) {
|
|
29
|
+
options.host = '127.0.0.1';
|
|
30
|
+
options.port = this.sshLocalPort;
|
|
31
|
+
}
|
|
32
|
+
options.connectTimeout = 5000;
|
|
33
|
+
if (this.conRes.hasUrl()) {
|
|
34
|
+
this.client = new Redis(this.conRes.url);
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
this.client = new Redis(options);
|
|
38
|
+
}
|
|
17
39
|
try {
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
db: this.conRes.database,
|
|
28
|
-
retryStrategy: function () {
|
|
29
|
-
return 'No!';
|
|
30
|
-
},
|
|
31
|
-
});
|
|
32
|
-
if (this.isNeedsSsh()) {
|
|
33
|
-
options.host = '127.0.0.1';
|
|
34
|
-
options.port = this.sshLocalPort;
|
|
35
|
-
}
|
|
36
|
-
options.connectTimeout = 5000;
|
|
37
|
-
if (this.conRes.hasUrl()) {
|
|
38
|
-
this.client = new ioredis_1.Redis(this.conRes.url);
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
this.client = new ioredis_1.Redis(options);
|
|
42
|
-
}
|
|
43
|
-
try {
|
|
44
|
-
const dbs = yield this.client
|
|
45
|
-
.multi()
|
|
46
|
-
.info()
|
|
47
|
-
.config('GET', 'databases')
|
|
48
|
-
.exec();
|
|
49
|
-
if (dbs && dbs.length > 1 && dbs[1].length > 1) {
|
|
50
|
-
const dbs2 = dbs[1][1];
|
|
51
|
-
if (dbs2 && dbs2.length > 1) {
|
|
52
|
-
this.databases = parseInt(dbs2[1], 10);
|
|
53
|
-
}
|
|
40
|
+
const dbs = await this.client
|
|
41
|
+
.multi()
|
|
42
|
+
.info()
|
|
43
|
+
.config('GET', 'databases')
|
|
44
|
+
.exec();
|
|
45
|
+
if (dbs && dbs.length > 1 && dbs[1].length > 1) {
|
|
46
|
+
const dbs2 = dbs[1][1];
|
|
47
|
+
if (dbs2 && dbs2.length > 1) {
|
|
48
|
+
this.databases = parseInt(dbs2[1], 10);
|
|
54
49
|
}
|
|
55
50
|
}
|
|
56
|
-
catch (e) {
|
|
57
|
-
this.databases = 16;
|
|
58
|
-
}
|
|
59
51
|
}
|
|
60
52
|
catch (e) {
|
|
61
|
-
|
|
53
|
+
this.databases = 16;
|
|
62
54
|
}
|
|
63
|
-
|
|
64
|
-
|
|
55
|
+
}
|
|
56
|
+
catch (e) {
|
|
57
|
+
return e.message;
|
|
58
|
+
}
|
|
59
|
+
return '';
|
|
65
60
|
}
|
|
66
|
-
test(with_connect = false) {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
return con_result;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
yield this.client.ping();
|
|
77
|
-
if (with_connect) {
|
|
78
|
-
yield this.disconnect();
|
|
61
|
+
async test(with_connect = false) {
|
|
62
|
+
let errorReason = '';
|
|
63
|
+
try {
|
|
64
|
+
if (with_connect) {
|
|
65
|
+
const con_result = await this.connect();
|
|
66
|
+
if (con_result) {
|
|
67
|
+
return con_result;
|
|
79
68
|
}
|
|
80
69
|
}
|
|
81
|
-
|
|
82
|
-
|
|
70
|
+
await this.client.ping();
|
|
71
|
+
if (with_connect) {
|
|
72
|
+
await this.disconnect();
|
|
83
73
|
}
|
|
84
|
-
|
|
85
|
-
|
|
74
|
+
}
|
|
75
|
+
catch (e) {
|
|
76
|
+
errorReason = e.message;
|
|
77
|
+
}
|
|
78
|
+
return errorReason;
|
|
86
79
|
}
|
|
87
|
-
requestSql(sql, options) {
|
|
88
|
-
return
|
|
89
|
-
return ResultSetDataHolder_1.default.createEmpty();
|
|
90
|
-
});
|
|
80
|
+
async requestSql(sql, options) {
|
|
81
|
+
return ResultSetDataHolder.createEmpty();
|
|
91
82
|
}
|
|
92
|
-
countTables(tables, options) {
|
|
93
|
-
return
|
|
94
|
-
return new Array();
|
|
95
|
-
});
|
|
83
|
+
async countTables(tables, options) {
|
|
84
|
+
return new Array();
|
|
96
85
|
}
|
|
97
|
-
executeCommand(req) {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
if (!this.client) {
|
|
101
|
-
return ret;
|
|
102
|
-
}
|
|
103
|
-
yield this.client.select(req.index);
|
|
104
|
-
let r = '';
|
|
105
|
-
switch (req.command) {
|
|
106
|
-
case RedisRequest_1.RedisCommandType.GetValue:
|
|
107
|
-
{
|
|
108
|
-
r = yield this.getValueByKey(this.client, req.key, req.type);
|
|
109
|
-
const ttl = yield this.client.ttl(req.key);
|
|
110
|
-
ret = new DbResource_1.DbKey(req.key, req.type, ttl);
|
|
111
|
-
if (ret.ttl > 0) {
|
|
112
|
-
ret.ttlConfirmationDatetime = new Date().getTime();
|
|
113
|
-
}
|
|
114
|
-
ret.val = r;
|
|
115
|
-
}
|
|
116
|
-
break;
|
|
117
|
-
case RedisRequest_1.RedisCommandType.SetValue:
|
|
118
|
-
if (req.options) {
|
|
119
|
-
yield this.client.set(req.key, req.options.val);
|
|
120
|
-
}
|
|
121
|
-
break;
|
|
122
|
-
case RedisRequest_1.RedisCommandType.Flushall:
|
|
123
|
-
ret = yield this.client.flushall();
|
|
124
|
-
break;
|
|
125
|
-
case RedisRequest_1.RedisCommandType.Flushdb:
|
|
126
|
-
ret = yield this.client.flushdb();
|
|
127
|
-
break;
|
|
128
|
-
case RedisRequest_1.RedisCommandType.Dbsize:
|
|
129
|
-
ret = yield this.client.dbsize();
|
|
130
|
-
break;
|
|
131
|
-
case RedisRequest_1.RedisCommandType.Info:
|
|
132
|
-
ret = yield this.client.info(req.options.section);
|
|
133
|
-
break;
|
|
134
|
-
default:
|
|
135
|
-
console.error('undefined.', req.command);
|
|
136
|
-
break;
|
|
137
|
-
}
|
|
86
|
+
async executeCommand(req) {
|
|
87
|
+
let ret = '';
|
|
88
|
+
if (!this.client) {
|
|
138
89
|
return ret;
|
|
139
|
-
}
|
|
90
|
+
}
|
|
91
|
+
await this.client.select(req.index);
|
|
92
|
+
let r = '';
|
|
93
|
+
switch (req.command) {
|
|
94
|
+
case RedisCommandType.GetValue:
|
|
95
|
+
{
|
|
96
|
+
r = await this.getValueByKey(this.client, req.key, req.type);
|
|
97
|
+
const ttl = await this.client.ttl(req.key);
|
|
98
|
+
ret = new DbKey(req.key, req.type, ttl);
|
|
99
|
+
if (ret.ttl > 0) {
|
|
100
|
+
ret.ttlConfirmationDatetime = new Date().getTime();
|
|
101
|
+
}
|
|
102
|
+
ret.val = r;
|
|
103
|
+
}
|
|
104
|
+
break;
|
|
105
|
+
case RedisCommandType.SetValue:
|
|
106
|
+
if (req.options) {
|
|
107
|
+
await this.client.set(req.key, req.options.val);
|
|
108
|
+
}
|
|
109
|
+
break;
|
|
110
|
+
case RedisCommandType.Flushall:
|
|
111
|
+
ret = await this.client.flushall();
|
|
112
|
+
break;
|
|
113
|
+
case RedisCommandType.Flushdb:
|
|
114
|
+
ret = await this.client.flushdb();
|
|
115
|
+
break;
|
|
116
|
+
case RedisCommandType.Dbsize:
|
|
117
|
+
ret = await this.client.dbsize();
|
|
118
|
+
break;
|
|
119
|
+
case RedisCommandType.Info:
|
|
120
|
+
ret = await this.client.info(req.options.section);
|
|
121
|
+
break;
|
|
122
|
+
default:
|
|
123
|
+
console.error('undefined.', req.command);
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
126
|
+
return ret;
|
|
140
127
|
}
|
|
141
128
|
scan(db_index, key, count, with_value, progressCallback) {
|
|
142
129
|
return new Promise((resolve) => {
|
|
@@ -149,7 +136,7 @@ class RedisDriver extends BaseDriver_1.default {
|
|
|
149
136
|
const ret = new Array();
|
|
150
137
|
stream.on('data', (resultKeys) => {
|
|
151
138
|
resultKeys.forEach((key) => {
|
|
152
|
-
ret.push(new
|
|
139
|
+
ret.push(new DbKey(key));
|
|
153
140
|
});
|
|
154
141
|
progressCallback('Key scanning now.', Math.round((ret.length * 100) / count));
|
|
155
142
|
if (ret.length > count) {
|
|
@@ -163,79 +150,72 @@ class RedisDriver extends BaseDriver_1.default {
|
|
|
163
150
|
}
|
|
164
151
|
const parallels = [];
|
|
165
152
|
ret.forEach((keyRes) => {
|
|
166
|
-
parallels.push((() =>
|
|
167
|
-
keyRes.type =
|
|
168
|
-
keyRes.ttl =
|
|
153
|
+
parallels.push((async () => {
|
|
154
|
+
keyRes.type = RedisKeyType.parse(await currentClient.type(keyRes.getName()));
|
|
155
|
+
keyRes.ttl = await currentClient.ttl(keyRes.getName());
|
|
169
156
|
if (keyRes.ttl > 0) {
|
|
170
157
|
keyRes.ttlConfirmationDatetime = new Date().getTime();
|
|
171
158
|
}
|
|
172
159
|
if (with_value) {
|
|
173
|
-
keyRes.val =
|
|
160
|
+
keyRes.val = await this.getValueByKey(currentClient, keyRes.getName(), keyRes.type);
|
|
174
161
|
}
|
|
175
|
-
})
|
|
162
|
+
})());
|
|
176
163
|
});
|
|
177
|
-
(() =>
|
|
178
|
-
|
|
164
|
+
(async () => {
|
|
165
|
+
await Promise.all(parallels);
|
|
179
166
|
progressCallback('Key scanning done.', 100);
|
|
180
167
|
resolve(ret);
|
|
181
|
-
})
|
|
168
|
+
})();
|
|
182
169
|
});
|
|
183
170
|
});
|
|
184
171
|
}
|
|
185
|
-
getValueByKey(client, key, type) {
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
return undefined;
|
|
202
|
-
});
|
|
172
|
+
async getValueByKey(client, key, type) {
|
|
173
|
+
switch (type) {
|
|
174
|
+
case RedisKeyType.string:
|
|
175
|
+
return await client.get(key);
|
|
176
|
+
case RedisKeyType.list:
|
|
177
|
+
return await client.lrange(key, 0, -1);
|
|
178
|
+
case RedisKeyType.set:
|
|
179
|
+
return await client.smembers(key);
|
|
180
|
+
case RedisKeyType.zset:
|
|
181
|
+
return await client.zrange(key, 0, -1);
|
|
182
|
+
case RedisKeyType.hash:
|
|
183
|
+
return await client.hgetall(key);
|
|
184
|
+
default:
|
|
185
|
+
console.log('whattype??', type);
|
|
186
|
+
}
|
|
187
|
+
return undefined;
|
|
203
188
|
}
|
|
204
|
-
getInfomationSchemas(options) {
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
189
|
+
async getInfomationSchemas(options) {
|
|
190
|
+
if (!this.conRes) {
|
|
191
|
+
return [];
|
|
192
|
+
}
|
|
193
|
+
const dbResources = new Array();
|
|
194
|
+
const keyspace = await this.client.info('keyspace');
|
|
195
|
+
const re = /db([0-9]+):keys=([0-9]+),expires=([0-9]+),avg_ttl=([0-9]+)/g;
|
|
196
|
+
let m;
|
|
197
|
+
while ((m = re.exec(keyspace))) {
|
|
198
|
+
const db = m[1];
|
|
199
|
+
const keys = parseInt(m[2], 10);
|
|
200
|
+
const expires = parseInt(m[3], 10);
|
|
201
|
+
const avg_ttl = parseInt(m[4], 10);
|
|
202
|
+
const dbRes = new RedisDatabase(db, keys, expires, avg_ttl);
|
|
203
|
+
dbResources.push(dbRes);
|
|
204
|
+
}
|
|
205
|
+
for (let i = 0; i < this.databases; i++) {
|
|
206
|
+
const name = `${i}`;
|
|
207
|
+
if (!dbResources.some((r) => r.getName() === name)) {
|
|
208
|
+
const dbRes = new RedisDatabase(name, 0, 0, 0);
|
|
219
209
|
dbResources.push(dbRes);
|
|
220
210
|
}
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
if (!dbResources.some((r) => r.getName() === name)) {
|
|
224
|
-
const dbRes = new DbResource_1.RedisDatabase(name, 0, 0, 0);
|
|
225
|
-
dbResources.push(dbRes);
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
return dbResources;
|
|
229
|
-
});
|
|
211
|
+
}
|
|
212
|
+
return dbResources;
|
|
230
213
|
}
|
|
231
|
-
closeSub() {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
return '';
|
|
237
|
-
});
|
|
214
|
+
async closeSub() {
|
|
215
|
+
if (this.client) {
|
|
216
|
+
await this.client.quit();
|
|
217
|
+
}
|
|
218
|
+
return '';
|
|
238
219
|
}
|
|
239
220
|
}
|
|
240
|
-
exports.default = RedisDriver;
|
|
241
221
|
//# sourceMappingURL=RedisDriver.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RedisDriver.js","sourceRoot":"","sources":["../../../../src/db/drivers/RedisDriver.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RedisDriver.js","sourceRoot":"","sources":["../../../../src/db/drivers/RedisDriver.ts"],"names":[],"mappings":"AACA,OAAO,UAAiC,MAAM,cAAc,CAAC;AAC7D,OAAO,EAGL,aAAa,EACb,KAAK,GAGN,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,mBAAmB,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EACL,gBAAgB,GAEjB,MAAM,oCAAoC,CAAC;AAE5C,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,UAAU;IAIjD,YAAY,MAAoB;QAC9B,KAAK,CAAC,MAAM,CAAC,CAAC;QAHhB,cAAS,GAAG,EAAE,CAAC;IAIf,CAAC;IAED,KAAK,C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CAAC;YACnC,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YACnC,MAAM,KAAK,GAAG,IAAI,aAAa,CAAC,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YAC5D,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SACzB;QACD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC,EAAE,EAAE;YACvC,MAAM,IAAI,GAAG,GAAG,CAAC,EAAE,CAAC;YACpB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,KAAK,IAAI,CAAC,EAAE;gBAClD,MAAM,KAAK,GAAG,IAAI,aAAa,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;gBAC/C,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACzB;SACF;QAED,OAAO,WAAW,CAAC;IACrB,CAAC;IACD,KAAK,CAAC,QAAQ;QACZ,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;SAC1B;QACD,OAAO,EAAE,CAAC;IACZ,CAAC;CACF"}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
tslib_1.__exportStar(require("./MySQLDriver"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./PostgresDriver"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("./RedisDriver"), exports);
|
|
1
|
+
export * from './AwsS3Driver';
|
|
2
|
+
export * from './BaseDriver';
|
|
3
|
+
export * from './MySQLDriver';
|
|
4
|
+
export * from './PostgresDriver';
|
|
5
|
+
export * from './RedisDriver';
|
|
9
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/db/drivers/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/db/drivers/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC"}
|
package/built/src/db/index.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
tslib_1.__exportStar(require("./DBError"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./drivers"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./resource"), exports);
|
|
1
|
+
export * from './DBError';
|
|
2
|
+
export * from './drivers';
|
|
3
|
+
export * from './resource';
|
|
7
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/db/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/db/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC"}
|