@sqb/connect 4.10.4 → 4.10.6
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.
|
@@ -4,7 +4,6 @@ exports.EntityMetadata = void 0;
|
|
|
4
4
|
const builder_1 = require("@sqb/builder");
|
|
5
5
|
const orm_const_js_1 = require("../orm.const.js");
|
|
6
6
|
const orm_helper_js_1 = require("../util/orm.helper.js");
|
|
7
|
-
const serialize_field_js_1 = require("../util/serialize-field.js");
|
|
8
7
|
const association_js_1 = require("./association.js");
|
|
9
8
|
const association_field_metadata_js_1 = require("./association-field-metadata.js");
|
|
10
9
|
const column_field_metadata_js_1 = require("./column-field-metadata.js");
|
|
@@ -29,23 +28,6 @@ var EntityMetadata;
|
|
|
29
28
|
if (baseMeta) {
|
|
30
29
|
EntityMetadata.mixin(meta, baseMeta);
|
|
31
30
|
}
|
|
32
|
-
ctor.prototype.toJSON = function () {
|
|
33
|
-
const obj = {};
|
|
34
|
-
const fieldKeys = Object.keys(meta.fields);
|
|
35
|
-
const l = fieldKeys.length;
|
|
36
|
-
let key;
|
|
37
|
-
let v;
|
|
38
|
-
for (let i = 0; i < l; i++) {
|
|
39
|
-
key = fieldKeys[i];
|
|
40
|
-
const col = EntityMetadata.getField(meta, key);
|
|
41
|
-
if (col) {
|
|
42
|
-
v = this[col.name];
|
|
43
|
-
if (v !== undefined)
|
|
44
|
-
obj[col.name] = (0, serialize_field_js_1.serializeColumn)(col, v);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return obj;
|
|
48
|
-
};
|
|
49
31
|
return meta;
|
|
50
32
|
}
|
|
51
33
|
EntityMetadata.define = define;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { DataType } from '@sqb/builder';
|
|
2
2
|
import { ENTITY_METADATA_KEY } from '../orm.const.js';
|
|
3
3
|
import { isAssociationField, isColumnField, isEmbeddedField } from '../util/orm.helper.js';
|
|
4
|
-
import { serializeColumn } from '../util/serialize-field.js';
|
|
5
4
|
import { Association } from './association.js';
|
|
6
5
|
import { AssociationFieldMetadata } from './association-field-metadata.js';
|
|
7
6
|
import { ColumnFieldMetadata } from './column-field-metadata.js';
|
|
@@ -26,23 +25,6 @@ export var EntityMetadata;
|
|
|
26
25
|
if (baseMeta) {
|
|
27
26
|
EntityMetadata.mixin(meta, baseMeta);
|
|
28
27
|
}
|
|
29
|
-
ctor.prototype.toJSON = function () {
|
|
30
|
-
const obj = {};
|
|
31
|
-
const fieldKeys = Object.keys(meta.fields);
|
|
32
|
-
const l = fieldKeys.length;
|
|
33
|
-
let key;
|
|
34
|
-
let v;
|
|
35
|
-
for (let i = 0; i < l; i++) {
|
|
36
|
-
key = fieldKeys[i];
|
|
37
|
-
const col = EntityMetadata.getField(meta, key);
|
|
38
|
-
if (col) {
|
|
39
|
-
v = this[col.name];
|
|
40
|
-
if (v !== undefined)
|
|
41
|
-
obj[col.name] = serializeColumn(col, v);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
return obj;
|
|
45
|
-
};
|
|
46
28
|
return meta;
|
|
47
29
|
}
|
|
48
30
|
EntityMetadata.define = define;
|
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.10.
|
|
4
|
+
"version": "4.10.6",
|
|
5
5
|
"author": "Panates",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Eray Hanoglu <e.hanoglu@panates.com>",
|
|
@@ -43,14 +43,14 @@
|
|
|
43
43
|
"putil-varhelpers": "^1.6.5",
|
|
44
44
|
"reflect-metadata": "^0.1.13",
|
|
45
45
|
"strict-typed-events": "^2.3.2",
|
|
46
|
-
"ts-gems": "^2.
|
|
46
|
+
"ts-gems": "^2.7.1"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/debug": "^4.1.12",
|
|
50
|
-
"@types/lodash": "^4.14.
|
|
50
|
+
"@types/lodash": "^4.14.202"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"@sqb/builder": "^4.10.
|
|
53
|
+
"@sqb/builder": "^4.10.6"
|
|
54
54
|
},
|
|
55
55
|
"engines": {
|
|
56
56
|
"node": ">=16.0",
|
package/types/types.d.ts
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export type
|
|
3
|
-
export type
|
|
4
|
-
export type
|
|
5
|
-
type
|
|
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>>;
|
|
11
|
-
};
|
|
12
|
-
export {};
|
|
1
|
+
import { DeepPickWritable, HighDeepNullish } from 'ts-gems';
|
|
2
|
+
export type PartialInput<T> = HighDeepNullish<DeepPickWritable<T>>;
|
|
3
|
+
export type PartialOutput<T> = HighDeepNullish<T>;
|
|
4
|
+
export type EntityInput<T> = PartialInput<T>;
|
|
5
|
+
export type EntityOutput<T> = PartialOutput<T>;
|