@sqb/connect 4.6.1 → 4.6.3
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.
|
@@ -144,12 +144,15 @@ class RowConverter {
|
|
|
144
144
|
fld = fld || _fields.get('' + p.keyField);
|
|
145
145
|
const keyValue = fld && row[fld.index];
|
|
146
146
|
if (keyValue != null) {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
arr =
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
147
|
+
const keyValues = Array.isArray(keyValue) ? keyValue : [keyValue];
|
|
148
|
+
keyValues.forEach(k => {
|
|
149
|
+
let arr = map.get(k);
|
|
150
|
+
if (!arr) {
|
|
151
|
+
arr = [];
|
|
152
|
+
map.set(k, arr);
|
|
153
|
+
}
|
|
154
|
+
arr.push(obj);
|
|
155
|
+
});
|
|
153
156
|
}
|
|
154
157
|
}
|
|
155
158
|
});
|
|
@@ -141,12 +141,15 @@ export class RowConverter {
|
|
|
141
141
|
fld = fld || _fields.get('' + p.keyField);
|
|
142
142
|
const keyValue = fld && row[fld.index];
|
|
143
143
|
if (keyValue != null) {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
arr =
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
144
|
+
const keyValues = Array.isArray(keyValue) ? keyValue : [keyValue];
|
|
145
|
+
keyValues.forEach(k => {
|
|
146
|
+
let arr = map.get(k);
|
|
147
|
+
if (!arr) {
|
|
148
|
+
arr = [];
|
|
149
|
+
map.set(k, arr);
|
|
150
|
+
}
|
|
151
|
+
arr.push(obj);
|
|
152
|
+
});
|
|
150
153
|
}
|
|
151
154
|
}
|
|
152
155
|
});
|
package/esm/types.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { Builtin, DeepPickWritable } from 'ts-gems';
|
|
2
|
-
export type EntityInput<T> =
|
|
3
|
-
export type EntityOutput<T> =
|
|
4
|
-
export type
|
|
5
|
-
type
|
|
6
|
-
[P in keyof T]?:
|
|
2
|
+
export type EntityInput<T> = DeepNullablePartial<DeepPickWritable<T>>;
|
|
3
|
+
export type EntityOutput<T> = DeepPartial<T>;
|
|
4
|
+
export type DeepNullablePartial<T> = _DeepNullablePartial<T>;
|
|
5
|
+
type _DeepNullablePartial<T> = T extends Builtin ? T : T extends Promise<infer U> ? Promise<DeepNullablePartial<U>> : T extends (infer U)[] ? DeepNullablePartial<U>[] : {
|
|
6
|
+
[P in keyof T]?: DeepNullablePartial<Exclude<T[P], undefined>> | null;
|
|
7
|
+
};
|
|
8
|
+
export type DeepPartial<T> = _DeepPartial<T>;
|
|
9
|
+
type _DeepPartial<T> = T extends Builtin ? T : T extends Promise<infer U> ? Promise<DeepPartial<U>> : T extends (infer U)[] ? DeepPartial<U>[] : {
|
|
10
|
+
[P in keyof T]?: DeepPartial<Exclude<T[P], undefined>>;
|
|
7
11
|
};
|
|
8
12
|
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sqb/connect",
|
|
3
3
|
"description": "Multi-dialect database connection framework written with TypeScript",
|
|
4
|
-
"version": "4.6.
|
|
4
|
+
"version": "4.6.3",
|
|
5
5
|
"author": "Panates",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Eray Hanoglu <e.hanoglu@panates.com>",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/debug": "^4.1.7",
|
|
46
|
-
"@types/lodash": "^4.14.
|
|
46
|
+
"@types/lodash": "^4.14.194"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@sqb/builder": "^4.6.
|
|
49
|
+
"@sqb/builder": "^4.6.3"
|
|
50
50
|
},
|
|
51
51
|
"type": "module",
|
|
52
52
|
"types": "esm/index.d.ts",
|
|
@@ -84,4 +84,4 @@
|
|
|
84
84
|
"sqlite",
|
|
85
85
|
"mysql"
|
|
86
86
|
]
|
|
87
|
-
}
|
|
87
|
+
}
|