@itrocks/mysql-maintainer 0.1.0 → 0.1.1

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/cjs/mysql.js CHANGED
@@ -43,14 +43,16 @@ class Mysql extends mysql_1.Mysql {
43
43
  contexts.pop();
44
44
  return result;
45
45
  }
46
- async readCollection(object, property, type = new reflect_1.ReflectProperty(object, property).collectionType.elementType.type) {
46
+ async readCollection(object, property, type) {
47
+ type ??= new reflect_1.ReflectProperty(object, property).collectionType.elementType.type;
47
48
  const contexts = (this.connection ?? await this.connect()).contexts;
48
49
  contexts.push([object, type]);
49
50
  const result = await super.readCollection(object, property, type);
50
51
  contexts.pop();
51
52
  return result;
52
53
  }
53
- async readCollectionIds(object, property, type = new reflect_1.ReflectProperty(object, property).collectionType.elementType.type) {
54
+ async readCollectionIds(object, property, type) {
55
+ type ??= new reflect_1.ReflectProperty(object, property).collectionType.elementType.type;
54
56
  const contexts = (this.connection ?? await this.connect()).contexts;
55
57
  contexts.push([object, type]);
56
58
  const result = await super.readCollectionIds(object, property, type);
package/esm/mysql.js CHANGED
@@ -40,14 +40,16 @@ export class Mysql extends M {
40
40
  contexts.pop();
41
41
  return result;
42
42
  }
43
- async readCollection(object, property, type = new ReflectProperty(object, property).collectionType.elementType.type) {
43
+ async readCollection(object, property, type) {
44
+ type ??= new ReflectProperty(object, property).collectionType.elementType.type;
44
45
  const contexts = (this.connection ?? await this.connect()).contexts;
45
46
  contexts.push([object, type]);
46
47
  const result = await super.readCollection(object, property, type);
47
48
  contexts.pop();
48
49
  return result;
49
50
  }
50
- async readCollectionIds(object, property, type = new ReflectProperty(object, property).collectionType.elementType.type) {
51
+ async readCollectionIds(object, property, type) {
52
+ type ??= new ReflectProperty(object, property).collectionType.elementType.type;
51
53
  const contexts = (this.connection ?? await this.connect()).contexts;
52
54
  contexts.push([object, type]);
53
55
  const result = await super.readCollectionIds(object, property, type);
package/package.json CHANGED
@@ -57,5 +57,5 @@
57
57
  "build:esm": "tsc -p tsconfig.esm.json"
58
58
  },
59
59
  "types": "./esm/mysql-maintainer.d.ts",
60
- "version": "0.1.0"
60
+ "version": "0.1.1"
61
61
  }