taon-typeorm 19.0.3 → 19.0.5
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/browser/fesm2022/taon-typeorm.mjs +2660 -653
- package/browser/fesm2022/taon-typeorm.mjs.map +1 -1
- package/browser/lib/typeorm/driver/cordova/CordovaQueryRunner.d.ts +1 -1
- package/browser/lib/typeorm/find-options/FindOptionsUtils.d.ts +6 -6
- package/browser/package.json +1 -1
- package/client/fesm2022/taon-typeorm.mjs +2660 -653
- package/client/fesm2022/taon-typeorm.mjs.map +1 -1
- package/client/lib/typeorm/driver/cordova/CordovaQueryRunner.d.ts +1 -1
- package/client/lib/typeorm/find-options/FindOptionsUtils.d.ts +6 -6
- package/client/package.json +1 -1
- package/lib/build-info._auto-generated_.d.ts +2 -1
- package/lib/build-info._auto-generated_.js +3 -2
- package/lib/build-info._auto-generated_.js.map +1 -1
- package/lib/typeorm/driver/sqljs/SqljsDriver.d.ts +1 -1
- package/lib/typeorm/driver/sqljs/SqljsDriver.js +2 -2
- package/lib/typeorm/driver/sqljs/SqljsDriver.js.map +1 -1
- package/lib/typeorm/platform/PlatformTools.js.map +1 -1
- package/lib/typeorm/query-builder/DeleteQueryBuilder.js +2 -2
- package/lib/typeorm/query-builder/DeleteQueryBuilder.js.map +1 -1
- package/lib/typeorm/query-builder/InsertQueryBuilder.js +2 -2
- package/lib/typeorm/query-builder/InsertQueryBuilder.js.map +1 -1
- package/lib/typeorm/query-builder/QueryBuilder.js +8 -8
- package/lib/typeorm/query-builder/QueryBuilder.js.map +1 -1
- package/lib/typeorm/query-builder/RelationQueryBuilder.js +2 -2
- package/lib/typeorm/query-builder/RelationQueryBuilder.js.map +1 -1
- package/lib/typeorm/query-builder/SelectQueryBuilder.js +2 -2
- package/lib/typeorm/query-builder/SelectQueryBuilder.js.map +1 -1
- package/lib/typeorm/query-builder/SoftDeleteQueryBuilder.js +2 -2
- package/lib/typeorm/query-builder/SoftDeleteQueryBuilder.js.map +1 -1
- package/lib/typeorm/query-builder/UpdateQueryBuilder.js +2 -2
- package/lib/typeorm/query-builder/UpdateQueryBuilder.js.map +1 -1
- package/package.json +1 -1
- package/tmp-environment.json +4 -4
- package/websql/fesm2022/taon-typeorm.mjs +2682 -653
- package/websql/fesm2022/taon-typeorm.mjs.map +1 -1
- package/websql/lib/typeorm/driver/cordova/CordovaQueryRunner.d.ts +1 -1
- package/websql/lib/typeorm/find-options/FindOptionsUtils.d.ts +6 -6
- package/websql/package.json +1 -1
|
@@ -26,7 +26,7 @@ export declare class CordovaQueryRunner extends AbstractSqliteQueryRunner {
|
|
|
26
26
|
/**
|
|
27
27
|
* Insert a new row with given values into the given table.
|
|
28
28
|
* Returns value of the generated column if given and generate column exist in the table.
|
|
29
|
-
|
|
29
|
+
// todo: implement new syntax
|
|
30
30
|
async insert(tableName: string, keyValues: ObjectLiteral): Promise<InsertResult> {
|
|
31
31
|
const keys = Object.keys(keyValues);
|
|
32
32
|
const columns = keys.map(key => `"${key}"`).join(", ");
|
|
@@ -38,7 +38,7 @@ export declare class FindOptionsUtils {
|
|
|
38
38
|
|
|
39
39
|
static applyOptionsToQueryBuilder<T>(qb: SelectQueryBuilder<T>, options: FindOneOptions<T>|FindManyOptions<T>|undefined): SelectQueryBuilder<T> {
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
// if options are not set then simply return query builder. This is made for simplicity of usage.
|
|
42
42
|
if (!options || (!this.isFindOneOptions(options) && !this.isFindManyOptions(options)))
|
|
43
43
|
return qb;
|
|
44
44
|
|
|
@@ -51,7 +51,7 @@ export declare class FindOptionsUtils {
|
|
|
51
51
|
|
|
52
52
|
const metadata = qb.expressionMap.mainAlias!.metadata;
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
// apply all options from FindOptions
|
|
55
55
|
if (options.comment) {
|
|
56
56
|
qb.comment(options.comment);
|
|
57
57
|
}
|
|
@@ -75,12 +75,12 @@ export declare class FindOptionsUtils {
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
if (options.relations) {
|
|
78
|
-
|
|
78
|
+
// Copy because `applyRelationsRecursively` modifies it
|
|
79
79
|
const allRelations = [...options.relations];
|
|
80
80
|
this.applyRelationsRecursively(qb, allRelations, qb.expressionMap.mainAlias!.name, qb.expressionMap.mainAlias!.metadata, "");
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
// recursive removes found relations from allRelations array
|
|
82
|
+
// if there are relations left in this array it means those relations were not found in the entity structure
|
|
83
|
+
// so, we give an exception about not found relations
|
|
84
84
|
if (allRelations.length > 0)
|
|
85
85
|
throw new FindRelationsNotFoundError(allRelations);
|
|
86
86
|
}
|