@itwin/core-backend 5.2.0-dev.16 → 5.2.0-dev.18
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/lib/cjs/IModelIncrementalSchemaLocater.d.ts +1 -5
- package/lib/cjs/IModelIncrementalSchemaLocater.d.ts.map +1 -1
- package/lib/cjs/IModelIncrementalSchemaLocater.js +0 -6
- package/lib/cjs/IModelIncrementalSchemaLocater.js.map +1 -1
- package/lib/esm/IModelIncrementalSchemaLocater.d.ts +1 -5
- package/lib/esm/IModelIncrementalSchemaLocater.d.ts.map +1 -1
- package/lib/esm/IModelIncrementalSchemaLocater.js +0 -6
- package/lib/esm/IModelIncrementalSchemaLocater.js.map +1 -1
- package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.js +20 -20
- package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.js.map +1 -1
- package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.d.ts +16 -1
- package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.d.ts.map +1 -1
- package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.js +47 -0
- package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.js.map +1 -1
- package/package.json +14 -14
|
@@ -15,16 +15,12 @@ export declare class IModelIncrementalSchemaLocater extends ECSqlSchemaLocater {
|
|
|
15
15
|
* @param options Optional [[ECSqlSchemaLocaterOptions]]($ecschema-metadata).
|
|
16
16
|
*/
|
|
17
17
|
constructor(iModel: IModelDb, options?: ECSqlSchemaLocaterOptions);
|
|
18
|
-
/**
|
|
19
|
-
* Gets the [[IModelDb]] targeted by this schema loader.
|
|
20
|
-
*/
|
|
21
|
-
get iModelDb(): IModelDb;
|
|
22
18
|
/**
|
|
23
19
|
* Gets [[SchemaProps]]($ecschema-metadata) for the given [[SchemaKey]]($ecschema-metadata).
|
|
24
20
|
* This is the full schema json with all elements that are defined in the schema.
|
|
25
21
|
* @param schemaKey The key of the schema to be resolved.
|
|
26
22
|
*/
|
|
27
|
-
getSchemaProps(schemaKey: SchemaKey): Promise<SchemaProps | undefined>;
|
|
23
|
+
protected getSchemaProps(schemaKey: SchemaKey): Promise<SchemaProps | undefined>;
|
|
28
24
|
/**
|
|
29
25
|
* Executes an ECSql query against the IModelDb.
|
|
30
26
|
* @param query The query to execute
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IModelIncrementalSchemaLocater.d.ts","sourceRoot":"","sources":["../../src/IModelIncrementalSchemaLocater.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEpI,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;GAGG;AACH,qBAAa,8BAA+B,SAAQ,kBAAkB;IACpE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAW;IAEnC;;;;OAIG;gBACS,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAE,yBAAyB;IAKjE
|
|
1
|
+
{"version":3,"file":"IModelIncrementalSchemaLocater.d.ts","sourceRoot":"","sources":["../../src/IModelIncrementalSchemaLocater.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEpI,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;GAGG;AACH,qBAAa,8BAA+B,SAAQ,kBAAkB;IACpE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAW;IAEnC;;;;OAIG;gBACS,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAE,yBAAyB;IAKjE;;;;OAIG;cACa,cAAc,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC;IActF;;;;;OAKG;cACa,YAAY,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;CAU7G"}
|
|
@@ -25,12 +25,6 @@ class IModelIncrementalSchemaLocater extends ecschema_metadata_1.ECSqlSchemaLoca
|
|
|
25
25
|
super(options ?? { useMultipleQueries: true });
|
|
26
26
|
this._iModel = iModel;
|
|
27
27
|
}
|
|
28
|
-
/**
|
|
29
|
-
* Gets the [[IModelDb]] targeted by this schema loader.
|
|
30
|
-
*/
|
|
31
|
-
get iModelDb() {
|
|
32
|
-
return this._iModel;
|
|
33
|
-
}
|
|
34
28
|
/**
|
|
35
29
|
* Gets [[SchemaProps]]($ecschema-metadata) for the given [[SchemaKey]]($ecschema-metadata).
|
|
36
30
|
* This is the full schema json with all elements that are defined in the schema.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IModelIncrementalSchemaLocater.js","sourceRoot":"","sources":["../../src/IModelIncrementalSchemaLocater.ts"],"names":[],"mappings":";;;AAAA;;;gGAGgG;AAChG;;GAEG;AACH,gEAAoI;AACpI,oDAAiE;AAGjE;;;GAGG;AACH,MAAa,8BAA+B,SAAQ,sCAAkB;IACnD,OAAO,CAAW;IAEnC;;;;OAIG;IACH,YAAY,MAAgB,EAAE,OAAmC;QAC/D,KAAK,CAAC,OAAO,IAAI,EAAE,kBAAkB,EAAE,IAAI,EAAE,CAAC,CAAC;QAC/C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"IModelIncrementalSchemaLocater.js","sourceRoot":"","sources":["../../src/IModelIncrementalSchemaLocater.ts"],"names":[],"mappings":";;;AAAA;;;gGAGgG;AAChG;;GAEG;AACH,gEAAoI;AACpI,oDAAiE;AAGjE;;;GAGG;AACH,MAAa,8BAA+B,SAAQ,sCAAkB;IACnD,OAAO,CAAW;IAEnC;;;;OAIG;IACH,YAAY,MAAgB,EAAE,OAAmC;QAC/D,KAAK,CAAC,OAAO,IAAI,EAAE,kBAAkB,EAAE,IAAI,EAAE,CAAC,CAAC;QAC/C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED;;;;OAIG;IACO,KAAK,CAAC,cAAc,CAAC,SAAoB;QACjD,iFAAiF;QACjF,iFAAiF;QACjF,eAAe;QACf,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE;YACtD,IAAI,CAAC;gBACH,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,SAAS,CAAC,IAAI,CAAgB,CAAC,CAAC;YACtE,CAAC;YACD,OAAO,KAAU,EAAE,CAAC;gBAClB,MAAM,CAAC,KAAc,CAAC,CAAC;YACzB,CAAC;QACH,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACT,CAAC;IAED;;;;;OAKG;IACO,KAAK,CAAC,YAAY,CAAO,KAAa,EAAE,OAA2B;QAC3E,MAAM,eAAe,GAAG,OAAO,IAAI,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,yBAAW,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAEzG,OAAO,IAAI,CAAC,OAAO;aAChB,iBAAiB,CAAC,KAAK,EAAE,eAAe,EAAE;YACzC,SAAS,EAAE,4BAAc,CAAC,qBAAqB;YAC/C,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE;SACjC,CAAC;aACD,OAAO,EAAE,CAAC;IACf,CAAC;CACF;AAhDD,wEAgDC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module iModels\n */\nimport { ECSqlQueryOptions, ECSqlSchemaLocater, ECSqlSchemaLocaterOptions, SchemaKey, SchemaProps } from \"@itwin/ecschema-metadata\";\nimport { QueryBinder, QueryRowFormat } from \"@itwin/core-common\";\nimport { IModelDb } from \"./IModelDb\";\n\n/**\n * A [[ECSqlSchemaLocater]]($ecschema-metadata) implementation that uses the [[IModelDb]] to load schemas incrementally.\n * @beta\n */\nexport class IModelIncrementalSchemaLocater extends ECSqlSchemaLocater {\n private readonly _iModel: IModelDb;\n\n /**\n * Constructs a new IModelIncrementalSchemaLocater instance.\n * @param iModel The [[IModelDb]] to query.\n * @param options Optional [[ECSqlSchemaLocaterOptions]]($ecschema-metadata).\n */\n constructor(iModel: IModelDb, options?: ECSqlSchemaLocaterOptions) {\n super(options ?? { useMultipleQueries: true });\n this._iModel = iModel;\n }\n\n /**\n * Gets [[SchemaProps]]($ecschema-metadata) for the given [[SchemaKey]]($ecschema-metadata).\n * This is the full schema json with all elements that are defined in the schema.\n * @param schemaKey The key of the schema to be resolved.\n */\n protected async getSchemaProps(schemaKey: SchemaKey): Promise<SchemaProps | undefined> {\n // To keep the main thread from being blocked in sync loading cases the resolving\n // is triggered through a timeout. Even if there is no delay, it improves loading\n // time by ~3x.\n return new Promise((resolve, reject) => setTimeout(() => {\n try {\n resolve(this._iModel.getSchemaProps(schemaKey.name) as SchemaProps);\n }\n catch (error: any) {\n reject(error as Error);\n }\n }, 0));\n }\n\n /**\n * Executes an ECSql query against the IModelDb.\n * @param query The query to execute\n * @param options The [[ECSqlQueryOptions]]($ecschema-metadata) to use.\n * @returns A promise that resolves to read-only array of type TRow.\n */\n protected async executeQuery<TRow>(query: string, options?: ECSqlQueryOptions): Promise<ReadonlyArray<TRow>> {\n const queryParameters = options && options.parameters ? QueryBinder.from(options.parameters) : undefined;\n\n return this._iModel\n .createQueryReader(query, queryParameters, {\n rowFormat: QueryRowFormat.UseECSqlPropertyNames,\n limit: { count: options?.limit },\n })\n .toArray();\n }\n}"]}
|
|
@@ -15,16 +15,12 @@ export declare class IModelIncrementalSchemaLocater extends ECSqlSchemaLocater {
|
|
|
15
15
|
* @param options Optional [[ECSqlSchemaLocaterOptions]]($ecschema-metadata).
|
|
16
16
|
*/
|
|
17
17
|
constructor(iModel: IModelDb, options?: ECSqlSchemaLocaterOptions);
|
|
18
|
-
/**
|
|
19
|
-
* Gets the [[IModelDb]] targeted by this schema loader.
|
|
20
|
-
*/
|
|
21
|
-
get iModelDb(): IModelDb;
|
|
22
18
|
/**
|
|
23
19
|
* Gets [[SchemaProps]]($ecschema-metadata) for the given [[SchemaKey]]($ecschema-metadata).
|
|
24
20
|
* This is the full schema json with all elements that are defined in the schema.
|
|
25
21
|
* @param schemaKey The key of the schema to be resolved.
|
|
26
22
|
*/
|
|
27
|
-
getSchemaProps(schemaKey: SchemaKey): Promise<SchemaProps | undefined>;
|
|
23
|
+
protected getSchemaProps(schemaKey: SchemaKey): Promise<SchemaProps | undefined>;
|
|
28
24
|
/**
|
|
29
25
|
* Executes an ECSql query against the IModelDb.
|
|
30
26
|
* @param query The query to execute
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IModelIncrementalSchemaLocater.d.ts","sourceRoot":"","sources":["../../src/IModelIncrementalSchemaLocater.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEpI,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;GAGG;AACH,qBAAa,8BAA+B,SAAQ,kBAAkB;IACpE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAW;IAEnC;;;;OAIG;gBACS,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAE,yBAAyB;IAKjE
|
|
1
|
+
{"version":3,"file":"IModelIncrementalSchemaLocater.d.ts","sourceRoot":"","sources":["../../src/IModelIncrementalSchemaLocater.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEpI,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;GAGG;AACH,qBAAa,8BAA+B,SAAQ,kBAAkB;IACpE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAW;IAEnC;;;;OAIG;gBACS,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAE,yBAAyB;IAKjE;;;;OAIG;cACa,cAAc,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC;IActF;;;;;OAKG;cACa,YAAY,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;CAU7G"}
|
|
@@ -22,12 +22,6 @@ export class IModelIncrementalSchemaLocater extends ECSqlSchemaLocater {
|
|
|
22
22
|
super(options ?? { useMultipleQueries: true });
|
|
23
23
|
this._iModel = iModel;
|
|
24
24
|
}
|
|
25
|
-
/**
|
|
26
|
-
* Gets the [[IModelDb]] targeted by this schema loader.
|
|
27
|
-
*/
|
|
28
|
-
get iModelDb() {
|
|
29
|
-
return this._iModel;
|
|
30
|
-
}
|
|
31
25
|
/**
|
|
32
26
|
* Gets [[SchemaProps]]($ecschema-metadata) for the given [[SchemaKey]]($ecschema-metadata).
|
|
33
27
|
* This is the full schema json with all elements that are defined in the schema.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IModelIncrementalSchemaLocater.js","sourceRoot":"","sources":["../../src/IModelIncrementalSchemaLocater.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AACH,OAAO,EAAqB,kBAAkB,EAAqD,MAAM,0BAA0B,CAAC;AACpI,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C,CAAC,CAAC;IACT,CAAC;IAED;;;;;OAKG;IACO,KAAK,CAAC,YAAY,CAAO,KAAa,EAAE,OAA2B;QAC3E,MAAM,eAAe,GAAG,OAAO,IAAI,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAEzG,OAAO,IAAI,CAAC,OAAO;aAChB,iBAAiB,CAAC,KAAK,EAAE,eAAe,EAAE;YACzC,SAAS,EAAE,cAAc,CAAC,qBAAqB;YAC/C,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE;SACjC,CAAC;aACD,OAAO,EAAE,CAAC;IACf,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module iModels\n */\nimport { ECSqlQueryOptions, ECSqlSchemaLocater, ECSqlSchemaLocaterOptions, SchemaKey, SchemaProps } from \"@itwin/ecschema-metadata\";\nimport { QueryBinder, QueryRowFormat } from \"@itwin/core-common\";\nimport { IModelDb } from \"./IModelDb\";\n\n/**\n * A [[ECSqlSchemaLocater]]($ecschema-metadata) implementation that uses the [[IModelDb]] to load schemas incrementally.\n * @beta\n */\nexport class IModelIncrementalSchemaLocater extends ECSqlSchemaLocater {\n private readonly _iModel: IModelDb;\n\n /**\n * Constructs a new IModelIncrementalSchemaLocater instance.\n * @param iModel The [[IModelDb]] to query.\n * @param options Optional [[ECSqlSchemaLocaterOptions]]($ecschema-metadata).\n */\n constructor(iModel: IModelDb, options?: ECSqlSchemaLocaterOptions) {\n super(options ?? { useMultipleQueries: true });\n this._iModel = iModel;\n }\n\n /**\n * Gets [[SchemaProps]]($ecschema-metadata) for the given [[SchemaKey]]($ecschema-metadata).\n * This is the full schema json with all elements that are defined in the schema.\n * @param schemaKey The key of the schema to be resolved.\n */\n protected async getSchemaProps(schemaKey: SchemaKey): Promise<SchemaProps | undefined> {\n // To keep the main thread from being blocked in sync loading cases the resolving\n // is triggered through a timeout. Even if there is no delay, it improves loading\n // time by ~3x.\n return new Promise((resolve, reject) => setTimeout(() => {\n try {\n resolve(this._iModel.getSchemaProps(schemaKey.name) as SchemaProps);\n }\n catch (error: any) {\n reject(error as Error);\n }\n }, 0));\n }\n\n /**\n * Executes an ECSql query against the IModelDb.\n * @param query The query to execute\n * @param options The [[ECSqlQueryOptions]]($ecschema-metadata) to use.\n * @returns A promise that resolves to read-only array of type TRow.\n */\n protected async executeQuery<TRow>(query: string, options?: ECSqlQueryOptions): Promise<ReadonlyArray<TRow>> {\n const queryParameters = options && options.parameters ? QueryBinder.from(options.parameters) : undefined;\n\n return this._iModel\n .createQueryReader(query, queryParameters, {\n rowFormat: QueryRowFormat.UseECSqlPropertyNames,\n limit: { count: options?.limit },\n })\n .toArray();\n }\n}"]}
|
|
@@ -21,7 +21,7 @@ function isRelationshipClass(item) {
|
|
|
21
21
|
return "source" in item && "target" in item;
|
|
22
22
|
}
|
|
23
23
|
describe("ECSql query tests", function () {
|
|
24
|
-
let
|
|
24
|
+
let schemaLocater;
|
|
25
25
|
function validateItem(name, itemPropObjects, schema) {
|
|
26
26
|
const actualJson = findItem(name, itemPropObjects);
|
|
27
27
|
const expectedItem = schema.getItemSync(name);
|
|
@@ -106,7 +106,7 @@ describe("ECSql query tests", function () {
|
|
|
106
106
|
}
|
|
107
107
|
this.beforeEach(async () => {
|
|
108
108
|
await IncrementalTestHelper.setup();
|
|
109
|
-
|
|
109
|
+
schemaLocater = new TestSqlSchemaLocater(IncrementalTestHelper.iModel);
|
|
110
110
|
});
|
|
111
111
|
afterEach(async () => {
|
|
112
112
|
await IncrementalTestHelper.close();
|
|
@@ -117,7 +117,7 @@ describe("ECSql query tests", function () {
|
|
|
117
117
|
const expectedSchema = await IncrementalTestHelper.context.getSchema(testKey);
|
|
118
118
|
if (!expectedSchema)
|
|
119
119
|
throw new Error(`Could not find schema ${testKey.name}`);
|
|
120
|
-
const actualSchemaProps = await
|
|
120
|
+
const actualSchemaProps = await schemaLocater.getSchemaJson(testKey, IncrementalTestHelper.context);
|
|
121
121
|
const actualSchema = await Schema.fromJson(actualSchemaProps, IncrementalTestHelper.context);
|
|
122
122
|
expect(actualSchema.toJSON()).to.deep.equal(expectedSchema?.toJSON());
|
|
123
123
|
});
|
|
@@ -127,7 +127,7 @@ describe("ECSql query tests", function () {
|
|
|
127
127
|
const schema = await IncrementalTestHelper.context.getSchema(testKey);
|
|
128
128
|
if (!schema)
|
|
129
129
|
throw new Error(`Could not find schema ${testKey.name}`);
|
|
130
|
-
const classPropsObjects = await
|
|
130
|
+
const classPropsObjects = await schemaLocater.getEntities(testKey.name, IncrementalTestHelper.context);
|
|
131
131
|
const entityOneProps = findItem("EntityOne", classPropsObjects);
|
|
132
132
|
const entityTwoProps = findItem("EntityTwo", classPropsObjects);
|
|
133
133
|
const expectedEntityOne = await schema.getEntityClass("EntityOne");
|
|
@@ -157,7 +157,7 @@ describe("ECSql query tests", function () {
|
|
|
157
157
|
const schema = await IncrementalTestHelper.context.getSchema(testKey);
|
|
158
158
|
if (!schema)
|
|
159
159
|
throw new Error(`Could not find schema ${testKey.name}`);
|
|
160
|
-
const classPropsObjects = await
|
|
160
|
+
const classPropsObjects = await schemaLocater.getEntities(testKey.name, IncrementalTestHelper.context);
|
|
161
161
|
expect(classPropsObjects.length).to.be.greaterThan(0);
|
|
162
162
|
validateItem("EntityModifierNone", classPropsObjects, schema);
|
|
163
163
|
validateItem("EntityModifierAbstract", classPropsObjects, schema);
|
|
@@ -169,7 +169,7 @@ describe("ECSql query tests", function () {
|
|
|
169
169
|
const schema = await IncrementalTestHelper.context.getSchema(testKey);
|
|
170
170
|
if (!schema)
|
|
171
171
|
throw new Error(`Could not find schema ${testKey.name}`);
|
|
172
|
-
const classPropsObjects = await
|
|
172
|
+
const classPropsObjects = await schemaLocater.getStructs(testKey.name, IncrementalTestHelper.context);
|
|
173
173
|
expect(classPropsObjects.length).to.be.greaterThan(0);
|
|
174
174
|
validateItem("StructModifierNone", classPropsObjects, schema);
|
|
175
175
|
validateItem("StructModifierAbstract", classPropsObjects, schema);
|
|
@@ -181,7 +181,7 @@ describe("ECSql query tests", function () {
|
|
|
181
181
|
const schema = await IncrementalTestHelper.context.getSchema(testKey);
|
|
182
182
|
if (!schema)
|
|
183
183
|
throw new Error(`Could not find schema ${testKey.name}`);
|
|
184
|
-
const classPropsObjects = await
|
|
184
|
+
const classPropsObjects = await schemaLocater.getMixins(testKey.name, IncrementalTestHelper.context);
|
|
185
185
|
expect(classPropsObjects.length).to.be.greaterThan(0);
|
|
186
186
|
validateItem("IBaseMixin", classPropsObjects, schema);
|
|
187
187
|
validateItem("ITestMixin", classPropsObjects, schema);
|
|
@@ -192,7 +192,7 @@ describe("ECSql query tests", function () {
|
|
|
192
192
|
const schema = await IncrementalTestHelper.context.getSchema(testKey);
|
|
193
193
|
if (!schema)
|
|
194
194
|
throw new Error(`Could not find schema ${testKey.name}`);
|
|
195
|
-
const classPropsObjects = await
|
|
195
|
+
const classPropsObjects = await schemaLocater.getRelationships(testKey.name, IncrementalTestHelper.context);
|
|
196
196
|
expect(classPropsObjects.length).to.be.greaterThan(0);
|
|
197
197
|
validateItem("OwnerOwnsVehicles", classPropsObjects, schema);
|
|
198
198
|
validateItem("OwnerOwnsCars", classPropsObjects, schema);
|
|
@@ -205,7 +205,7 @@ describe("ECSql query tests", function () {
|
|
|
205
205
|
const schema = await IncrementalTestHelper.context.getSchema(testKey);
|
|
206
206
|
if (!schema)
|
|
207
207
|
throw new Error(`Could not find schema ${testKey.name}`);
|
|
208
|
-
const classPropsObjects = await
|
|
208
|
+
const classPropsObjects = await schemaLocater.getCustomAttributeClasses(testKey.name, IncrementalTestHelper.context);
|
|
209
209
|
expect(classPropsObjects.length).to.be.greaterThan(0);
|
|
210
210
|
validateItem("CustomAttributeModifierNone", classPropsObjects, schema);
|
|
211
211
|
validateItem("CustomAttributeModifierSealed", classPropsObjects, schema);
|
|
@@ -217,7 +217,7 @@ describe("ECSql query tests", function () {
|
|
|
217
217
|
const schema = await IncrementalTestHelper.context.getSchema(testKey);
|
|
218
218
|
if (!schema)
|
|
219
219
|
throw new Error(`Could not find schema ${testKey.name}`);
|
|
220
|
-
const itemPropsObjects = await
|
|
220
|
+
const itemPropsObjects = await schemaLocater.getKindOfQuantities(testKey.name, IncrementalTestHelper.context);
|
|
221
221
|
expect(itemPropsObjects.length).to.be.greaterThan(0);
|
|
222
222
|
validateItem("ACCELERATION", itemPropsObjects, schema);
|
|
223
223
|
validateItem("ANGLE", itemPropsObjects, schema);
|
|
@@ -228,7 +228,7 @@ describe("ECSql query tests", function () {
|
|
|
228
228
|
const schema = await IncrementalTestHelper.context.getSchema(testKey);
|
|
229
229
|
if (!schema)
|
|
230
230
|
throw new Error(`Could not find schema ${testKey.name}`);
|
|
231
|
-
const itemPropsObjects = await
|
|
231
|
+
const itemPropsObjects = await schemaLocater.getPropertyCategories(testKey.name, IncrementalTestHelper.context);
|
|
232
232
|
expect(itemPropsObjects.length).to.be.greaterThan(0);
|
|
233
233
|
validateItem("PropertyCategory1", itemPropsObjects, schema);
|
|
234
234
|
validateItem("PropertyCategory2", itemPropsObjects, schema);
|
|
@@ -239,7 +239,7 @@ describe("ECSql query tests", function () {
|
|
|
239
239
|
const schema = await IncrementalTestHelper.context.getSchema(testKey);
|
|
240
240
|
if (!schema)
|
|
241
241
|
throw new Error(`Could not find schema ${testKey.name}`);
|
|
242
|
-
const itemPropsObjects = await
|
|
242
|
+
const itemPropsObjects = await schemaLocater.getEnumerations(testKey.name, IncrementalTestHelper.context);
|
|
243
243
|
expect(itemPropsObjects.length).to.be.greaterThan(0);
|
|
244
244
|
validateItem("IntEnumeration", itemPropsObjects, schema);
|
|
245
245
|
validateItem("StringEnumeration", itemPropsObjects, schema);
|
|
@@ -250,7 +250,7 @@ describe("ECSql query tests", function () {
|
|
|
250
250
|
const schema = await IncrementalTestHelper.context.getSchema(testKey);
|
|
251
251
|
if (!schema)
|
|
252
252
|
throw new Error(`Could not find schema ${testKey.name}`);
|
|
253
|
-
const itemPropsObjects = await
|
|
253
|
+
const itemPropsObjects = await schemaLocater.getUnits(testKey.name, IncrementalTestHelper.context);
|
|
254
254
|
expect(itemPropsObjects.length).to.be.greaterThan(0);
|
|
255
255
|
validateItem("LITRE", itemPropsObjects, schema);
|
|
256
256
|
validateItem("GALLON", itemPropsObjects, schema);
|
|
@@ -263,7 +263,7 @@ describe("ECSql query tests", function () {
|
|
|
263
263
|
const schema = await IncrementalTestHelper.context.getSchema(testKey);
|
|
264
264
|
if (!schema)
|
|
265
265
|
throw new Error(`Could not find schema ${testKey.name}`);
|
|
266
|
-
const itemPropsObjects = await
|
|
266
|
+
const itemPropsObjects = await schemaLocater.getInvertedUnits(testKey.name, IncrementalTestHelper.context);
|
|
267
267
|
expect(itemPropsObjects.length).to.be.greaterThan(0);
|
|
268
268
|
validateItem("FT_HORIZONTAL_PER_FT_VERTICAL", itemPropsObjects, schema);
|
|
269
269
|
});
|
|
@@ -274,7 +274,7 @@ describe("ECSql query tests", function () {
|
|
|
274
274
|
const schema = await IncrementalTestHelper.context.getSchema(testKey);
|
|
275
275
|
if (!schema)
|
|
276
276
|
throw new Error(`Could not find schema ${testKey.name}`);
|
|
277
|
-
const itemPropsObjects = await
|
|
277
|
+
const itemPropsObjects = await schemaLocater.getUnitSystems(testKey.name, IncrementalTestHelper.context);
|
|
278
278
|
expect(itemPropsObjects.length).to.be.greaterThan(0);
|
|
279
279
|
validateItem("USCUSTOM", itemPropsObjects, schema);
|
|
280
280
|
});
|
|
@@ -285,7 +285,7 @@ describe("ECSql query tests", function () {
|
|
|
285
285
|
const schema = await IncrementalTestHelper.context.getSchema(testKey);
|
|
286
286
|
if (!schema)
|
|
287
287
|
throw new Error(`Could not find schema ${testKey.name}`);
|
|
288
|
-
const itemPropsObjects = await
|
|
288
|
+
const itemPropsObjects = await schemaLocater.getConstants(testKey.name, IncrementalTestHelper.context);
|
|
289
289
|
expect(itemPropsObjects.length).to.be.greaterThan(0);
|
|
290
290
|
validateItem("KILO", itemPropsObjects, schema);
|
|
291
291
|
validateItem("HALF_PI", itemPropsObjects, schema);
|
|
@@ -297,7 +297,7 @@ describe("ECSql query tests", function () {
|
|
|
297
297
|
const schema = await IncrementalTestHelper.context.getSchema(testKey);
|
|
298
298
|
if (!schema)
|
|
299
299
|
throw new Error(`Could not find schema ${testKey.name}`);
|
|
300
|
-
const itemPropsObjects = await
|
|
300
|
+
const itemPropsObjects = await schemaLocater.getPhenomenon(testKey.name, IncrementalTestHelper.context);
|
|
301
301
|
expect(itemPropsObjects.length).to.be.greaterThan(0);
|
|
302
302
|
validateItem("NUMBER", itemPropsObjects, schema);
|
|
303
303
|
validateItem("LENGTH_RATIO", itemPropsObjects, schema);
|
|
@@ -309,7 +309,7 @@ describe("ECSql query tests", function () {
|
|
|
309
309
|
const schema = await IncrementalTestHelper.context.getSchema(testKey);
|
|
310
310
|
if (!schema)
|
|
311
311
|
throw new Error(`Could not find schema ${testKey.name}`);
|
|
312
|
-
const itemPropsObjects = await
|
|
312
|
+
const itemPropsObjects = await schemaLocater.getFormats(testKey.name, IncrementalTestHelper.context);
|
|
313
313
|
expect(itemPropsObjects.length).to.be.greaterThan(0);
|
|
314
314
|
for (const props of itemPropsObjects) {
|
|
315
315
|
validateItem(props.name, itemPropsObjects, schema);
|
|
@@ -321,7 +321,7 @@ describe("ECSql query tests", function () {
|
|
|
321
321
|
const schema = await IncrementalTestHelper.context.getSchema(testKey);
|
|
322
322
|
if (!schema)
|
|
323
323
|
throw new Error(`Could not find schema ${testKey.name}`);
|
|
324
|
-
const itemPropsObjects = await
|
|
324
|
+
const itemPropsObjects = await schemaLocater.getFormats(testKey.name, IncrementalTestHelper.context);
|
|
325
325
|
expect(itemPropsObjects.length).to.be.greaterThan(0);
|
|
326
326
|
for (const props of itemPropsObjects) {
|
|
327
327
|
validateItem(props.name, itemPropsObjects, schema);
|
|
@@ -333,7 +333,7 @@ describe("ECSql query tests", function () {
|
|
|
333
333
|
const schema = await IncrementalTestHelper.context.getSchema(testKey);
|
|
334
334
|
if (!schema)
|
|
335
335
|
throw new Error(`Could not find schema ${testKey.name}`);
|
|
336
|
-
const itemPropsObjects = await
|
|
336
|
+
const itemPropsObjects = await schemaLocater.getStructs(testKey.name, IncrementalTestHelper.context);
|
|
337
337
|
expect(itemPropsObjects.length).to.be.greaterThan(0);
|
|
338
338
|
for (const props of itemPropsObjects) {
|
|
339
339
|
validateItem(props.name, itemPropsObjects, schema);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ECSqlQueries.test.js","sourceRoot":"","sources":["../../../../src/test/incrementalSchemaLocater/ECSqlQueries.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4E,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACvJ,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,KAAK,mBAAmB,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpE,GAAG,CAAC,mBAAmB,CAAC,CAAC;AAEzB,SAAS,QAAQ,CAA+B,IAAY,EAAE,OAAY;IACxE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAqB,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;IACtE,IAAI,CAAC,IAAI;QACP,MAAM,IAAI,KAAK,CAAC,+BAA+B,IAAI,GAAG,CAAC,CAAC;IAC1D,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,YAAY,CAA6B,IAAY,EAAE,OAAY;IAC1E,OAAO,OAAO,CAAC,IAAI,CAA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C;IAEH,EAAE,CAAC,8CAA8C,EAAE,KAAK;QACtD,MAAM,OAAO,GAAG,IAAI,SAAS,CAAC,6BAA6B,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QACtE,MAAM,qBAAqB,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;QAElD,MAAM,MAAM,GAAG,MAAM,qBAAqB,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACtE,IAAI,CAAC,MAAM;YACT,MAAM,IAAI,KAAK,CAAC,yBAAyB,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;QAE3D,MAAM,gBAAgB,GAAG,MAAM,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,qBAAqB,CAAC,OAAO,CAAC,CAAC;QACpG,MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;QAErD,KAAK,MAAM,KAAK,IAAI,gBAAgB,EAAE,CAAC;YACrC,YAAY,CAAC,KAAK,CAAC,IAAK,EAAE,gBAAgB,EAAE,MAAM,CAAC,CAAC;QACtD,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { AnyPropertyProps, AnySchemaItemProps, ClassProps, RelationshipClassProps, Schema, SchemaItemType, SchemaKey } from \"@itwin/ecschema-metadata\";\nimport { IncrementalTestHelper } from \"./utils/IncrementalTestHelper\";\nimport { expect, use } from \"chai\";\nimport * as deepEqualInAnyOrder from \"deep-equal-in-any-order\";\nimport { TestSqlSchemaLocater } from \"./utils/TestSqlSchemaLocater\";\n\nuse(deepEqualInAnyOrder);\n\nfunction findItem<T extends AnySchemaItemProps>(name: string, rowData: T[]) {\n const item = rowData.find((i: AnySchemaItemProps) => i.name === name);\n if (!item)\n throw new Error(`Could not find schema item '${name}'`);\n return item;\n}\n\nfunction findProperty<T extends AnyPropertyProps>(name: string, rowData: T[]) {\n return rowData.find((i: AnyPropertyProps) => i.name === name);\n}\n\nfunction isECClass(item: AnySchemaItemProps): item is ClassProps {\n return item.schemaItemType === SchemaItemType.EntityClass || item.schemaItemType === SchemaItemType.Mixin || item.schemaItemType === SchemaItemType.RelationshipClass ||\n item.schemaItemType === SchemaItemType.StructClass || item.schemaItemType === SchemaItemType.CustomAttributeClass;\n}\n\nfunction isRelationshipClass(item: AnySchemaItemProps): item is RelationshipClassProps {\n return \"source\" in item && \"target\" in item;\n}\n\ndescribe(\"ECSql query tests\", function () {\n let schemaLoader: TestSqlSchemaLocater;\n\n function validateItem(name: string, itemPropObjects: AnySchemaItemProps[], schema: Schema) {\n const actualJson = findItem(name, itemPropObjects);\n const expectedItem = schema.getItemSync(name);\n const expectedJson = expectedItem!.toJSON();\n\n // The following code exists because some data coming from the database will not match the\n // data from the context due to default values. This is OK as long as the conditions are\n // correct. For instance, schemaItem name will not exist in serialized JSON, but does exist\n // coming from the DB. RelationshipConstraint's AbstractConstraint is set when only one\n // constraint class exists coming from the database, but a serialized Relationship will not\n // contain the abstract constraint. The one constraint is 'assumed' to be the abstract constraint.\n\n expect(actualJson.name).to.equal(expectedItem?.name);\n delete (actualJson as any).name;\n\n if (isECClass(actualJson)) {\n if (expectedJson.schemaItemType === \"Mixin\") {\n expect(actualJson.modifier).to.be.oneOf([undefined, 'Abstract']);\n delete (actualJson as any).modifier;\n } else if ((expectedJson as ClassProps).modifier === undefined) {\n expect(actualJson.modifier).to.be.oneOf([undefined, 'None']);\n delete (actualJson as any).modifier;\n }\n }\n if (isRelationshipClass(actualJson)) {\n // abstract can be set via database, but not via context for 1 constraint class\n // so verify constraint and conditions are correct and delete property\n const expectedRelationship = expectedJson as any as RelationshipClassProps;\n if (actualJson.source.abstractConstraint !== expectedRelationship.source.abstractConstraint) {\n expect(actualJson.source.abstractConstraint).to.equal(expectedRelationship.source.constraintClasses[0]);\n expect(actualJson.source.constraintClasses.length).to.equal(1);\n delete (actualJson.source as any).abstractConstraint;\n }\n if (actualJson.target.abstractConstraint !== expectedRelationship.target.abstractConstraint) {\n expect(actualJson.target.abstractConstraint).to.equal(expectedRelationship.target.constraintClasses[0]);\n expect(actualJson.target.constraintClasses.length).to.equal(1);\n delete (actualJson.target as any).abstractConstraint;\n }\n }\n\n if (actualJson.schemaItemType === SchemaItemType.Format) {\n if (undefined !== (actualJson as any).includeZero && undefined === (expectedJson as any).includeZero) {\n expect((actualJson as any).includeZero).to.equal(true);\n delete (actualJson as any).includeZero;\n }\n if ((actualJson as any).composite && undefined !== (actualJson as any).composite.includeZero && undefined === (expectedJson as any).composite.includeZero) {\n expect((actualJson as any).composite.includeZero).to.equal(true);\n delete (actualJson as any).composite.includeZero;\n }\n if ((actualJson as any).composite && undefined !== (actualJson as any).composite.spacer && undefined === (expectedJson as any).composite.spacer) {\n expect((actualJson as any).composite.spacer).to.equal(\" \");\n delete (actualJson as any).composite.spacer;\n }\n if (undefined !== (actualJson as any).decimalSeparator && undefined === (expectedJson as any).decimalSeparator) {\n expect((actualJson as any).decimalSeparator).to.equal(\".\");\n delete (actualJson as any).decimalSeparator;\n }\n if (undefined !== (actualJson as any).roundFactor && undefined === (expectedJson as any).roundFactor) {\n expect((actualJson as any).roundFactor).to.equal(0);\n delete (actualJson as any).roundFactor;\n }\n if (undefined !== (actualJson as any).showSignOption && undefined === (expectedJson as any).showSignOption) {\n expect((actualJson as any).showSignOption).to.equal(\"OnlyNegative\");\n delete (actualJson as any).showSignOption;\n }\n if (undefined !== (actualJson as any).thousandSeparator && undefined === (expectedJson as any).thousandSeparator) {\n expect((actualJson as any).thousandSeparator).to.equal(\",\");\n delete (actualJson as any).thousandSeparator;\n }\n if (undefined !== (actualJson as any).uomSeparator && undefined === (expectedJson as any).uomSeparator) {\n expect((actualJson as any).uomSeparator).to.equal(\" \");\n delete (actualJson as any).uomSeparator;\n }\n if (undefined !== (actualJson as any).spacer && undefined === (expectedJson as any).spacer) {\n expect((actualJson as any).spacer).to.equal(\" \");\n delete (actualJson as any).spacer;\n }\n if (undefined !== (actualJson as any).formatTraits) {\n (actualJson as any).formatTraits = (actualJson as any).formatTraits.map((trait: string) => {\n return trait.charAt(0).toUpperCase() + trait.slice(1);\n });\n }\n }\n\n expect(actualJson).to.deep.equalInAnyOrder(expectedJson);\n }\n\n this.beforeEach(async () => {\n await IncrementalTestHelper.setup();\n schemaLoader = new TestSqlSchemaLocater(IncrementalTestHelper.iModel);\n });\n\n afterEach(async () => {\n await IncrementalTestHelper.close();\n });\n\n it(\"Schema query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"SchemaTest\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const expectedSchema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!expectedSchema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const actualSchemaProps = await schemaLoader.getSchemaJson(testKey, IncrementalTestHelper.context);\n const actualSchema = await Schema.fromJson(actualSchemaProps!, IncrementalTestHelper.context);\n\n expect(actualSchema.toJSON()).to.deep.equal(expectedSchema?.toJSON());\n });\n\n it(\"Property query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"PropertyTest\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const classPropsObjects = await schemaLoader.getEntities(testKey.name, IncrementalTestHelper.context);\n const entityOneProps = findItem(\"EntityOne\", classPropsObjects);\n const entityTwoProps = findItem(\"EntityTwo\", classPropsObjects);\n const expectedEntityOne = await schema.getEntityClass(\"EntityOne\");\n const expectedEntityTwo = await schema.getEntityClass(\"EntityTwo\");\n\n const validateProperty = (propertyName: string, actualItem = entityOneProps, expectedItem = expectedEntityOne) => {\n const actualProperty = findProperty(propertyName, actualItem.properties!);\n const expectedProperty = expectedItem?.getPropertySync(propertyName);\n // if maxOccurs is the maximum int value in the context Schema,\n // the property from the DB will not have a value\n if ((expectedProperty as any).maxOccurs === 2147483647) {\n expect((actualProperty as any).maxOccurs).to.be.undefined;\n // set so comparison will pass\n (actualProperty as any).maxOccurs = 2147483647;\n }\n\n expect(actualProperty).to.deep.equal(expectedProperty?.toJSON());\n };\n\n // All but one testable property is in EntityOne\n for (const property of await expectedEntityOne!.getProperties(true)) {\n validateProperty(property.name);\n }\n // Backward direction Navigation property is in EntityTwo\n validateProperty(\"EntityTwoParent\", entityTwoProps, expectedEntityTwo);\n\n });\n\n it(\"Entity query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"EntityTest\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const classPropsObjects = await schemaLoader.getEntities(testKey.name, IncrementalTestHelper.context);\n expect(classPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"EntityModifierNone\", classPropsObjects, schema);\n validateItem(\"EntityModifierAbstract\", classPropsObjects, schema);\n validateItem(\"EntityModifierSealed\", classPropsObjects, schema);\n });\n\n it(\"Struct query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"StructTest\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const classPropsObjects = await schemaLoader.getStructs(testKey.name, IncrementalTestHelper.context);\n expect(classPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"StructModifierNone\", classPropsObjects, schema);\n validateItem(\"StructModifierAbstract\", classPropsObjects, schema);\n validateItem(\"StructModifierSealed\", classPropsObjects, schema);\n });\n\n it(\"Mixin query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"MixinTest\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const classPropsObjects = await schemaLoader.getMixins(testKey.name, IncrementalTestHelper.context);\n expect(classPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"IBaseMixin\", classPropsObjects, schema);\n validateItem(\"ITestMixin\", classPropsObjects, schema);\n });\n\n it(\"Relationship query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"RelationshipTest\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const classPropsObjects = await schemaLoader.getRelationships(testKey.name, IncrementalTestHelper.context);\n expect(classPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"OwnerOwnsVehicles\", classPropsObjects, schema);\n validateItem(\"OwnerOwnsCars\", classPropsObjects, schema);\n validateItem(\"OwnerOwnsAmericanCars\", classPropsObjects, schema);\n validateItem(\"PhysicalModelBreaksDownCarElement\", classPropsObjects, schema);\n });\n\n it(\"CustomAttributeClass query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"CustomAttributeClassTest\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const classPropsObjects = await schemaLoader.getCustomAttributeClasses(testKey.name, IncrementalTestHelper.context);\n expect(classPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"CustomAttributeModifierNone\", classPropsObjects, schema);\n validateItem(\"CustomAttributeModifierSealed\", classPropsObjects, schema);\n validateItem(\"CustomAttributeModifierAbstract\", classPropsObjects, schema);\n });\n\n it(\"KindOfQuantity query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"KindOfQuantityTest\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLoader.getKindOfQuantities(testKey.name, IncrementalTestHelper.context);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"ACCELERATION\", itemPropsObjects, schema);\n validateItem(\"ANGLE\", itemPropsObjects, schema);\n });\n\n it(\"PropertyCategory query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"PropertyCategoryTest\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLoader.getPropertyCategories(testKey.name, IncrementalTestHelper.context);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"PropertyCategory1\", itemPropsObjects, schema);\n validateItem(\"PropertyCategory2\", itemPropsObjects, schema);\n });\n\n it(\"Enumeration query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"EnumerationTest\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLoader.getEnumerations(testKey.name, IncrementalTestHelper.context);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"IntEnumeration\", itemPropsObjects, schema);\n validateItem(\"StringEnumeration\", itemPropsObjects, schema);\n });\n\n it(\"Unit query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"UnitTest\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLoader.getUnits(testKey.name, IncrementalTestHelper.context);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"LITRE\", itemPropsObjects, schema);\n validateItem(\"GALLON\", itemPropsObjects, schema);\n validateItem(\"ACRE\", itemPropsObjects, schema);\n validateItem(\"FAHRENHEIT\", itemPropsObjects, schema);\n });\n\n it(\"InvertedUnit query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"InvertedUnitTest\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLoader.getInvertedUnits(testKey.name, IncrementalTestHelper.context);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"FT_HORIZONTAL_PER_FT_VERTICAL\", itemPropsObjects, schema);\n });\n\n it(\"UnitSystem query, props parsed successfully\", async function () {\n // There's a UnitSystem in there.\n const testKey = new SchemaKey(\"InvertedUnitTest\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLoader.getUnitSystems(testKey.name, IncrementalTestHelper.context);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"USCUSTOM\", itemPropsObjects, schema);\n });\n\n it(\"Constant query, props parsed successfully\", async function () {\n // There's a UnitSystem in there.\n const testKey = new SchemaKey(\"ConstantTest\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLoader.getConstants(testKey.name, IncrementalTestHelper.context);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"KILO\", itemPropsObjects, schema);\n validateItem(\"HALF_PI\", itemPropsObjects, schema);\n });\n\n it(\"Phenomenon query, props parsed successfully\", async function () {\n // There's a Phenomenon in there.\n const testKey = new SchemaKey(\"ConstantTest\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLoader.getPhenomenon(testKey.name, IncrementalTestHelper.context);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"NUMBER\", itemPropsObjects, schema);\n validateItem(\"LENGTH_RATIO\", itemPropsObjects, schema);\n });\n\n it(\"Format Schema parses successfully\", async function () {\n // Using installed Formats schema\n const testKey = new SchemaKey(\"Formats\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLoader.getFormats(testKey.name, IncrementalTestHelper.context);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n for (const props of itemPropsObjects) {\n validateItem(props.name!, itemPropsObjects, schema);\n }\n });\n\n it(\"Comprehensive Format parses successfully\", async function () {\n const testKey = new SchemaKey(\"FormatTest\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLoader.getFormats(testKey.name, IncrementalTestHelper.context);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n for (const props of itemPropsObjects) {\n validateItem(props.name!, itemPropsObjects, schema);\n }\n });\n\n it(\"CustomAttribute instances parse successfully\", async function () {\n const testKey = new SchemaKey(\"CustomAttributeInstanceTest\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLoader.getStructs(testKey.name, IncrementalTestHelper.context);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n for (const props of itemPropsObjects) {\n validateItem(props.name!, itemPropsObjects, schema);\n }\n });\n});"]}
|
|
1
|
+
{"version":3,"file":"ECSqlQueries.test.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BAAqB,CAAC,OAAO,CAAC,CAAC;QACrG,MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;QAErD,KAAK,MAAM,KAAK,IAAI,gBAAgB,EAAE,CAAC;YACrC,YAAY,CAAC,KAAK,CAAC,IAAK,EAAE,gBAAgB,EAAE,MAAM,CAAC,CAAC;QACtD,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { AnyPropertyProps, AnySchemaItemProps, ClassProps, RelationshipClassProps, Schema, SchemaItemType, SchemaKey } from \"@itwin/ecschema-metadata\";\nimport { IncrementalTestHelper } from \"./utils/IncrementalTestHelper\";\nimport { expect, use } from \"chai\";\nimport * as deepEqualInAnyOrder from \"deep-equal-in-any-order\";\nimport { TestSqlSchemaLocater } from \"./utils/TestSqlSchemaLocater\";\n\nuse(deepEqualInAnyOrder);\n\nfunction findItem<T extends AnySchemaItemProps>(name: string, rowData: T[]) {\n const item = rowData.find((i: AnySchemaItemProps) => i.name === name);\n if (!item)\n throw new Error(`Could not find schema item '${name}'`);\n return item;\n}\n\nfunction findProperty<T extends AnyPropertyProps>(name: string, rowData: T[]) {\n return rowData.find((i: AnyPropertyProps) => i.name === name);\n}\n\nfunction isECClass(item: AnySchemaItemProps): item is ClassProps {\n return item.schemaItemType === SchemaItemType.EntityClass || item.schemaItemType === SchemaItemType.Mixin || item.schemaItemType === SchemaItemType.RelationshipClass ||\n item.schemaItemType === SchemaItemType.StructClass || item.schemaItemType === SchemaItemType.CustomAttributeClass;\n}\n\nfunction isRelationshipClass(item: AnySchemaItemProps): item is RelationshipClassProps {\n return \"source\" in item && \"target\" in item;\n}\n\ndescribe(\"ECSql query tests\", function () {\n let schemaLocater: TestSqlSchemaLocater;\n\n function validateItem(name: string, itemPropObjects: AnySchemaItemProps[], schema: Schema) {\n const actualJson = findItem(name, itemPropObjects);\n const expectedItem = schema.getItemSync(name);\n const expectedJson = expectedItem!.toJSON();\n\n // The following code exists because some data coming from the database will not match the\n // data from the context due to default values. This is OK as long as the conditions are\n // correct. For instance, schemaItem name will not exist in serialized JSON, but does exist\n // coming from the DB. RelationshipConstraint's AbstractConstraint is set when only one\n // constraint class exists coming from the database, but a serialized Relationship will not\n // contain the abstract constraint. The one constraint is 'assumed' to be the abstract constraint.\n\n expect(actualJson.name).to.equal(expectedItem?.name);\n delete (actualJson as any).name;\n\n if (isECClass(actualJson)) {\n if (expectedJson.schemaItemType === \"Mixin\") {\n expect(actualJson.modifier).to.be.oneOf([undefined, 'Abstract']);\n delete (actualJson as any).modifier;\n } else if ((expectedJson as ClassProps).modifier === undefined) {\n expect(actualJson.modifier).to.be.oneOf([undefined, 'None']);\n delete (actualJson as any).modifier;\n }\n }\n if (isRelationshipClass(actualJson)) {\n // abstract can be set via database, but not via context for 1 constraint class\n // so verify constraint and conditions are correct and delete property\n const expectedRelationship = expectedJson as any as RelationshipClassProps;\n if (actualJson.source.abstractConstraint !== expectedRelationship.source.abstractConstraint) {\n expect(actualJson.source.abstractConstraint).to.equal(expectedRelationship.source.constraintClasses[0]);\n expect(actualJson.source.constraintClasses.length).to.equal(1);\n delete (actualJson.source as any).abstractConstraint;\n }\n if (actualJson.target.abstractConstraint !== expectedRelationship.target.abstractConstraint) {\n expect(actualJson.target.abstractConstraint).to.equal(expectedRelationship.target.constraintClasses[0]);\n expect(actualJson.target.constraintClasses.length).to.equal(1);\n delete (actualJson.target as any).abstractConstraint;\n }\n }\n\n if (actualJson.schemaItemType === SchemaItemType.Format) {\n if (undefined !== (actualJson as any).includeZero && undefined === (expectedJson as any).includeZero) {\n expect((actualJson as any).includeZero).to.equal(true);\n delete (actualJson as any).includeZero;\n }\n if ((actualJson as any).composite && undefined !== (actualJson as any).composite.includeZero && undefined === (expectedJson as any).composite.includeZero) {\n expect((actualJson as any).composite.includeZero).to.equal(true);\n delete (actualJson as any).composite.includeZero;\n }\n if ((actualJson as any).composite && undefined !== (actualJson as any).composite.spacer && undefined === (expectedJson as any).composite.spacer) {\n expect((actualJson as any).composite.spacer).to.equal(\" \");\n delete (actualJson as any).composite.spacer;\n }\n if (undefined !== (actualJson as any).decimalSeparator && undefined === (expectedJson as any).decimalSeparator) {\n expect((actualJson as any).decimalSeparator).to.equal(\".\");\n delete (actualJson as any).decimalSeparator;\n }\n if (undefined !== (actualJson as any).roundFactor && undefined === (expectedJson as any).roundFactor) {\n expect((actualJson as any).roundFactor).to.equal(0);\n delete (actualJson as any).roundFactor;\n }\n if (undefined !== (actualJson as any).showSignOption && undefined === (expectedJson as any).showSignOption) {\n expect((actualJson as any).showSignOption).to.equal(\"OnlyNegative\");\n delete (actualJson as any).showSignOption;\n }\n if (undefined !== (actualJson as any).thousandSeparator && undefined === (expectedJson as any).thousandSeparator) {\n expect((actualJson as any).thousandSeparator).to.equal(\",\");\n delete (actualJson as any).thousandSeparator;\n }\n if (undefined !== (actualJson as any).uomSeparator && undefined === (expectedJson as any).uomSeparator) {\n expect((actualJson as any).uomSeparator).to.equal(\" \");\n delete (actualJson as any).uomSeparator;\n }\n if (undefined !== (actualJson as any).spacer && undefined === (expectedJson as any).spacer) {\n expect((actualJson as any).spacer).to.equal(\" \");\n delete (actualJson as any).spacer;\n }\n if (undefined !== (actualJson as any).formatTraits) {\n (actualJson as any).formatTraits = (actualJson as any).formatTraits.map((trait: string) => {\n return trait.charAt(0).toUpperCase() + trait.slice(1);\n });\n }\n }\n\n expect(actualJson).to.deep.equalInAnyOrder(expectedJson);\n }\n\n this.beforeEach(async () => {\n await IncrementalTestHelper.setup();\n schemaLocater = new TestSqlSchemaLocater(IncrementalTestHelper.iModel);\n });\n\n afterEach(async () => {\n await IncrementalTestHelper.close();\n });\n\n it(\"Schema query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"SchemaTest\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const expectedSchema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!expectedSchema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const actualSchemaProps = await schemaLocater.getSchemaJson(testKey, IncrementalTestHelper.context);\n const actualSchema = await Schema.fromJson(actualSchemaProps!, IncrementalTestHelper.context);\n\n expect(actualSchema.toJSON()).to.deep.equal(expectedSchema?.toJSON());\n });\n\n it(\"Property query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"PropertyTest\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const classPropsObjects = await schemaLocater.getEntities(testKey.name, IncrementalTestHelper.context);\n const entityOneProps = findItem(\"EntityOne\", classPropsObjects);\n const entityTwoProps = findItem(\"EntityTwo\", classPropsObjects);\n const expectedEntityOne = await schema.getEntityClass(\"EntityOne\");\n const expectedEntityTwo = await schema.getEntityClass(\"EntityTwo\");\n\n const validateProperty = (propertyName: string, actualItem = entityOneProps, expectedItem = expectedEntityOne) => {\n const actualProperty = findProperty(propertyName, actualItem.properties!);\n const expectedProperty = expectedItem?.getPropertySync(propertyName);\n // if maxOccurs is the maximum int value in the context Schema,\n // the property from the DB will not have a value\n if ((expectedProperty as any).maxOccurs === 2147483647) {\n expect((actualProperty as any).maxOccurs).to.be.undefined;\n // set so comparison will pass\n (actualProperty as any).maxOccurs = 2147483647;\n }\n\n expect(actualProperty).to.deep.equal(expectedProperty?.toJSON());\n };\n\n // All but one testable property is in EntityOne\n for (const property of await expectedEntityOne!.getProperties(true)) {\n validateProperty(property.name);\n }\n // Backward direction Navigation property is in EntityTwo\n validateProperty(\"EntityTwoParent\", entityTwoProps, expectedEntityTwo);\n\n });\n\n it(\"Entity query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"EntityTest\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const classPropsObjects = await schemaLocater.getEntities(testKey.name, IncrementalTestHelper.context);\n expect(classPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"EntityModifierNone\", classPropsObjects, schema);\n validateItem(\"EntityModifierAbstract\", classPropsObjects, schema);\n validateItem(\"EntityModifierSealed\", classPropsObjects, schema);\n });\n\n it(\"Struct query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"StructTest\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const classPropsObjects = await schemaLocater.getStructs(testKey.name, IncrementalTestHelper.context);\n expect(classPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"StructModifierNone\", classPropsObjects, schema);\n validateItem(\"StructModifierAbstract\", classPropsObjects, schema);\n validateItem(\"StructModifierSealed\", classPropsObjects, schema);\n });\n\n it(\"Mixin query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"MixinTest\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const classPropsObjects = await schemaLocater.getMixins(testKey.name, IncrementalTestHelper.context);\n expect(classPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"IBaseMixin\", classPropsObjects, schema);\n validateItem(\"ITestMixin\", classPropsObjects, schema);\n });\n\n it(\"Relationship query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"RelationshipTest\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const classPropsObjects = await schemaLocater.getRelationships(testKey.name, IncrementalTestHelper.context);\n expect(classPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"OwnerOwnsVehicles\", classPropsObjects, schema);\n validateItem(\"OwnerOwnsCars\", classPropsObjects, schema);\n validateItem(\"OwnerOwnsAmericanCars\", classPropsObjects, schema);\n validateItem(\"PhysicalModelBreaksDownCarElement\", classPropsObjects, schema);\n });\n\n it(\"CustomAttributeClass query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"CustomAttributeClassTest\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const classPropsObjects = await schemaLocater.getCustomAttributeClasses(testKey.name, IncrementalTestHelper.context);\n expect(classPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"CustomAttributeModifierNone\", classPropsObjects, schema);\n validateItem(\"CustomAttributeModifierSealed\", classPropsObjects, schema);\n validateItem(\"CustomAttributeModifierAbstract\", classPropsObjects, schema);\n });\n\n it(\"KindOfQuantity query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"KindOfQuantityTest\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLocater.getKindOfQuantities(testKey.name, IncrementalTestHelper.context);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"ACCELERATION\", itemPropsObjects, schema);\n validateItem(\"ANGLE\", itemPropsObjects, schema);\n });\n\n it(\"PropertyCategory query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"PropertyCategoryTest\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLocater.getPropertyCategories(testKey.name, IncrementalTestHelper.context);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"PropertyCategory1\", itemPropsObjects, schema);\n validateItem(\"PropertyCategory2\", itemPropsObjects, schema);\n });\n\n it(\"Enumeration query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"EnumerationTest\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLocater.getEnumerations(testKey.name, IncrementalTestHelper.context);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"IntEnumeration\", itemPropsObjects, schema);\n validateItem(\"StringEnumeration\", itemPropsObjects, schema);\n });\n\n it(\"Unit query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"UnitTest\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLocater.getUnits(testKey.name, IncrementalTestHelper.context);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"LITRE\", itemPropsObjects, schema);\n validateItem(\"GALLON\", itemPropsObjects, schema);\n validateItem(\"ACRE\", itemPropsObjects, schema);\n validateItem(\"FAHRENHEIT\", itemPropsObjects, schema);\n });\n\n it(\"InvertedUnit query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"InvertedUnitTest\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLocater.getInvertedUnits(testKey.name, IncrementalTestHelper.context);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"FT_HORIZONTAL_PER_FT_VERTICAL\", itemPropsObjects, schema);\n });\n\n it(\"UnitSystem query, props parsed successfully\", async function () {\n // There's a UnitSystem in there.\n const testKey = new SchemaKey(\"InvertedUnitTest\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLocater.getUnitSystems(testKey.name, IncrementalTestHelper.context);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"USCUSTOM\", itemPropsObjects, schema);\n });\n\n it(\"Constant query, props parsed successfully\", async function () {\n // There's a UnitSystem in there.\n const testKey = new SchemaKey(\"ConstantTest\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLocater.getConstants(testKey.name, IncrementalTestHelper.context);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"KILO\", itemPropsObjects, schema);\n validateItem(\"HALF_PI\", itemPropsObjects, schema);\n });\n\n it(\"Phenomenon query, props parsed successfully\", async function () {\n // There's a Phenomenon in there.\n const testKey = new SchemaKey(\"ConstantTest\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLocater.getPhenomenon(testKey.name, IncrementalTestHelper.context);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"NUMBER\", itemPropsObjects, schema);\n validateItem(\"LENGTH_RATIO\", itemPropsObjects, schema);\n });\n\n it(\"Format Schema parses successfully\", async function () {\n // Using installed Formats schema\n const testKey = new SchemaKey(\"Formats\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLocater.getFormats(testKey.name, IncrementalTestHelper.context);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n for (const props of itemPropsObjects) {\n validateItem(props.name!, itemPropsObjects, schema);\n }\n });\n\n it(\"Comprehensive Format parses successfully\", async function () {\n const testKey = new SchemaKey(\"FormatTest\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLocater.getFormats(testKey.name, IncrementalTestHelper.context);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n for (const props of itemPropsObjects) {\n validateItem(props.name!, itemPropsObjects, schema);\n }\n });\n\n it(\"CustomAttribute instances parse successfully\", async function () {\n const testKey = new SchemaKey(\"CustomAttributeInstanceTest\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLocater.getStructs(testKey.name, IncrementalTestHelper.context);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n for (const props of itemPropsObjects) {\n validateItem(props.name!, itemPropsObjects, schema);\n }\n });\n});"]}
|
|
@@ -1,9 +1,24 @@
|
|
|
1
|
-
import { ECSqlQueryOptions, ECSqlSchemaLocater, ECSqlSchemaLocaterOptions, SchemaKey, SchemaProps } from "@itwin/ecschema-metadata";
|
|
1
|
+
import { ECSqlQueryOptions, ECSqlSchemaLocater, ECSqlSchemaLocaterOptions, SchemaContext, SchemaKey, SchemaProps } from "@itwin/ecschema-metadata";
|
|
2
2
|
import { IModelDb } from "../../../IModelDb";
|
|
3
3
|
export declare class TestSqlSchemaLocater extends ECSqlSchemaLocater {
|
|
4
4
|
private _iModel;
|
|
5
5
|
constructor(iModel: IModelDb, queryOptions?: ECSqlSchemaLocaterOptions);
|
|
6
6
|
protected executeQuery<TRow>(query: string, options?: ECSqlQueryOptions): Promise<ReadonlyArray<TRow>>;
|
|
7
7
|
protected getSchemaProps(_schemaKey: SchemaKey): Promise<SchemaProps | undefined>;
|
|
8
|
+
getSchemaJson(schemaKey: SchemaKey, context: SchemaContext): Promise<SchemaProps | undefined>;
|
|
9
|
+
getConstants(schema: string, context: SchemaContext): Promise<import("@itwin/ecschema-metadata").ConstantProps[]>;
|
|
10
|
+
getCustomAttributeClasses(schema: string, context: SchemaContext, queryOverride?: string): Promise<import("@itwin/ecschema-metadata").CustomAttributeClassProps[]>;
|
|
11
|
+
getEntities(schema: string, context: SchemaContext, queryOverride?: string): Promise<import("@itwin/ecschema-metadata").EntityClassProps[]>;
|
|
12
|
+
getEnumerations(schema: string, context: SchemaContext): Promise<import("@itwin/ecschema-metadata").EnumerationProps[]>;
|
|
13
|
+
getFormats(schema: string, context: SchemaContext): Promise<import("@itwin/ecschema-metadata").SchemaItemFormatProps[]>;
|
|
14
|
+
getInvertedUnits(schema: string, context: SchemaContext): Promise<import("@itwin/ecschema-metadata").InvertedUnitProps[]>;
|
|
15
|
+
getKindOfQuantities(schema: string, context: SchemaContext): Promise<import("@itwin/ecschema-metadata").KindOfQuantityProps[]>;
|
|
16
|
+
getMixins(schema: string, context: SchemaContext, queryOverride?: string): Promise<import("@itwin/ecschema-metadata").MixinProps[]>;
|
|
17
|
+
getPhenomenon(schema: string, context: SchemaContext): Promise<import("@itwin/ecschema-metadata").PhenomenonProps[]>;
|
|
18
|
+
getPropertyCategories(schema: string, context: SchemaContext): Promise<import("@itwin/ecschema-metadata").PropertyCategoryProps[]>;
|
|
19
|
+
getRelationships(schema: string, context: SchemaContext): Promise<import("@itwin/ecschema-metadata").RelationshipClassProps[]>;
|
|
20
|
+
getStructs(schema: string, context: SchemaContext): Promise<import("@itwin/ecschema-metadata").ClassProps[]>;
|
|
21
|
+
getUnits(schema: string, context: SchemaContext): Promise<import("@itwin/ecschema-metadata").SchemaItemUnitProps[]>;
|
|
22
|
+
getUnitSystems(schema: string, context: SchemaContext): Promise<import("@itwin/ecschema-metadata").SchemaItemProps[]>;
|
|
8
23
|
}
|
|
9
24
|
//# sourceMappingURL=TestSqlSchemaLocater.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestSqlSchemaLocater.d.ts","sourceRoot":"","sources":["../../../../../src/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"TestSqlSchemaLocater.d.ts","sourceRoot":"","sources":["../../../../../src/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,aAAa,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEnJ,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,qBAAa,oBAAqB,SAAQ,kBAAkB;IAC1D,OAAO,CAAC,OAAO,CAAW;gBAEP,MAAM,EAAE,QAAQ,EAAE,YAAY,CAAC,EAAE,yBAAyB;cAK7D,YAAY,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;cAQ5F,cAAc,CAAC,UAAU,EAAE,SAAS,GAAG,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC;IAMjE,aAAa,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,aAAa;IAG1D,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa;IAGnD,yBAAyB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,CAAC,EAAE,MAAM;IAGxF,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,CAAC,EAAE,MAAM;IAG1E,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa;IAGtD,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa;IAGjD,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa;IAGvD,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa;IAG1D,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,CAAC,EAAE,MAAM;IAGxE,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa;IAGpD,qBAAqB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa;IAG5D,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa;IAGvD,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa;IAGjD,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa;IAG/C,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa;CAG5E"}
|
|
@@ -16,5 +16,52 @@ export class TestSqlSchemaLocater extends ECSqlSchemaLocater {
|
|
|
16
16
|
async getSchemaProps(_schemaKey) {
|
|
17
17
|
throw new Error("Method not implemented.");
|
|
18
18
|
}
|
|
19
|
+
// All of the following methods are protected. Through the override in this test locater, the methods can
|
|
20
|
+
// be exposed public and used in tests for granular testing.
|
|
21
|
+
async getSchemaJson(schemaKey, context) {
|
|
22
|
+
return super.getSchemaJson(schemaKey, context);
|
|
23
|
+
}
|
|
24
|
+
async getConstants(schema, context) {
|
|
25
|
+
return super.getConstants(schema, context);
|
|
26
|
+
}
|
|
27
|
+
async getCustomAttributeClasses(schema, context, queryOverride) {
|
|
28
|
+
return super.getCustomAttributeClasses(schema, context, queryOverride);
|
|
29
|
+
}
|
|
30
|
+
async getEntities(schema, context, queryOverride) {
|
|
31
|
+
return super.getEntities(schema, context, queryOverride);
|
|
32
|
+
}
|
|
33
|
+
async getEnumerations(schema, context) {
|
|
34
|
+
return super.getEnumerations(schema, context);
|
|
35
|
+
}
|
|
36
|
+
async getFormats(schema, context) {
|
|
37
|
+
return super.getFormats(schema, context);
|
|
38
|
+
}
|
|
39
|
+
async getInvertedUnits(schema, context) {
|
|
40
|
+
return super.getInvertedUnits(schema, context);
|
|
41
|
+
}
|
|
42
|
+
async getKindOfQuantities(schema, context) {
|
|
43
|
+
return super.getKindOfQuantities(schema, context);
|
|
44
|
+
}
|
|
45
|
+
async getMixins(schema, context, queryOverride) {
|
|
46
|
+
return super.getMixins(schema, context, queryOverride);
|
|
47
|
+
}
|
|
48
|
+
async getPhenomenon(schema, context) {
|
|
49
|
+
return super.getPhenomenon(schema, context);
|
|
50
|
+
}
|
|
51
|
+
async getPropertyCategories(schema, context) {
|
|
52
|
+
return super.getPropertyCategories(schema, context);
|
|
53
|
+
}
|
|
54
|
+
async getRelationships(schema, context) {
|
|
55
|
+
return super.getRelationships(schema, context);
|
|
56
|
+
}
|
|
57
|
+
async getStructs(schema, context) {
|
|
58
|
+
return super.getStructs(schema, context);
|
|
59
|
+
}
|
|
60
|
+
async getUnits(schema, context) {
|
|
61
|
+
return super.getUnits(schema, context);
|
|
62
|
+
}
|
|
63
|
+
async getUnitSystems(schema, context) {
|
|
64
|
+
return super.getUnitSystems(schema, context);
|
|
65
|
+
}
|
|
19
66
|
}
|
|
20
67
|
//# sourceMappingURL=TestSqlSchemaLocater.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestSqlSchemaLocater.js","sourceRoot":"","sources":["../../../../../src/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"TestSqlSchemaLocater.js","sourceRoot":"","sources":["../../../../../src/test/incrementalS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ACjD,CAAC;IACe,KAAK,CAAC,UAAU,CAAC,MAAc,EAAE,OAAsB;QACrE,OAAO,KAAK,CAAC,UAAU,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC3C,CAAC;IACe,KAAK,CAAC,QAAQ,CAAC,MAAc,EAAE,OAAsB;QACnE,OAAO,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,CAAC;IACe,KAAK,CAAC,cAAc,CAAC,MAAc,EAAE,OAAsB;QACzE,OAAO,KAAK,CAAC,cAAc,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/C,CAAC;CACF","sourcesContent":["import { ECSqlQueryOptions, ECSqlSchemaLocater, ECSqlSchemaLocaterOptions, SchemaContext, SchemaKey, SchemaProps } from \"@itwin/ecschema-metadata\";\nimport { QueryBinder, QueryRowFormat } from \"@itwin/core-common\";\nimport { IModelDb } from \"../../../IModelDb\";\n\nexport class TestSqlSchemaLocater extends ECSqlSchemaLocater {\n private _iModel: IModelDb;\n\n public constructor(iModel: IModelDb, queryOptions?: ECSqlSchemaLocaterOptions) {\n super(queryOptions);\n this._iModel = iModel;\n }\n\n protected async executeQuery<TRow>(query: string, options?: ECSqlQueryOptions): Promise<ReadonlyArray<TRow>> {\n const queryParameters = options && options.parameters ? QueryBinder.from(options.parameters) : undefined;\n\n return this._iModel.createQueryReader(query, queryParameters, {\n rowFormat: QueryRowFormat.UseECSqlPropertyNames\n })\n .toArray();\n }\n protected async getSchemaProps(_schemaKey: SchemaKey): Promise<SchemaProps | undefined> {\n throw new Error(\"Method not implemented.\");\n }\n\n // All of the following methods are protected. Through the override in this test locater, the methods can\n // be exposed public and used in tests for granular testing.\n public override async getSchemaJson(schemaKey: SchemaKey, context: SchemaContext) {\n return super.getSchemaJson(schemaKey, context);\n }\n public override async getConstants(schema: string, context: SchemaContext) {\n return super.getConstants(schema, context);\n }\n public override async getCustomAttributeClasses(schema: string, context: SchemaContext, queryOverride?: string) {\n return super.getCustomAttributeClasses(schema, context, queryOverride);\n }\n public override async getEntities(schema: string, context: SchemaContext, queryOverride?: string) {\n return super.getEntities(schema, context, queryOverride);\n }\n public override async getEnumerations(schema: string, context: SchemaContext) {\n return super.getEnumerations(schema, context);\n }\n public override async getFormats(schema: string, context: SchemaContext) {\n return super.getFormats(schema, context);\n }\n public override async getInvertedUnits(schema: string, context: SchemaContext) {\n return super.getInvertedUnits(schema, context);\n }\n public override async getKindOfQuantities(schema: string, context: SchemaContext) {\n return super.getKindOfQuantities(schema, context);\n }\n public override async getMixins(schema: string, context: SchemaContext, queryOverride?: string){\n return super.getMixins(schema, context, queryOverride);\n }\n public override async getPhenomenon(schema: string, context: SchemaContext) {\n return super.getPhenomenon(schema, context);\n }\n public override async getPropertyCategories(schema: string, context: SchemaContext) {\n return super.getPropertyCategories(schema, context);\n }\n public override async getRelationships(schema: string, context: SchemaContext) {\n return super.getRelationships(schema, context);\n }\n public override async getStructs(schema: string, context: SchemaContext) {\n return super.getStructs(schema, context);\n }\n public override async getUnits(schema: string, context: SchemaContext) {\n return super.getUnits(schema, context);\n }\n public override async getUnitSystems(schema: string, context: SchemaContext) {\n return super.getUnitSystems(schema, context);\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itwin/core-backend",
|
|
3
|
-
"version": "5.2.0-dev.
|
|
3
|
+
"version": "5.2.0-dev.18",
|
|
4
4
|
"description": "iTwin.js backend components",
|
|
5
5
|
"main": "lib/cjs/core-backend.js",
|
|
6
6
|
"module": "lib/esm/core-backend.js",
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"@opentelemetry/api": "^1.0.4",
|
|
30
|
-
"@itwin/core-bentley": "5.2.0-dev.
|
|
31
|
-
"@itwin/
|
|
32
|
-
"@itwin/
|
|
33
|
-
"@itwin/core-geometry": "5.2.0-dev.
|
|
30
|
+
"@itwin/core-bentley": "5.2.0-dev.18",
|
|
31
|
+
"@itwin/core-common": "5.2.0-dev.18",
|
|
32
|
+
"@itwin/ecschema-metadata": "5.2.0-dev.18",
|
|
33
|
+
"@itwin/core-geometry": "5.2.0-dev.18"
|
|
34
34
|
},
|
|
35
35
|
"peerDependenciesMeta": {
|
|
36
36
|
"@opentelemetry/api": {
|
|
@@ -76,17 +76,17 @@
|
|
|
76
76
|
"marked": "^14.1.3",
|
|
77
77
|
"sql-formatter": "^15.4.6",
|
|
78
78
|
"webpack": "^5.97.1",
|
|
79
|
-
"@itwin/
|
|
80
|
-
"@itwin/
|
|
81
|
-
"@itwin/ecschema-
|
|
82
|
-
"@itwin/core-
|
|
83
|
-
"@itwin/ecsql-common": "5.2.0-dev.
|
|
84
|
-
"@itwin/
|
|
85
|
-
"
|
|
86
|
-
"
|
|
79
|
+
"@itwin/core-geometry": "5.2.0-dev.18",
|
|
80
|
+
"@itwin/build-tools": "5.2.0-dev.18",
|
|
81
|
+
"@itwin/ecschema-metadata": "5.2.0-dev.18",
|
|
82
|
+
"@itwin/core-bentley": "5.2.0-dev.18",
|
|
83
|
+
"@itwin/ecsql-common": "5.2.0-dev.18",
|
|
84
|
+
"@itwin/core-common": "5.2.0-dev.18",
|
|
85
|
+
"internal-tools": "3.0.0-dev.69",
|
|
86
|
+
"@itwin/ecschema-locaters": "5.2.0-dev.18"
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
|
-
"@bentley/imodeljs-native": "5.2.
|
|
89
|
+
"@bentley/imodeljs-native": "5.2.9",
|
|
90
90
|
"@itwin/cloud-agnostic-core": "^2.2.4",
|
|
91
91
|
"@itwin/object-storage-azure": "^2.3.0",
|
|
92
92
|
"@itwin/object-storage-core": "^2.3.0",
|