@itwin/core-backend 5.1.0-dev.9 → 5.2.0-dev.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/CHANGELOG.md +112 -1
- package/lib/cjs/BackendHubAccess.d.ts +1 -1
- package/lib/cjs/BackendHubAccess.js +1 -1
- package/lib/cjs/BackendHubAccess.js.map +1 -1
- package/lib/cjs/BisCoreSchema.d.ts.map +1 -1
- package/lib/cjs/BisCoreSchema.js +4 -2
- package/lib/cjs/BisCoreSchema.js.map +1 -1
- package/lib/cjs/BriefcaseManager.d.ts +10 -2
- package/lib/cjs/BriefcaseManager.d.ts.map +1 -1
- package/lib/cjs/BriefcaseManager.js +16 -0
- package/lib/cjs/BriefcaseManager.js.map +1 -1
- package/lib/cjs/Category.d.ts +4 -4
- package/lib/cjs/Category.js +4 -4
- package/lib/cjs/Category.js.map +1 -1
- package/lib/cjs/ChangesetECAdaptor.d.ts +67 -8
- package/lib/cjs/ChangesetECAdaptor.d.ts.map +1 -1
- package/lib/cjs/ChangesetECAdaptor.js +248 -33
- package/lib/cjs/ChangesetECAdaptor.js.map +1 -1
- package/lib/cjs/ClassRegistry.d.ts +9 -1
- package/lib/cjs/ClassRegistry.d.ts.map +1 -1
- package/lib/cjs/ClassRegistry.js +9 -1
- package/lib/cjs/ClassRegistry.js.map +1 -1
- package/lib/cjs/CloudSqlite.js +1 -1
- package/lib/cjs/CloudSqlite.js.map +1 -1
- package/lib/cjs/CodeSpecs.d.ts +1 -1
- package/lib/cjs/CodeSpecs.js +1 -1
- package/lib/cjs/CodeSpecs.js.map +1 -1
- package/lib/cjs/DisplayStyle.d.ts +4 -4
- package/lib/cjs/DisplayStyle.js +3 -3
- package/lib/cjs/DisplayStyle.js.map +1 -1
- package/lib/cjs/ECDb.d.ts +4 -4
- package/lib/cjs/ECDb.d.ts.map +1 -1
- package/lib/cjs/ECDb.js +4 -4
- package/lib/cjs/ECDb.js.map +1 -1
- package/lib/cjs/ECSqlStatement.d.ts +15 -6
- package/lib/cjs/ECSqlStatement.d.ts.map +1 -1
- package/lib/cjs/ECSqlStatement.js +19 -4
- package/lib/cjs/ECSqlStatement.js.map +1 -1
- package/lib/cjs/Element.d.ts +54 -51
- package/lib/cjs/Element.d.ts.map +1 -1
- package/lib/cjs/Element.js +67 -52
- package/lib/cjs/Element.js.map +1 -1
- package/lib/cjs/ElementAspect.d.ts +8 -8
- package/lib/cjs/ElementAspect.d.ts.map +1 -1
- package/lib/cjs/ElementAspect.js +8 -8
- package/lib/cjs/ElementAspect.js.map +1 -1
- package/lib/cjs/Entity.d.ts +10 -7
- package/lib/cjs/Entity.d.ts.map +1 -1
- package/lib/cjs/Entity.js +35 -13
- package/lib/cjs/Entity.js.map +1 -1
- package/lib/cjs/ExportGraphics.d.ts +54 -8
- package/lib/cjs/ExportGraphics.d.ts.map +1 -1
- package/lib/cjs/ExportGraphics.js +158 -59
- package/lib/cjs/ExportGraphics.js.map +1 -1
- package/lib/cjs/GeographicCRSServices.d.ts +6 -2
- package/lib/cjs/GeographicCRSServices.d.ts.map +1 -1
- package/lib/cjs/GeographicCRSServices.js +1 -1
- package/lib/cjs/GeographicCRSServices.js.map +1 -1
- package/lib/cjs/IModelDb.d.ts +37 -26
- package/lib/cjs/IModelDb.d.ts.map +1 -1
- package/lib/cjs/IModelDb.js +124 -47
- package/lib/cjs/IModelDb.js.map +1 -1
- package/lib/cjs/IModelElementCloneContext.d.ts +1 -1
- package/lib/cjs/IModelElementCloneContext.d.ts.map +1 -1
- package/lib/cjs/IModelElementCloneContext.js +1 -1
- package/lib/cjs/IModelElementCloneContext.js.map +1 -1
- package/lib/cjs/IModelHost.d.ts +2 -3
- package/lib/cjs/IModelHost.d.ts.map +1 -1
- package/lib/cjs/IModelHost.js +2 -3
- package/lib/cjs/IModelHost.js.map +1 -1
- package/lib/cjs/IModelIncrementalSchemaLocater.d.ts +36 -0
- package/lib/cjs/IModelIncrementalSchemaLocater.d.ts.map +1 -0
- package/lib/cjs/IModelIncrementalSchemaLocater.js +69 -0
- package/lib/cjs/IModelIncrementalSchemaLocater.js.map +1 -0
- package/lib/cjs/LocalHub.d.ts.map +1 -1
- package/lib/cjs/LocalHub.js +6 -4
- package/lib/cjs/LocalHub.js.map +1 -1
- package/lib/cjs/Material.d.ts +4 -3
- package/lib/cjs/Material.d.ts.map +1 -1
- package/lib/cjs/Material.js +5 -5
- package/lib/cjs/Material.js.map +1 -1
- package/lib/cjs/Model.d.ts +22 -22
- package/lib/cjs/Model.js +22 -22
- package/lib/cjs/Model.js.map +1 -1
- package/lib/cjs/Relationship.d.ts +3 -0
- package/lib/cjs/Relationship.d.ts.map +1 -1
- package/lib/cjs/Relationship.js +15 -0
- package/lib/cjs/Relationship.js.map +1 -1
- package/lib/cjs/SQLiteDb.d.ts +1 -1
- package/lib/cjs/SQLiteDb.js +1 -1
- package/lib/cjs/SQLiteDb.js.map +1 -1
- package/lib/cjs/Schema.d.ts +25 -0
- package/lib/cjs/Schema.d.ts.map +1 -1
- package/lib/cjs/Schema.js +25 -0
- package/lib/cjs/Schema.js.map +1 -1
- package/lib/cjs/SqliteStatement.d.ts +1 -1
- package/lib/cjs/SqliteStatement.d.ts.map +1 -1
- package/lib/cjs/SqliteStatement.js +1 -1
- package/lib/cjs/SqliteStatement.js.map +1 -1
- package/lib/cjs/Texture.d.ts +1 -1
- package/lib/cjs/Texture.js +1 -1
- package/lib/cjs/Texture.js.map +1 -1
- package/lib/cjs/TxnManager.d.ts +4 -4
- package/lib/cjs/TxnManager.js +1 -1
- package/lib/cjs/TxnManager.js.map +1 -1
- package/lib/cjs/ViewDefinition.d.ts +40 -14
- package/lib/cjs/ViewDefinition.d.ts.map +1 -1
- package/lib/cjs/ViewDefinition.js +42 -14
- package/lib/cjs/ViewDefinition.js.map +1 -1
- package/lib/cjs/annotations/ElementDrivesTextAnnotation.d.ts +61 -0
- package/lib/cjs/annotations/ElementDrivesTextAnnotation.d.ts.map +1 -0
- package/lib/cjs/annotations/ElementDrivesTextAnnotation.js +110 -0
- package/lib/cjs/annotations/ElementDrivesTextAnnotation.js.map +1 -0
- package/lib/cjs/annotations/FrameGeometry.d.ts +51 -0
- package/lib/cjs/annotations/FrameGeometry.d.ts.map +1 -0
- package/lib/cjs/annotations/FrameGeometry.js +249 -0
- package/lib/cjs/annotations/FrameGeometry.js.map +1 -0
- package/lib/cjs/annotations/LeaderGeometry.d.ts +53 -0
- package/lib/cjs/annotations/LeaderGeometry.d.ts.map +1 -0
- package/lib/cjs/annotations/LeaderGeometry.js +184 -0
- package/lib/cjs/annotations/LeaderGeometry.js.map +1 -0
- package/lib/cjs/annotations/TextAnnotationElement.d.ts +204 -0
- package/lib/cjs/annotations/TextAnnotationElement.d.ts.map +1 -0
- package/lib/cjs/annotations/TextAnnotationElement.js +411 -0
- package/lib/cjs/annotations/TextAnnotationElement.js.map +1 -0
- package/lib/cjs/annotations/TextAnnotationGeometry.d.ts +33 -0
- package/lib/cjs/annotations/TextAnnotationGeometry.d.ts.map +1 -0
- package/lib/cjs/annotations/TextAnnotationGeometry.js +137 -0
- package/lib/cjs/annotations/TextAnnotationGeometry.js.map +1 -0
- package/lib/cjs/annotations/TextBlockGeometry.d.ts +16 -0
- package/lib/cjs/annotations/TextBlockGeometry.d.ts.map +1 -0
- package/lib/cjs/{TextAnnotationGeometry.js → annotations/TextBlockGeometry.js} +28 -70
- package/lib/cjs/annotations/TextBlockGeometry.js.map +1 -0
- package/lib/cjs/{TextAnnotationLayout.d.ts → annotations/TextBlockLayout.d.ts} +69 -22
- package/lib/cjs/annotations/TextBlockLayout.d.ts.map +1 -0
- package/lib/cjs/{TextAnnotationLayout.js → annotations/TextBlockLayout.js} +174 -49
- package/lib/cjs/annotations/TextBlockLayout.js.map +1 -0
- package/lib/cjs/core-backend.d.ts +7 -3
- package/lib/cjs/core-backend.d.ts.map +1 -1
- package/lib/cjs/core-backend.js +27 -6
- package/lib/cjs/core-backend.js.map +1 -1
- package/lib/cjs/internal/ElementLRUCache.d.ts +23 -0
- package/lib/cjs/internal/ElementLRUCache.d.ts.map +1 -1
- package/lib/cjs/internal/ElementLRUCache.js +167 -3
- package/lib/cjs/internal/ElementLRUCache.js.map +1 -1
- package/lib/cjs/internal/Symbols.d.ts +1 -0
- package/lib/cjs/internal/Symbols.d.ts.map +1 -1
- package/lib/cjs/internal/Symbols.js +2 -1
- package/lib/cjs/internal/Symbols.js.map +1 -1
- package/lib/cjs/internal/annotations/fields.d.ts +22 -0
- package/lib/cjs/internal/annotations/fields.d.ts.map +1 -0
- package/lib/cjs/internal/annotations/fields.js +237 -0
- package/lib/cjs/internal/annotations/fields.js.map +1 -0
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts +1 -1
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.js +1 -1
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
- package/lib/cjs/rpc-impl/RpcBriefcaseUtility.d.ts +2 -2
- package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
- package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.d.ts +1 -1
- package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js +1 -1
- package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
- package/lib/cjs/workspace/Workspace.d.ts +0 -1
- package/lib/cjs/workspace/Workspace.d.ts.map +1 -1
- package/lib/cjs/workspace/Workspace.js.map +1 -1
- package/lib/esm/BackendHubAccess.d.ts +1 -1
- package/lib/esm/BackendHubAccess.js +1 -1
- package/lib/esm/BackendHubAccess.js.map +1 -1
- package/lib/esm/BisCoreSchema.d.ts.map +1 -1
- package/lib/esm/BisCoreSchema.js +4 -2
- package/lib/esm/BisCoreSchema.js.map +1 -1
- package/lib/esm/BriefcaseManager.d.ts +10 -2
- package/lib/esm/BriefcaseManager.d.ts.map +1 -1
- package/lib/esm/BriefcaseManager.js +17 -1
- package/lib/esm/BriefcaseManager.js.map +1 -1
- package/lib/esm/Category.d.ts +4 -4
- package/lib/esm/Category.js +4 -4
- package/lib/esm/Category.js.map +1 -1
- package/lib/esm/ChangesetECAdaptor.d.ts +67 -8
- package/lib/esm/ChangesetECAdaptor.d.ts.map +1 -1
- package/lib/esm/ChangesetECAdaptor.js +248 -33
- package/lib/esm/ChangesetECAdaptor.js.map +1 -1
- package/lib/esm/ClassRegistry.d.ts +9 -1
- package/lib/esm/ClassRegistry.d.ts.map +1 -1
- package/lib/esm/ClassRegistry.js +9 -1
- package/lib/esm/ClassRegistry.js.map +1 -1
- package/lib/esm/CloudSqlite.js +1 -1
- package/lib/esm/CloudSqlite.js.map +1 -1
- package/lib/esm/CodeSpecs.d.ts +1 -1
- package/lib/esm/CodeSpecs.js +1 -1
- package/lib/esm/CodeSpecs.js.map +1 -1
- package/lib/esm/DisplayStyle.d.ts +4 -4
- package/lib/esm/DisplayStyle.js +3 -3
- package/lib/esm/DisplayStyle.js.map +1 -1
- package/lib/esm/ECDb.d.ts +4 -4
- package/lib/esm/ECDb.d.ts.map +1 -1
- package/lib/esm/ECDb.js +4 -4
- package/lib/esm/ECDb.js.map +1 -1
- package/lib/esm/ECSqlStatement.d.ts +15 -6
- package/lib/esm/ECSqlStatement.d.ts.map +1 -1
- package/lib/esm/ECSqlStatement.js +19 -4
- package/lib/esm/ECSqlStatement.js.map +1 -1
- package/lib/esm/Element.d.ts +54 -51
- package/lib/esm/Element.d.ts.map +1 -1
- package/lib/esm/Element.js +67 -52
- package/lib/esm/Element.js.map +1 -1
- package/lib/esm/ElementAspect.d.ts +8 -8
- package/lib/esm/ElementAspect.d.ts.map +1 -1
- package/lib/esm/ElementAspect.js +8 -8
- package/lib/esm/ElementAspect.js.map +1 -1
- package/lib/esm/Entity.d.ts +10 -7
- package/lib/esm/Entity.d.ts.map +1 -1
- package/lib/esm/Entity.js +36 -14
- package/lib/esm/Entity.js.map +1 -1
- package/lib/esm/ExportGraphics.d.ts +54 -8
- package/lib/esm/ExportGraphics.d.ts.map +1 -1
- package/lib/esm/ExportGraphics.js +156 -58
- package/lib/esm/ExportGraphics.js.map +1 -1
- package/lib/esm/GeographicCRSServices.d.ts +6 -2
- package/lib/esm/GeographicCRSServices.d.ts.map +1 -1
- package/lib/esm/GeographicCRSServices.js +1 -1
- package/lib/esm/GeographicCRSServices.js.map +1 -1
- package/lib/esm/IModelDb.d.ts +37 -26
- package/lib/esm/IModelDb.d.ts.map +1 -1
- package/lib/esm/IModelDb.js +128 -51
- package/lib/esm/IModelDb.js.map +1 -1
- package/lib/esm/IModelElementCloneContext.d.ts +1 -1
- package/lib/esm/IModelElementCloneContext.d.ts.map +1 -1
- package/lib/esm/IModelElementCloneContext.js +1 -1
- package/lib/esm/IModelElementCloneContext.js.map +1 -1
- package/lib/esm/IModelHost.d.ts +2 -3
- package/lib/esm/IModelHost.d.ts.map +1 -1
- package/lib/esm/IModelHost.js +2 -3
- package/lib/esm/IModelHost.js.map +1 -1
- package/lib/esm/IModelIncrementalSchemaLocater.d.ts +36 -0
- package/lib/esm/IModelIncrementalSchemaLocater.d.ts.map +1 -0
- package/lib/esm/IModelIncrementalSchemaLocater.js +65 -0
- package/lib/esm/IModelIncrementalSchemaLocater.js.map +1 -0
- package/lib/esm/LocalHub.d.ts.map +1 -1
- package/lib/esm/LocalHub.js +6 -4
- package/lib/esm/LocalHub.js.map +1 -1
- package/lib/esm/Material.d.ts +4 -3
- package/lib/esm/Material.d.ts.map +1 -1
- package/lib/esm/Material.js +5 -5
- package/lib/esm/Material.js.map +1 -1
- package/lib/esm/Model.d.ts +22 -22
- package/lib/esm/Model.js +22 -22
- package/lib/esm/Model.js.map +1 -1
- package/lib/esm/Relationship.d.ts +3 -0
- package/lib/esm/Relationship.d.ts.map +1 -1
- package/lib/esm/Relationship.js +15 -0
- package/lib/esm/Relationship.js.map +1 -1
- package/lib/esm/SQLiteDb.d.ts +1 -1
- package/lib/esm/SQLiteDb.js +1 -1
- package/lib/esm/SQLiteDb.js.map +1 -1
- package/lib/esm/Schema.d.ts +25 -0
- package/lib/esm/Schema.d.ts.map +1 -1
- package/lib/esm/Schema.js +25 -0
- package/lib/esm/Schema.js.map +1 -1
- package/lib/esm/SqliteStatement.d.ts +1 -1
- package/lib/esm/SqliteStatement.d.ts.map +1 -1
- package/lib/esm/SqliteStatement.js +1 -1
- package/lib/esm/SqliteStatement.js.map +1 -1
- package/lib/esm/Texture.d.ts +1 -1
- package/lib/esm/Texture.js +1 -1
- package/lib/esm/Texture.js.map +1 -1
- package/lib/esm/TxnManager.d.ts +4 -4
- package/lib/esm/TxnManager.js +1 -1
- package/lib/esm/TxnManager.js.map +1 -1
- package/lib/esm/ViewDefinition.d.ts +40 -14
- package/lib/esm/ViewDefinition.d.ts.map +1 -1
- package/lib/esm/ViewDefinition.js +42 -14
- package/lib/esm/ViewDefinition.js.map +1 -1
- package/lib/esm/annotations/ElementDrivesTextAnnotation.d.ts +61 -0
- package/lib/esm/annotations/ElementDrivesTextAnnotation.d.ts.map +1 -0
- package/lib/esm/annotations/ElementDrivesTextAnnotation.js +105 -0
- package/lib/esm/annotations/ElementDrivesTextAnnotation.js.map +1 -0
- package/lib/esm/annotations/FrameGeometry.d.ts +51 -0
- package/lib/esm/annotations/FrameGeometry.d.ts.map +1 -0
- package/lib/esm/annotations/FrameGeometry.js +244 -0
- package/lib/esm/annotations/FrameGeometry.js.map +1 -0
- package/lib/esm/annotations/LeaderGeometry.d.ts +53 -0
- package/lib/esm/annotations/LeaderGeometry.d.ts.map +1 -0
- package/lib/esm/annotations/LeaderGeometry.js +179 -0
- package/lib/esm/annotations/LeaderGeometry.js.map +1 -0
- package/lib/esm/annotations/TextAnnotationElement.d.ts +204 -0
- package/lib/esm/annotations/TextAnnotationElement.d.ts.map +1 -0
- package/lib/esm/annotations/TextAnnotationElement.js +405 -0
- package/lib/esm/annotations/TextAnnotationElement.js.map +1 -0
- package/lib/esm/annotations/TextAnnotationGeometry.d.ts +33 -0
- package/lib/esm/annotations/TextAnnotationGeometry.d.ts.map +1 -0
- package/lib/esm/annotations/TextAnnotationGeometry.js +134 -0
- package/lib/esm/annotations/TextAnnotationGeometry.js.map +1 -0
- package/lib/esm/annotations/TextBlockGeometry.d.ts +16 -0
- package/lib/esm/annotations/TextBlockGeometry.d.ts.map +1 -0
- package/lib/esm/{TextAnnotationGeometry.js → annotations/TextBlockGeometry.js} +28 -70
- package/lib/esm/annotations/TextBlockGeometry.js.map +1 -0
- package/lib/esm/{TextAnnotationLayout.d.ts → annotations/TextBlockLayout.d.ts} +69 -22
- package/lib/esm/annotations/TextBlockLayout.d.ts.map +1 -0
- package/lib/esm/{TextAnnotationLayout.js → annotations/TextBlockLayout.js} +172 -48
- package/lib/esm/annotations/TextBlockLayout.js.map +1 -0
- package/lib/esm/core-backend.d.ts +7 -3
- package/lib/esm/core-backend.d.ts.map +1 -1
- package/lib/esm/core-backend.js +27 -3
- package/lib/esm/core-backend.js.map +1 -1
- package/lib/esm/internal/ElementLRUCache.d.ts +23 -0
- package/lib/esm/internal/ElementLRUCache.d.ts.map +1 -1
- package/lib/esm/internal/ElementLRUCache.js +165 -2
- package/lib/esm/internal/ElementLRUCache.js.map +1 -1
- package/lib/esm/internal/Symbols.d.ts +1 -0
- package/lib/esm/internal/Symbols.d.ts.map +1 -1
- package/lib/esm/internal/Symbols.js +1 -0
- package/lib/esm/internal/Symbols.js.map +1 -1
- package/lib/esm/internal/annotations/fields.d.ts +22 -0
- package/lib/esm/internal/annotations/fields.d.ts.map +1 -0
- package/lib/esm/internal/annotations/fields.js +231 -0
- package/lib/esm/internal/annotations/fields.js.map +1 -0
- package/lib/esm/rpc-impl/IModelReadRpcImpl.d.ts +1 -1
- package/lib/esm/rpc-impl/IModelReadRpcImpl.js +1 -1
- package/lib/esm/rpc-impl/IModelReadRpcImpl.js.map +1 -1
- package/lib/esm/rpc-impl/RpcBriefcaseUtility.d.ts +2 -2
- package/lib/esm/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
- package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.d.ts +1 -1
- package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js +1 -1
- package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
- package/lib/esm/test/AnnotationTestUtils.d.ts +15 -0
- package/lib/esm/test/AnnotationTestUtils.d.ts.map +1 -0
- package/lib/esm/test/AnnotationTestUtils.js +41 -0
- package/lib/esm/test/AnnotationTestUtils.js.map +1 -0
- package/lib/esm/test/ElementLRUCache.test.js +224 -1
- package/lib/esm/test/ElementLRUCache.test.js.map +1 -1
- package/lib/esm/test/IModelTestUtils.d.ts.map +1 -1
- package/lib/esm/test/IModelTestUtils.js +1 -0
- package/lib/esm/test/IModelTestUtils.js.map +1 -1
- package/lib/esm/test/TestUtils.d.ts +1 -1
- package/lib/esm/test/TestUtils.d.ts.map +1 -1
- package/lib/esm/test/TestUtils.js +1 -1
- package/lib/esm/test/TestUtils.js.map +1 -1
- package/lib/esm/test/annotations/Fields.test.d.ts +2 -0
- package/lib/esm/test/annotations/Fields.test.d.ts.map +1 -0
- package/lib/esm/test/annotations/Fields.test.js +576 -0
- package/lib/esm/test/annotations/Fields.test.js.map +1 -0
- package/lib/esm/test/annotations/FrameGeometry.test.d.ts +2 -0
- package/lib/esm/test/annotations/FrameGeometry.test.d.ts.map +1 -0
- package/lib/esm/test/annotations/FrameGeometry.test.js +86 -0
- package/lib/esm/test/annotations/FrameGeometry.test.js.map +1 -0
- package/lib/esm/test/annotations/LeaderGeometry.test.d.ts +2 -0
- package/lib/esm/test/annotations/LeaderGeometry.test.d.ts.map +1 -0
- package/lib/esm/test/annotations/LeaderGeometry.test.js +256 -0
- package/lib/esm/test/annotations/LeaderGeometry.test.js.map +1 -0
- package/lib/esm/test/annotations/TextAnnotation.test.js +269 -1047
- package/lib/esm/test/annotations/TextAnnotation.test.js.map +1 -1
- package/lib/esm/test/annotations/TextBlock.test.d.ts +2 -0
- package/lib/esm/test/annotations/TextBlock.test.d.ts.map +1 -0
- package/lib/esm/test/annotations/TextBlock.test.js +1199 -0
- package/lib/esm/test/annotations/TextBlock.test.js.map +1 -0
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.d.ts +60 -0
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.d.ts.map +1 -0
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.js +69 -0
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.js.map +1 -0
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.d.ts +1442 -0
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.d.ts.map +1 -0
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.js +817 -0
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.js.map +1 -0
- package/lib/esm/test/ecdb/ConcurrentQuery.test.d.ts +2 -0
- package/lib/esm/test/ecdb/ConcurrentQuery.test.d.ts.map +1 -0
- package/lib/esm/test/ecdb/ConcurrentQuery.test.js +164 -0
- package/lib/esm/test/ecdb/ConcurrentQuery.test.js.map +1 -0
- package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js +22 -32
- package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECDb.test.js +29 -8
- package/lib/esm/test/ecdb/ECDb.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECSqlQuery.test.js +0 -55
- package/lib/esm/test/ecdb/ECSqlQuery.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECSqlStatement.test.js +192 -0
- package/lib/esm/test/ecdb/ECSqlStatement.test.js.map +1 -1
- package/lib/esm/test/hubaccess/ApplyChangeset.test.d.ts +2 -0
- package/lib/esm/test/hubaccess/ApplyChangeset.test.d.ts.map +1 -0
- package/lib/esm/test/hubaccess/ApplyChangeset.test.js +86 -0
- package/lib/esm/test/hubaccess/ApplyChangeset.test.js.map +1 -0
- package/lib/esm/test/imodel/IModel.test.js +313 -5
- package/lib/esm/test/imodel/IModel.test.js.map +1 -1
- package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.d.ts +2 -0
- package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.d.ts.map +1 -0
- package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.js +343 -0
- package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.js.map +1 -0
- package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.d.ts +2 -0
- package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.d.ts.map +1 -0
- package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.js +207 -0
- package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.js.map +1 -0
- package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.d.ts +11 -0
- package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.d.ts.map +1 -0
- package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.js +36 -0
- package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.js.map +1 -0
- package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.d.ts +17 -0
- package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.d.ts.map +1 -0
- package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.js +116 -0
- package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.js.map +1 -0
- package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.d.ts +9 -0
- package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.d.ts.map +1 -0
- package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.js +20 -0
- package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.js.map +1 -0
- package/lib/esm/test/misc/GeoServices.test.js +36 -10
- package/lib/esm/test/misc/GeoServices.test.js.map +1 -1
- package/lib/esm/test/schema/ClassRegistry.test.js +104 -2
- package/lib/esm/test/schema/ClassRegistry.test.js.map +1 -1
- package/lib/esm/test/standalone/ChangesetReader.test.js +547 -136
- package/lib/esm/test/standalone/ChangesetReader.test.js.map +1 -1
- package/lib/esm/test/standalone/ExportGraphics.test.js +53 -1
- package/lib/esm/test/standalone/ExportGraphics.test.js.map +1 -1
- package/lib/esm/test/standalone/GeometryStream.test.js +49 -1
- package/lib/esm/test/standalone/GeometryStream.test.js.map +1 -1
- package/lib/esm/test/standalone/IModelLimits.test.d.ts +2 -0
- package/lib/esm/test/standalone/IModelLimits.test.d.ts.map +1 -0
- package/lib/esm/test/standalone/IModelLimits.test.js +103 -0
- package/lib/esm/test/standalone/IModelLimits.test.js.map +1 -0
- package/lib/esm/test/standalone/RenderMaterialElement.test.js +24 -1
- package/lib/esm/test/standalone/RenderMaterialElement.test.js.map +1 -1
- package/lib/esm/test/standalone/SnapshotDb.test.js +19 -1
- package/lib/esm/test/standalone/SnapshotDb.test.js.map +1 -1
- package/lib/esm/workspace/Workspace.d.ts +0 -1
- package/lib/esm/workspace/Workspace.d.ts.map +1 -1
- package/lib/esm/workspace/Workspace.js.map +1 -1
- package/package.json +21 -15
- package/lib/cjs/TextAnnotationElement.d.ts +0 -54
- package/lib/cjs/TextAnnotationElement.d.ts.map +0 -1
- package/lib/cjs/TextAnnotationElement.js +0 -94
- package/lib/cjs/TextAnnotationElement.js.map +0 -1
- package/lib/cjs/TextAnnotationGeometry.d.ts +0 -32
- package/lib/cjs/TextAnnotationGeometry.d.ts.map +0 -1
- package/lib/cjs/TextAnnotationGeometry.js.map +0 -1
- package/lib/cjs/TextAnnotationLayout.d.ts.map +0 -1
- package/lib/cjs/TextAnnotationLayout.js.map +0 -1
- package/lib/esm/TextAnnotationElement.d.ts +0 -54
- package/lib/esm/TextAnnotationElement.d.ts.map +0 -1
- package/lib/esm/TextAnnotationElement.js +0 -89
- package/lib/esm/TextAnnotationElement.js.map +0 -1
- package/lib/esm/TextAnnotationGeometry.d.ts +0 -32
- package/lib/esm/TextAnnotationGeometry.d.ts.map +0 -1
- package/lib/esm/TextAnnotationGeometry.js.map +0 -1
- package/lib/esm/TextAnnotationLayout.d.ts.map +0 -1
- package/lib/esm/TextAnnotationLayout.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simple.config.js","sourceRoot":"","sources":["../../../../../../src/test/assets/IncrementalSchemaLocater/configs/simple.config.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,eAAe;IACb,OAAO,EAAE,uBAAuB;IAChC,SAAS,EAAE,kBAAkB;IAC7B,SAAS,EAAE;QACT;YACE,MAAM,EAAE,cAAc;YACtB,YAAY,EAAE;gBACZ,SAAS;gBACT,sBAAsB;gBACtB,SAAS;gBACT,OAAO;aACR;YACD,WAAW,EAAE,EAAE;YACf,YAAY,EAAE;gBACZ;oBACE,MAAM,EAAE,8BAA8B;oBACtC,YAAY,EAAE;wBACZ,gBAAgB,EAAE,YAAY;wBAC9B,OAAO,EAAE,MAAM;wBACf,aAAa,EAAE,iBAAiB;qBACjC;iBACF;gBACD;oBACE,MAAM,EAAE,8BAA8B;oBACtC,YAAY,EAAE;wBACZ,gBAAgB,EAAE,YAAY;wBAC9B,OAAO,EAAE,MAAM;wBACf,aAAa,EAAE,iBAAiB;wBAChC,YAAY,EAAE,MAAM;qBACrB;iBACF;gBACD;oBACE,MAAM,EAAE,4BAA4B;oBACpC,YAAY,EAAE;wBACZ,gBAAgB,EAAE,kBAAkB;wBACpC,OAAO,EAAE,MAAM;wBACf,aAAa,EAAE,uBAAuB;wBACtC,UAAU,EAAE,IAAI;qBACjB;iBACF;gBACD;oBACE,MAAM,EAAE,kCAAkC;oBAC1C,YAAY,EAAE;wBACZ,gBAAgB,EAAE,aAAa;wBAC/B,OAAO,EAAE,MAAM;wBACf,aAAa,EAAE,qBAAqB;wBACpC,MAAM,EAAE,KAAK;wBACb,UAAU,EAAE,IAAI;wBAChB,aAAa,EAAE;4BACb;gCACE,MAAM,EAAE,aAAa;gCACrB,OAAO,EAAE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Q;iCAC3B;6BACF;yBACF;qBACF;iBACF;aACF;SACF;KACF;CACF,CAAA","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nexport default {\n \"label\": \"Simple Profile iModel\",\n \"bimFile\": \"SimpleIModel.bim\",\n \"schemas\": [\n {\n \"name\": \"SimpleSchema\",\n \"references\": [\n \"BisCore\",\n \"CoreCustomAttributes\",\n \"Formats\",\n \"Units\"\n ],\n \"itemCount\": 30,\n \"checkStubs\": [\n {\n \"item\": \"SimpleSchema.UnitSystem_Test\",\n \"properties\": {\n \"schemaItemType\": \"UnitSystem\",\n \"label\": \"Test\",\n \"description\": \"UnitSystem Test\"\n }\n },\n {\n \"item\": \"SimpleSchema.Phenomenon_Test\",\n \"properties\": {\n \"schemaItemType\": \"Phenomenon\",\n \"label\": \"Test\",\n \"description\": \"Phenomenon Test\",\n \"definition\": \"TEST\"\n }\n },\n {\n \"item\": \"SimpleSchema.Category_Test\",\n \"properties\": {\n \"schemaItemType\": \"PropertyCategory\",\n \"label\": \"Test\",\n \"description\": \"PropertyCategory Test\",\n \"priority\": 1000\n }\n },\n {\n \"item\": \"SimpleSchema.Enumeration_Integer\",\n \"properties\": {\n \"schemaItemType\": \"Enumeration\",\n \"label\": \"Test\",\n \"description\": \"Enumeration Integer\",\n \"type\": \"int\",\n \"isStrict\": true,\n \"enumerators\": [\n {\n \"name\": \"Enumerator0\",\n \"value\": 0,\n \"label\": \"0\",\n \"description\": \"Enumerator 0\"\n },\n {\n \"name\": \"Enumerator1\",\n \"value\": 1,\n \"label\": \"1\",\n \"description\": \"Enumerator 1\"\n }\n ]\n }\n },\n {\n \"item\": \"SimpleSchema.Enumeration_String\",\n \"properties\": {\n \"schemaItemType\": \"Enumeration\",\n \"label\": \"Test\",\n \"description\": \"Enumeration String\",\n \"type\": \"string\",\n \"isStrict\": false,\n \"enumerators\": [\n {\n \"name\": \"Enumerator0\",\n \"value\": \"0\"\n },\n {\n \"name\": \"Enumerator1\",\n \"value\": \"1\"\n }\n ]\n }\n },\n {\n \"item\": \"SimpleSchema.Unit_Test1\",\n \"properties\": {\n \"schemaItemType\": \"Unit\",\n \"label\": \"Test1\",\n \"description\": \"Unit Test1\",\n \"phenomenon\": \"SimpleSchema.Phenomenon_Test\",\n \"unitSystem\": \"SimpleSchema.UnitSystem_Test\",\n \"definition\": \"TEST1\",\n \"numerator\": 10.0\n }\n },\n {\n \"item\": \"SimpleSchema.Unit_Test2\",\n \"properties\": {\n \"schemaItemType\": \"Unit\",\n \"label\": \"Test2\",\n \"description\": \"Unit Test2\",\n \"phenomenon\": \"Units.TEMPERATURE\", \n \"unitSystem\": \"Units.USCUSTOM\",\n \"definition\": \"TEST2\",\n \"numerator\": 5.0,\n \"denominator\": 3.0,\n \"offset\": 0.01325\n }\n },\n {\n \"item\": \"SimpleSchema.InvertedUnit_Test1\",\n \"properties\": {\n \"schemaItemType\": \"InvertedUnit\",\n \"label\": \"Test1\",\n \"description\": \"InvertedUnit Test1\",\n \"invertsUnit\": \"SimpleSchema.Unit_Test1\",\n \"unitSystem\": \"SimpleSchema.UnitSystem_Test\"\n }\n },\n {\n \"item\": \"SimpleSchema.InvertedUnit_Test2\",\n \"properties\": {\n \"schemaItemType\": \"InvertedUnit\",\n \"label\": \"Test2\",\n \"description\": \"InvertedUnit Test2\",\n \"invertsUnit\": \"Units.FT_PER_FT\",\n \"unitSystem\": \"Units.USCUSTOM\"\n }\n },\n {\n \"item\": \"SimpleSchema.Constant_Test1\",\n \"properties\": {\n \"schemaItemType\": \"Constant\",\n \"label\": \"Test1\",\n \"description\": \"Constant Test1\",\n \"phenomenon\": \"SimpleSchema.Phenomenon_Test\",\n \"definition\": \"TEST1\",\n \"numerator\": 1.0e3\n }\n },\n {\n \"item\": \"SimpleSchema.Constant_Test2\",\n \"properties\": {\n \"schemaItemType\": \"Constant\",\n \"label\": \"Test2\",\n \"description\": \"Constant Test2\",\n \"phenomenon\": \"Units.ANGLE\",\n \"definition\": \"TEST2\",\n \"numerator\": 180.0,\n \"denominator\": 0.5\n }\n },\n {\n \"item\": \"SimpleSchema.Format_Station\",\n \"properties\": {\n \"schemaItemType\": \"Format\",\n \"label\": \"Test\",\n \"description\": \"Format Station\",\n \"type\": \"Station\",\n \"precision\": 2,\n \"formatTraits\": [\n \"TrailZeroes\",\n \"KeepSingleZero\",\n \"KeepDecimalPoint\"\n ],\n \"thousandSeparator\": \" \",\n \"decimalSeparator\": \",\",\n \"stationSeparator\": \"+\",\n \"stationOffsetSize\": 3,\n \"minWidth\": 3\n }\n },\n {\n \"item\": \"SimpleSchema.Format_Scientific\",\n \"properties\": {\n \"schemaItemType\": \"Format\",\n \"label\": \"Test\",\n \"description\": \"Format Scientific\",\n \"type\": \"Scientific\",\n \"scientificType\": \"Normalized\",\n \"precision\": 6,\n \"formatTraits\": [\n \"KeepSingleZero\"\n ],\n \"decimalSeparator\": \",\",\n \"thousandSeparator\": \" \"\n }\n },\n {\n \"item\": \"SimpleSchema.Format_Decimal\",\n \"properties\": {\n \"schemaItemType\": \"Format\",\n \"label\": \"Test\",\n \"description\": \"Format Decimal\",\n \"type\": \"Decimal\",\n \"precision\": 4,\n \"showSignOption\": \"NoSign\",\n \"formatTraits\": [\n \"KeepSingleZero\",\n \"KeepDecimalPoint\"\n ],\n \"thousandSeparator\": \" \",\n \"decimalSeparator\": \",\",\n \"minWidth\": 3,\n \"roundFactor\": 0.1\n }\n },\n {\n \"item\": \"SimpleSchema.Format_Fractional\",\n \"properties\": {\n \"schemaItemType\": \"Format\",\n \"label\": \"Test\",\n \"description\": \"Format Fractional\",\n \"type\": \"Fractional\",\n \"precision\": 8,\n \"formatTraits\": [\n \"KeepSingleZero\",\n \"ShowUnitLabel\"\n ],\n \"uomSeparator\": \"\"\n }\n },\n {\n \"item\": \"SimpleSchema.KindOfQuantity_Test1\",\n \"properties\": {\n \"schemaItemType\": \"KindOfQuantity\",\n \"label\": \"Test1\",\n \"description\": \"KindOfQuantity Test1\"\n }\n },\n {\n \"item\": \"SimpleSchema.KindOfQuantity_Test2\",\n \"properties\": {\n \"schemaItemType\": \"KindOfQuantity\",\n \"label\": \"Test2\",\n \"description\": \"KindOfQuantity Test2\"\n }\n },\n {\n \"item\": \"SimpleSchema.StructClass_Test1\",\n \"properties\": {\n \"schemaItemType\": \"StructClass\",\n \"modifier\": \"Abstract\",\n \"label\": \"Test1\",\n \"description\": \"StructClass Test1\"\n }\n },\n {\n \"item\": \"SimpleSchema.StructClass_Test2\",\n \"properties\": {\n \"schemaItemType\": \"StructClass\",\n \"modifier\": \"Sealed\",\n \"baseClass\": \"SimpleSchema.StructClass_Test1\",\n \"label\": \"Test2\",\n \"description\": \"StructClass Test2\"\n }\n },\n {\n \"item\": \"SimpleSchema.CustomAttributeClass_Test1\",\n \"properties\": {\n \"schemaItemType\": \"CustomAttributeClass\",\n \"appliesTo\": \"AnyClass\",\n \"modifier\": \"Abstract\",\n \"label\": \"Test1\",\n \"description\": \"CustomAttributeClass Test1\"\n }\n },\n {\n \"item\": \"SimpleSchema.CustomAttributeClass_Test2\",\n \"properties\": {\n \"schemaItemType\": \"CustomAttributeClass\",\n \"appliesTo\": \"AnyProperty\",\n \"baseClass\": \"BisCore.CustomHandledProperty\",\n \"label\": \"Test2\",\n \"description\": \"CustomAttributeClass Test2\"\n }\n },\n {\n \"item\": \"SimpleSchema.CustomAttributeClass_Test3\",\n \"properties\": {\n \"schemaItemType\": \"CustomAttributeClass\",\n \"modifier\": \"Sealed\",\n \"appliesTo\": \"Any\",\n \"baseClass\": \"SimpleSchema.CustomAttributeClass_Test1\",\n \"label\": \"Test3\",\n \"description\": \"CustomAttributeClass Test3\"\n }\n },\n {\n \"item\": \"SimpleSchema.IMixin_Test1\",\n \"properties\": {\n \"schemaItemType\": \"Mixin\",\n \"appliesTo\": \"BisCore.Element\",\n \"label\": \"Test1\",\n \"description\": \"Mixin Test1\"\n }\n },\n {\n \"item\": \"SimpleSchema.IMixin_Test2\",\n \"properties\": {\n \"schemaItemType\": \"Mixin\",\n \"baseClass\": \"SimpleSchema.IMixin_Test1\",\n \"appliesTo\": \"BisCore.PhysicalElement\",\n \"label\": \"Test2\",\n \"description\": \"Mixin Test2\"\n }\n },\n {\n \"item\": \"SimpleSchema.EntityClass_Test1\",\n \"properties\": {\n \"schemaItemType\": \"EntityClass\",\n \"baseClass\": \"BisCore.PhysicalElement\",\n \"label\": \"Test1\",\n \"description\": \"EntityClass Test1\",\n \"mixins\": [\n \"SimpleSchema.IMixin_Test1\"\n ]\n }\n },\n {\n \"item\": \"SimpleSchema.EntityClass_Test2\",\n \"properties\": {\n \"schemaItemType\": \"EntityClass\",\n \"modifier\": \"Abstract\",\n \"baseClass\": \"SimpleSchema.EntityClass_Test1\",\n \"label\": \"Test2\",\n \"description\": \"EntityClass Test2\",\n \"mixins\": [\n \"SimpleSchema.IMixin_Test2\"\n ]\n }\n },\n {\n \"item\": \"SimpleSchema.EntityClass_Test3\",\n \"properties\": {\n \"schemaItemType\": \"EntityClass\",\n \"modifier\": \"Sealed\",\n \"baseClass\": \"SimpleSchema.EntityClass_Test2\",\n \"label\": \"Test3\",\n \"description\": \"EntityClass Test3\"\n }\n },\n {\n \"item\": \"SimpleSchema.EntityClass_Test3\",\n \"properties\": {\n \"schemaItemType\": \"EntityClass\",\n \"baseClass\": \"SimpleSchema.EntityClass_Test2\",\n \"label\": \"Test3\",\n \"description\": \"EntityClass Test3\"\n }\n },\n {\n \"item\": \"SimpleSchema.RelationshipClass_Test1\",\n \"properties\": {\n \"schemaItemType\": \"RelationshipClass\",\n \"modifier\": \"Sealed\",\n \"baseClass\": \"BisCore.ElementRefersToElements\",\n \"label\": \"Test1\",\n \"description\": \"RelationshipClass Test1\",\n \"strength\": \"Referencing\",\n \"strengthDirection\": \"Forward\"\n }\n },\n {\n \"item\": \"SimpleSchema.RelationshipClass_Test2\",\n \"properties\": {\n \"schemaItemType\": \"RelationshipClass\",\n \"modifier\": \"None\",\n \"baseClass\": \"BisCore.ModelModelsElement\",\n \"label\": \"Test2\",\n \"description\": \"RelationshipClass Test2\",\n \"strength\": \"Embedding\",\n \"strengthDirection\": \"Backward\"\n }\n }\n ],\n \"checkHierachy\": {\n \"derivedClass\": \"SimpleSchema.EntityClass_Test3\",\n \"baseClass\": \"SimpleSchema.IMixin_Test1\"\n },\n \"checkFullLoad\": [\n {\n \"item\": \"SimpleSchema.Format_Decimal\",\n \"properties\": {\n \"schemaItemType\": \"Format\",\n \"label\": \"Test\",\n \"description\": \"Format Decimal\",\n \"type\": \"Decimal\",\n \"precision\": 4,\n \"showSignOption\": \"NoSign\",\n \"formatTraits\": [\n \"KeepSingleZero\",\n \"KeepDecimalPoint\"\n ],\n \"thousandSeparator\": \" \",\n \"decimalSeparator\": \",\",\n \"minWidth\": 3,\n \"roundFactor\": 0.1,\n \"composite\": {\n \"spacer\": \"\",\n \"includeZero\": false,\n \"units\": [\n {\n \"name\": \"Units.G\",\n \"label\": \"g\"\n },\n {\n \"name\": \"Units.MG\",\n \"label\": \"mg\"\n }\n ]\n }\n }\n },\n {\n \"item\": \"SimpleSchema.Format_Fractional\",\n \"properties\": {\n \"schemaItemType\": \"Format\",\n \"label\": \"Test\",\n \"description\": \"Format Fractional\",\n \"type\": \"Fractional\",\n \"precision\": 8,\n \"formatTraits\": [\n \"KeepSingleZero\",\n \"ShowUnitLabel\"\n ],\n \"uomSeparator\": \"\",\n \"composite\": {\n \"spacer\": \"\",\n \"units\": [\n {\n \"name\": \"SimpleSchema.Unit_Test1\",\n \"label\": \"test\"\n }\n ]\n }\n }\n },\n {\n \"item\": \"SimpleSchema.KindOfQuantity_Test1\",\n \"properties\": {\n \"schemaItemType\": \"KindOfQuantity\",\n \"label\": \"Test1\",\n \"description\": \"KindOfQuantity Test1\",\n \"relativeError\": 0.001,\n \"persistenceUnit\": \"SimpleSchema.Unit_Test1\",\n \"presentationUnits\": [\n \"SimpleSchema.Format_Fractional(4)[SimpleSchema.Unit_Test1]\"\n ]\n }\n },\n {\n \"item\": \"SimpleSchema.KindOfQuantity_Test2\",\n \"properties\": {\n \"schemaItemType\": \"KindOfQuantity\",\n \"label\": \"Test2\",\n \"description\": \"KindOfQuantity Test2\",\n \"relativeError\": 0.0001,\n \"persistenceUnit\": \"Units.MG\",\n \"presentationUnits\": [\n \"Formats.DefaultRealU(2)[Units.MG]\",\n \"Formats.DefaultRealU(2)[Units.G]\"\n ]\n }\n },\n {\n \"item\": \"SimpleSchema.StructClass_Test1\",\n \"properties\": {\n \"schemaItemType\": \"StructClass\",\n \"modifier\": \"Abstract\",\n \"label\": \"Test1\",\n \"description\": \"StructClass Test1\",\n \"properties\": [\n {\n \"name\": \"DoubleProperty\",\n \"type\": \"PrimitiveProperty\",\n \"category\": \"SimpleSchema.Category_Test\",\n \"label\": \"Double\",\n \"description\": \"Double Property\",\n \"typeName\": \"double\"\n },\n {\n \"name\": \"Point3dProperty\",\n \"type\": \"PrimitiveProperty\",\n \"isReadOnly\": true,\n \"label\": \"Point3\",\n \"description\": \"Point3 Property\",\n \"typeName\": \"point3d\",\n \"customAttributes\": [\n {\n \"className\": \"CoreCustomAttributes.HiddenProperty\"\n },\n {\n \"className\": \"BisCore.CustomHandledProperty\"\n }\n ]\n },\n {\n \"name\": \"LongArrayProperty\",\n \"type\": \"PrimitiveArrayProperty\",\n \"minOccurs\": 0,\n \"maxOccurs\": 52,\n \"label\": \"LongArray\",\n \"description\": \"LongArray Property\",\n \"typeName\": \"long\"\n }\n ]\n }\n },\n {\n \"item\": \"SimpleSchema.StructClass_Test2\",\n \"properties\": {\n \"schemaItemType\": \"StructClass\",\n \"modifier\": \"Sealed\",\n \"baseClass\": \"SimpleSchema.StructClass_Test1\",\n \"label\": \"Test2\",\n \"description\": \"StructClass Test2\",\n \"customAttributes\": [\n {\n \"className\": \"BisCore.ClassHasHandler\"\n }\n ],\n \"properties\": [\n {\n \"name\": \"DateTimeProperty\",\n \"type\": \"PrimitiveProperty\",\n \"kindOfQuantity\": \"SimpleSchema.KindOfQuantity_Test1\",\n \"label\": \"DateTime\",\n \"description\": \"DateTime Property\",\n \"typeName\": \"dateTime\"\n },\n {\n \"name\": \"BooleanProperty\",\n \"type\": \"PrimitiveProperty\",\n \"priority\": 1001,\n \"label\": \"Boolean\",\n \"description\": \"Boolean Property\",\n \"typeName\": \"boolean\"\n },\n {\n \"name\": \"StringEnumerationArrayProperty\",\n \"type\": \"PrimitiveArrayProperty\",\n \"minOccurs\": 0,\n \"maxOccurs\": 3,\n \"label\": \"StringEnumerationArray\",\n \"description\": \"StringEnumerationArray Property\",\n \"typeName\": \"SimpleSchema.Enumeration_String\"\n }\n ]\n }\n },\n {\n \"item\": \"SimpleSchema.CustomAttributeClass_Test1\",\n \"properties\": {\n \"schemaItemType\": \"CustomAttributeClass\",\n \"appliesTo\": \"AnyClass\",\n \"modifier\": \"Abstract\",\n \"label\": \"Test1\",\n \"description\": \"CustomAttributeClass Test1\",\n \"properties\": [\n {\n \"name\": \"StringProperty\",\n \"type\": \"PrimitiveProperty\",\n \"label\": \"String\",\n \"description\": \"String Property\",\n \"extendedTypeName\": \"Json\",\n \"minLength\": 1,\n \"maxLength\": 150,\n \"typeName\": \"string\"\n },\n {\n \"name\": \"StructProperty\",\n \"type\": \"StructProperty\",\n \"label\": \"Struct\",\n \"description\": \"Struct Property\",\n \"typeName\": \"SimpleSchema.StructClass_Test2\"\n }\n ]\n }\n },\n {\n \"item\": \"SimpleSchema.CustomAttributeClass_Test2\",\n \"properties\": {\n \"schemaItemType\": \"CustomAttributeClass\",\n \"appliesTo\": \"AnyProperty\",\n \"baseClass\": \"BisCore.CustomHandledProperty\",\n \"label\": \"Test2\",\n \"description\": \"CustomAttributeClass Test2\",\n \"customAttributes\": [\n {\n \"className\": \"SimpleSchema.CustomAttributeClass_Test3\"\n }\n ],\n \"properties\": [\n {\n \"name\": \"BinaryProperty\",\n \"type\": \"PrimitiveProperty\",\n \"label\": \"Binary\",\n \"description\": \"Binary Property\",\n \"typeName\": \"binary\"\n },\n {\n \"name\": \"IntegerArrayProperty\",\n \"type\": \"PrimitiveArrayProperty\",\n \"minOccurs\": 0,\n \"maxOccurs\": 150,\n \"maxValue\": 1000,\n \"label\": \"IntegerArray\",\n \"description\": \"IntegerArray Property\",\n \"typeName\": \"int\"\n }\n ]\n }\n },\n {\n \"item\": \"SimpleSchema.CustomAttributeClass_Test3\",\n \"properties\": {\n \"schemaItemType\": \"CustomAttributeClass\",\n \"modifier\": \"Sealed\",\n \"appliesTo\": \"Any\",\n \"baseClass\": \"SimpleSchema.CustomAttributeClass_Test1\",\n \"label\": \"Test3\",\n \"description\": \"CustomAttributeClass Test3\",\n \"properties\": [\n {\n \"name\": \"IntegerProperty\",\n \"type\": \"PrimitiveProperty\",\n \"minValue\": 1,\n \"maxValue\": 101,\n \"label\": \"Integer\",\n \"description\": \"Integer Property\",\n \"typeName\": \"int\",\n \"customAttributes\": [\n {\n \"className\": \"BisCore.AutoHandledProperty\",\n \"StatementTypes\": 3\n }\n ]\n },\n {\n \"name\": \"IntegerEnumerationArray\",\n \"type\": \"PrimitiveArrayProperty\",\n \"label\": \"IntegerEnumerationArray\",\n \"description\": \"IntegerEnumerationArray Property\",\n \"minOccurs\": 0,\n \"maxOccurs\": 2147483647,\n \"typeName\": \"BisCore.SectionType\"\n }\n ]\n }\n },\n {\n \"item\": \"SimpleSchema.IMixin_Test1\",\n \"properties\": {\n \"schemaItemType\": \"Mixin\",\n \"appliesTo\": \"BisCore.Element\",\n \"label\": \"Test1\",\n \"description\": \"Mixin Test1\",\n \"properties\": [\n {\n \"name\": \"LongProperty\",\n \"type\": \"PrimitiveProperty\",\n \"category\": \"SimpleSchema.Category_Test\",\n \"label\": \"Long\",\n \"description\": \"Long Property\",\n \"typeName\": \"long\"\n },\n {\n \"name\": \"BooleanArrayProperty\",\n \"type\": \"PrimitiveArrayProperty\",\n \"minOccurs\": 1,\n \"maxOccurs\": 5,\n \"label\": \"BooleanArray\",\n \"description\": \"BooleanArray Property\",\n \"typeName\": \"boolean\"\n }\n ],\n \"customAttributes\": [\n {\n \"className\": \"SimpleSchema.CustomAttributeClass_Test3\"\n }\n ]\n }\n },\n {\n \"item\": \"SimpleSchema.IMixin_Test2\",\n \"properties\": {\n \"schemaItemType\": \"Mixin\",\n \"baseClass\": \"SimpleSchema.IMixin_Test1\",\n \"appliesTo\": \"BisCore.PhysicalElement\",\n \"label\": \"Test2\",\n \"description\": \"Mixin Test2\",\n \"properties\": [\n {\n \"name\": \"IGeometryProperty\",\n \"type\": \"PrimitiveProperty\",\n \"label\": \"IGeometry\",\n \"description\": \"IGeometry Property\",\n \"typeName\": \"Bentley.Geometry.Common.IGeometry\",\n \"customAttributes\": [\n {\n \"className\": \"CoreCustomAttributes.Deprecated\",\n \"Description\": \"Deprecated renamed property.\"\n },\n {\n \"className\": \"CoreCustomAttributes.HiddenProperty\"\n }\n ]\n },\n {\n \"name\": \"DoubleArrayProperty\",\n \"type\": \"PrimitiveArrayProperty\",\n \"minValue\": 0.1,\n \"maxValue\": 9.9,\n \"maxOccurs\": 10,\n \"minOccurs\": 2,\n \"label\": \"DoubleArray\",\n \"description\": \"DoubleArray Property\",\n \"typeName\": \"double\"\n }\n ]\n }\n },\n {\n \"item\": \"SimpleSchema.EntityClass_Test3\",\n \"properties\": {\n \"schemaItemType\": \"EntityClass\",\n \"modifier\": \"Sealed\",\n \"baseClass\": \"SimpleSchema.EntityClass_Test2\",\n \"label\": \"Test3\",\n \"description\": \"EntityClass Test3\",\n \"properties\": [\n {\n \"name\": \"StringEnumerationProperty\",\n \"type\": \"PrimitiveProperty\",\n \"label\": \"StringEnumeration\",\n \"description\": \"StringEnumeration Property\",\n \"typeName\": \"CoreCustomAttributes.ProductionStatusValue\"\n }\n ]\n }\n },\n {\n \"item\": \"SimpleSchema.RelationshipClass_Test1\",\n \"properties\": {\n \"schemaItemType\": \"RelationshipClass\",\n \"modifier\": \"Sealed\",\n \"baseClass\": \"BisCore.ElementRefersToElements\",\n \"label\": \"Test1\",\n \"description\": \"RelationshipClass Test1\",\n \"strength\": \"Referencing\",\n \"strengthDirection\": \"Forward\",\n \"customAttributes\": [\n {\n \"className\": \"CoreCustomAttributes.HiddenClass\",\n \"Show\": false\n }\n ],\n \"properties\": [\n {\n \"name\": \"Point2dArrayProperty\",\n \"type\": \"PrimitiveArrayProperty\",\n \"minOccurs\": 5,\n \"maxOccurs\": 75,\n \"label\": \"Point2dArray\",\n \"description\": \"Point2dArray Property\",\n \"typeName\": \"point2d\"\n },\n {\n \"name\": \"Point3dArrayProperty\",\n \"type\": \"PrimitiveArrayProperty\",\n \"minOccurs\": 3,\n \"maxOccurs\": 13,\n \"label\": \"Point3dArray\",\n \"description\": \"Point3dArray Property\",\n \"typeName\": \"point3d\"\n }\n ],\n \"source\": {\n \"multiplicity\": \"(0..*)\",\n \"roleLabel\": \"refers to\",\n \"polymorphic\": true,\n \"abstractConstraint\": \"BisCore.Element\",\n \"constraintClasses\": [\n \"BisCore.Element\"\n ],\n \"customAttributes\": [\n {\n \"className\": \"SimpleSchema.CustomAttributeClass_Test4\",\n \"StringProperty\": \"Source\"\n }\n ]\n },\n \"target\": {\n \"multiplicity\": \"(0..*)\",\n \"roleLabel\": \"is referenced by\",\n \"polymorphic\": true,\n \"abstractConstraint\": \"BisCore.Element\",\n \"constraintClasses\": [\n \"BisCore.Element\"\n ],\n \"customAttributes\": [\n {\n \"className\": \"SimpleSchema.CustomAttributeClass_Test4\",\n \"StringProperty\": \"Target\"\n }\n ]\n }\n }\n }\n ]\n }\n ]\n}"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConcurrentQuery.test.d.ts","sourceRoot":"","sources":["../../../../src/test/ecdb/ConcurrentQuery.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { DbResponseStatus } from "@itwin/core-common";
|
|
2
|
+
import { expect } from "chai";
|
|
3
|
+
import { ConcurrentQuery } from "../../ConcurrentQuery";
|
|
4
|
+
import { SnapshotDb } from "../../IModelDb";
|
|
5
|
+
import { _nativeDb } from "../../core-backend";
|
|
6
|
+
import { IModelTestUtils } from "../IModelTestUtils";
|
|
7
|
+
async function delay(ms) {
|
|
8
|
+
return new Promise(resolve => {
|
|
9
|
+
setTimeout(resolve, ms);
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
describe("ConcurrentQuery", () => {
|
|
13
|
+
it("default config", () => {
|
|
14
|
+
const testFile = IModelTestUtils.resolveAssetFile("test.bim");
|
|
15
|
+
const db = SnapshotDb.openFile(testFile);
|
|
16
|
+
const defaultConfig = {
|
|
17
|
+
autoShutdownWhenIdleForSeconds: 1800,
|
|
18
|
+
doNotUsePrimaryConnToPrepare: false,
|
|
19
|
+
globalQuota: { time: 60, memory: 8388608 },
|
|
20
|
+
ignoreDelay: true,
|
|
21
|
+
ignorePriority: false,
|
|
22
|
+
memoryMapFileSize: 0,
|
|
23
|
+
monitorPollInterval: 5000,
|
|
24
|
+
progressOpCount: 5000,
|
|
25
|
+
requestQueueSize: 2000,
|
|
26
|
+
statementCacheSizePerWorker: 40,
|
|
27
|
+
workerThreads: 4,
|
|
28
|
+
};
|
|
29
|
+
const config = ConcurrentQuery.resetConfig(db[_nativeDb], {});
|
|
30
|
+
expect(config).deep.eq(defaultConfig);
|
|
31
|
+
db.close();
|
|
32
|
+
});
|
|
33
|
+
it("modify config", () => {
|
|
34
|
+
const testFile = IModelTestUtils.resolveAssetFile("test.bim");
|
|
35
|
+
const db = SnapshotDb.openFile(testFile);
|
|
36
|
+
const modifiedConfig = {
|
|
37
|
+
autoShutdownWhenIdleForSeconds: 100,
|
|
38
|
+
doNotUsePrimaryConnToPrepare: true,
|
|
39
|
+
globalQuota: { time: 10, memory: 1000000 },
|
|
40
|
+
ignoreDelay: false,
|
|
41
|
+
ignorePriority: true,
|
|
42
|
+
memoryMapFileSize: 100,
|
|
43
|
+
monitorPollInterval: 2000,
|
|
44
|
+
progressOpCount: 6000,
|
|
45
|
+
requestQueueSize: 1000,
|
|
46
|
+
statementCacheSizePerWorker: 20,
|
|
47
|
+
workerThreads: 3,
|
|
48
|
+
};
|
|
49
|
+
const config = ConcurrentQuery.resetConfig(db[_nativeDb], modifiedConfig);
|
|
50
|
+
expect(config).deep.eq(modifiedConfig);
|
|
51
|
+
db.close();
|
|
52
|
+
});
|
|
53
|
+
it("time limit check", async () => {
|
|
54
|
+
const testFile = IModelTestUtils.resolveAssetFile("test.bim");
|
|
55
|
+
const db = SnapshotDb.openFile(testFile);
|
|
56
|
+
ConcurrentQuery.resetConfig(db[_nativeDb], { globalQuota: { time: 1, memory: 100000 }, progressOpCount: 1000 });
|
|
57
|
+
// await runSingleRequest(db, `SELECT 1`);
|
|
58
|
+
const req = {
|
|
59
|
+
query: `WITH sequence(n,k) AS (
|
|
60
|
+
SELECT 1,1 UNION ALL SELECT n + 1, random() FROM sequence WHERE n < 10000000
|
|
61
|
+
) SELECT COUNT(*) FROM sequence s`
|
|
62
|
+
};
|
|
63
|
+
const resp = await ConcurrentQuery.executeQueryRequest(db[_nativeDb], req);
|
|
64
|
+
expect(resp.status).equals(DbResponseStatus.Partial);
|
|
65
|
+
expect(resp.stats.timeLimit).equals(1000);
|
|
66
|
+
expect(resp.stats.memLimit).equals(100000);
|
|
67
|
+
expect(resp.stats.cpuTime).to.be.closeTo(1000970, 500000);
|
|
68
|
+
expect(resp.stats.totalTime).to.be.closeTo(1001, 100);
|
|
69
|
+
expect(resp.stats.memUsed).to.be.closeTo(2, 3);
|
|
70
|
+
expect(resp.stats.prepareTime).to.be.closeTo(0, 2);
|
|
71
|
+
db.close();
|
|
72
|
+
});
|
|
73
|
+
it("memory limit check", async () => {
|
|
74
|
+
const testFile = IModelTestUtils.resolveAssetFile("test.bim");
|
|
75
|
+
const db = SnapshotDb.openFile(testFile);
|
|
76
|
+
ConcurrentQuery.resetConfig(db[_nativeDb], { globalQuota: { time: 60, memory: 1000 }, progressOpCount: 1000 });
|
|
77
|
+
// await runSingleRequest(db, `SELECT 1`);
|
|
78
|
+
const req = {
|
|
79
|
+
query: `WITH sequence(n) AS (
|
|
80
|
+
SELECT 1
|
|
81
|
+
UNION ALL
|
|
82
|
+
SELECT n + 1 FROM sequence WHERE n < 10000000
|
|
83
|
+
)
|
|
84
|
+
SELECT 'xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx' FROM sequence s`
|
|
85
|
+
};
|
|
86
|
+
const resp = await ConcurrentQuery.executeQueryRequest(db[_nativeDb], req);
|
|
87
|
+
expect(resp.status).equals(DbResponseStatus.Partial);
|
|
88
|
+
expect(resp.stats.timeLimit).equals(60000);
|
|
89
|
+
expect(resp.stats.memLimit).equals(1000);
|
|
90
|
+
expect(resp.stats.memUsed).to.be.closeTo(1037, 100);
|
|
91
|
+
db.close();
|
|
92
|
+
});
|
|
93
|
+
it("prepare error", async () => {
|
|
94
|
+
const testFile = IModelTestUtils.resolveAssetFile("test.bim");
|
|
95
|
+
const db = SnapshotDb.openFile(testFile);
|
|
96
|
+
const req = {
|
|
97
|
+
query: `xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`
|
|
98
|
+
};
|
|
99
|
+
const resp = await ConcurrentQuery.executeQueryRequest(db[_nativeDb], req);
|
|
100
|
+
expect(resp.status).equals(DbResponseStatus.Error_ECSql_PreparedFailed);
|
|
101
|
+
db.close();
|
|
102
|
+
});
|
|
103
|
+
it("restart query", async () => {
|
|
104
|
+
const testFile = IModelTestUtils.resolveAssetFile("test.bim");
|
|
105
|
+
const db = SnapshotDb.openFile(testFile);
|
|
106
|
+
ConcurrentQuery.resetConfig(db[_nativeDb], { globalQuota: { time: 60, memory: 10000000 }, progressOpCount: 1000 });
|
|
107
|
+
const req0 = {
|
|
108
|
+
query: `WITH sequence(n) AS (
|
|
109
|
+
SELECT 1 UNION ALL SELECT n + 1 FROM sequence WHERE n < 10000000
|
|
110
|
+
) SELECT n FROM sequence s`,
|
|
111
|
+
restartToken: "Blah",
|
|
112
|
+
};
|
|
113
|
+
const req1 = {
|
|
114
|
+
query: `WITH sequence(n) AS (
|
|
115
|
+
SELECT 1 UNION ALL SELECT n + 1 FROM sequence WHERE n < 1000
|
|
116
|
+
) SELECT n FROM sequence s`,
|
|
117
|
+
restartToken: "Blah",
|
|
118
|
+
};
|
|
119
|
+
const resp1 = ConcurrentQuery.executeQueryRequest(db[_nativeDb], req0);
|
|
120
|
+
await delay(1);
|
|
121
|
+
const resp2 = ConcurrentQuery.executeQueryRequest(db[_nativeDb], req1);
|
|
122
|
+
const resp = await Promise.all([resp1, resp2]);
|
|
123
|
+
expect(resp[0].status).equals(DbResponseStatus.Cancel);
|
|
124
|
+
expect(resp[1].status).equals(DbResponseStatus.Done);
|
|
125
|
+
db.close();
|
|
126
|
+
});
|
|
127
|
+
it("queue limit check", async () => {
|
|
128
|
+
const testFile = IModelTestUtils.resolveAssetFile("test.bim");
|
|
129
|
+
const db = SnapshotDb.openFile(testFile);
|
|
130
|
+
ConcurrentQuery.resetConfig(db[_nativeDb], { requestQueueSize: 40, globalQuota: { time: 5, memory: 100000 } });
|
|
131
|
+
const req = {
|
|
132
|
+
query: `WITH sequence(n) AS (
|
|
133
|
+
SELECT 1 UNION ALL SELECT n + 1 FROM sequence WHERE n < 10000000
|
|
134
|
+
) SELECT n FROM sequence s`,
|
|
135
|
+
};
|
|
136
|
+
const responsePromises = [];
|
|
137
|
+
for (let i = 0; i < 60; ++i) {
|
|
138
|
+
responsePromises.push(ConcurrentQuery.executeQueryRequest(db[_nativeDb], req));
|
|
139
|
+
}
|
|
140
|
+
const responses = await Promise.all(responsePromises);
|
|
141
|
+
const queueResponses = Array.from(responses.filter((x) => x.status === DbResponseStatus.QueueFull));
|
|
142
|
+
expect(queueResponses.length).to.be.greaterThanOrEqual(10);
|
|
143
|
+
db.close();
|
|
144
|
+
});
|
|
145
|
+
it("timeout check", async () => {
|
|
146
|
+
const testFile = IModelTestUtils.resolveAssetFile("test.bim");
|
|
147
|
+
const db = SnapshotDb.openFile(testFile);
|
|
148
|
+
ConcurrentQuery.resetConfig(db[_nativeDb], { monitorPollInterval: 1, globalQuota: { time: 5, memory: 10000000 } });
|
|
149
|
+
const req = {
|
|
150
|
+
query: `WITH sequence(n) AS (
|
|
151
|
+
SELECT 1 UNION ALL SELECT n + 1 FROM sequence WHERE n < 10000000
|
|
152
|
+
) SELECT n FROM sequence s`,
|
|
153
|
+
};
|
|
154
|
+
const responsePromises = [];
|
|
155
|
+
for (let i = 0; i < 100; ++i) {
|
|
156
|
+
responsePromises.push(ConcurrentQuery.executeQueryRequest(db[_nativeDb], req));
|
|
157
|
+
}
|
|
158
|
+
const responses = await Promise.all(responsePromises);
|
|
159
|
+
const queueResponses = Array.from(responses.filter((x) => x.status === DbResponseStatus.Timeout));
|
|
160
|
+
expect(queueResponses.length).to.be.greaterThanOrEqual(10);
|
|
161
|
+
db.close();
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
//# sourceMappingURL=ConcurrentQuery.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConcurrentQuery.test.js","sourceRoot":"","sources":["../../../../src/test/ecdb/ConcurrentQuery.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmC,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACvF,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,KAAK,UAAU,KAAK,CAAC,EAAU;IAC7B,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE;QAC3B,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC;AAED,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAC/B,EAAE,CAAC,gBAAgB,EAAE,GAAG,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CAAC;QACD,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;QACtD,MAAM,cAAc,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC;QAClG,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC;QAC3D,EAAE,CAAC,KAAK,EAAE,CAAC;IACb,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { DbQueryRequest, DbQueryResponse, DbResponseStatus } from \"@itwin/core-common\";\nimport { expect } from \"chai\";\nimport { ConcurrentQuery } from \"../../ConcurrentQuery\";\nimport { SnapshotDb } from \"../../IModelDb\";\nimport { _nativeDb } from \"../../core-backend\";\nimport { IModelTestUtils } from \"../IModelTestUtils\";\n\nasync function delay(ms: number): Promise<void> {\n return new Promise(resolve => {\n setTimeout(resolve, ms);\n });\n}\n\ndescribe(\"ConcurrentQuery\", () => {\n it(\"default config\", () => {\n const testFile = IModelTestUtils.resolveAssetFile(\"test.bim\");\n const db = SnapshotDb.openFile(testFile);\n const defaultConfig = {\n autoShutdownWhenIdleForSeconds: 1800,\n doNotUsePrimaryConnToPrepare: false,\n globalQuota: { time: 60, memory: 8388608 },\n ignoreDelay: true,\n ignorePriority: false,\n memoryMapFileSize: 0,\n monitorPollInterval: 5000,\n progressOpCount: 5000,\n requestQueueSize: 2000,\n statementCacheSizePerWorker: 40,\n workerThreads: 4,\n };\n const config = ConcurrentQuery.resetConfig(db[_nativeDb], {});\n expect(config).deep.eq(defaultConfig);\n db.close();\n });\n\n it(\"modify config\", () => {\n const testFile = IModelTestUtils.resolveAssetFile(\"test.bim\");\n const db = SnapshotDb.openFile(testFile);\n const modifiedConfig = {\n autoShutdownWhenIdleForSeconds: 100,\n doNotUsePrimaryConnToPrepare: true,\n globalQuota: { time: 10, memory: 1000000 },\n ignoreDelay: false,\n ignorePriority: true,\n memoryMapFileSize: 100,\n monitorPollInterval: 2000,\n progressOpCount: 6000,\n requestQueueSize: 1000,\n statementCacheSizePerWorker: 20,\n workerThreads: 3,\n };\n const config = ConcurrentQuery.resetConfig(db[_nativeDb], modifiedConfig);\n expect(config).deep.eq(modifiedConfig);\n db.close();\n });\n\n it(\"time limit check\", async () => {\n const testFile = IModelTestUtils.resolveAssetFile(\"test.bim\");\n const db = SnapshotDb.openFile(testFile);\n ConcurrentQuery.resetConfig(db[_nativeDb], { globalQuota: { time: 1, memory: 100000 }, progressOpCount: 1000 });\n // await runSingleRequest(db, `SELECT 1`);\n const req: DbQueryRequest = {\n query: `WITH sequence(n,k) AS (\n SELECT 1,1 UNION ALL SELECT n + 1, random() FROM sequence WHERE n < 10000000\n ) SELECT COUNT(*) FROM sequence s`\n };\n\n const resp = await ConcurrentQuery.executeQueryRequest(db[_nativeDb], req);\n expect(resp.status).equals(DbResponseStatus.Partial);\n expect(resp.stats.timeLimit).equals(1000);\n expect(resp.stats.memLimit).equals(100000);\n expect(resp.stats.cpuTime).to.be.closeTo(1000970, 500000);\n expect(resp.stats.totalTime).to.be.closeTo(1001, 100);\n expect(resp.stats.memUsed).to.be.closeTo(2, 3);\n expect(resp.stats.prepareTime).to.be.closeTo(0, 2);\n db.close();\n });\n\n it(\"memory limit check\", async () => {\n const testFile = IModelTestUtils.resolveAssetFile(\"test.bim\");\n const db = SnapshotDb.openFile(testFile);\n ConcurrentQuery.resetConfig(db[_nativeDb], { globalQuota: { time: 60, memory: 1000 }, progressOpCount: 1000 });\n // await runSingleRequest(db, `SELECT 1`);\n const req: DbQueryRequest = {\n query: `WITH sequence(n) AS (\n SELECT 1\n UNION ALL\n SELECT n + 1 FROM sequence WHERE n < 10000000\n )\n SELECT 'xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx' FROM sequence s`\n };\n\n const resp = await ConcurrentQuery.executeQueryRequest(db[_nativeDb], req);\n expect(resp.status).equals(DbResponseStatus.Partial);\n expect(resp.stats.timeLimit).equals(60000);\n expect(resp.stats.memLimit).equals(1000);\n expect(resp.stats.memUsed).to.be.closeTo(1037, 100);\n db.close();\n });\n\n it(\"prepare error\", async () => {\n const testFile = IModelTestUtils.resolveAssetFile(\"test.bim\");\n const db = SnapshotDb.openFile(testFile);\n const req: DbQueryRequest = {\n query: `xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`\n };\n\n const resp = await ConcurrentQuery.executeQueryRequest(db[_nativeDb], req);\n expect(resp.status).equals(DbResponseStatus.Error_ECSql_PreparedFailed);\n db.close();\n });\n\n it(\"restart query\", async () => {\n const testFile = IModelTestUtils.resolveAssetFile(\"test.bim\");\n const db = SnapshotDb.openFile(testFile);\n ConcurrentQuery.resetConfig(db[_nativeDb], { globalQuota: { time: 60, memory: 10000000 }, progressOpCount: 1000 });\n const req0: DbQueryRequest = {\n query: `WITH sequence(n) AS (\n SELECT 1 UNION ALL SELECT n + 1 FROM sequence WHERE n < 10000000\n ) SELECT n FROM sequence s`,\n restartToken: \"Blah\",\n };\n\n const req1: DbQueryRequest = {\n query: `WITH sequence(n) AS (\n SELECT 1 UNION ALL SELECT n + 1 FROM sequence WHERE n < 1000\n ) SELECT n FROM sequence s`,\n restartToken: \"Blah\",\n };\n\n const resp1 = ConcurrentQuery.executeQueryRequest(db[_nativeDb], req0);\n await delay(1);\n const resp2 = ConcurrentQuery.executeQueryRequest(db[_nativeDb], req1);\n const resp = await Promise.all([resp1, resp2]);\n expect(resp[0].status).equals(DbResponseStatus.Cancel);\n expect(resp[1].status).equals(DbResponseStatus.Done);\n db.close();\n });\n\n it(\"queue limit check\", async () => {\n const testFile = IModelTestUtils.resolveAssetFile(\"test.bim\");\n const db = SnapshotDb.openFile(testFile);\n ConcurrentQuery.resetConfig(db[_nativeDb], { requestQueueSize: 40, globalQuota: { time: 5, memory: 100000 } });\n const req: DbQueryRequest = {\n query: `WITH sequence(n) AS (\n SELECT 1 UNION ALL SELECT n + 1 FROM sequence WHERE n < 10000000\n ) SELECT n FROM sequence s`,\n };\n\n const responsePromises: Promise<DbQueryResponse>[] = [];\n for (let i = 0; i < 60; ++i) {\n responsePromises.push(ConcurrentQuery.executeQueryRequest(db[_nativeDb], req));\n }\n const responses = await Promise.all(responsePromises);\n const queueResponses = Array.from(responses.filter((x) => x.status === DbResponseStatus.QueueFull));\n expect(queueResponses.length).to.be.greaterThanOrEqual(10);\n db.close();\n });\n\n it(\"timeout check\", async () => {\n const testFile = IModelTestUtils.resolveAssetFile(\"test.bim\");\n const db = SnapshotDb.openFile(testFile);\n ConcurrentQuery.resetConfig(db[_nativeDb], { monitorPollInterval: 1, globalQuota: { time: 5, memory: 10000000 } });\n const req: DbQueryRequest = {\n query: `WITH sequence(n) AS (\n SELECT 1 UNION ALL SELECT n + 1 FROM sequence WHERE n < 10000000\n ) SELECT n FROM sequence s`,\n };\n\n const responsePromises: Promise<DbQueryResponse>[] = [];\n for (let i = 0; i < 100; ++i) {\n responsePromises.push(ConcurrentQuery.executeQueryRequest(db[_nativeDb], req));\n }\n const responses = await Promise.all(responsePromises);\n const queueResponses = Array.from(responses.filter((x) => x.status === DbResponseStatus.Timeout));\n expect(queueResponses.length).to.be.greaterThanOrEqual(10);\n db.close();\n });\n});\n"]}
|
|
@@ -6,10 +6,10 @@ import { _nativeDb } from "../../core-backend";
|
|
|
6
6
|
import { IModelTestUtils } from "../IModelTestUtils";
|
|
7
7
|
class LoadSimulator {
|
|
8
8
|
db;
|
|
9
|
-
|
|
10
|
-
constructor(db,
|
|
9
|
+
scenario;
|
|
10
|
+
constructor(db, scenario) {
|
|
11
11
|
this.db = db;
|
|
12
|
-
this.
|
|
12
|
+
this.scenario = scenario;
|
|
13
13
|
}
|
|
14
14
|
async runQueryTask(reader) {
|
|
15
15
|
try {
|
|
@@ -22,23 +22,23 @@ class LoadSimulator {
|
|
|
22
22
|
}
|
|
23
23
|
async run() {
|
|
24
24
|
ConcurrentQuery.shutdown(this.db[_nativeDb]);
|
|
25
|
-
if (this.
|
|
26
|
-
const config = ConcurrentQuery.resetConfig(this.db[_nativeDb], this.
|
|
25
|
+
if (this.scenario.config) {
|
|
26
|
+
const config = ConcurrentQuery.resetConfig(this.db[_nativeDb], this.scenario.config);
|
|
27
27
|
// eslint-disable-next-line no-console
|
|
28
28
|
console.log(config);
|
|
29
29
|
}
|
|
30
|
-
const
|
|
31
|
-
|
|
30
|
+
const overallTime = new StopWatch();
|
|
31
|
+
overallTime.start();
|
|
32
32
|
const results = [];
|
|
33
|
-
for (let i = 0; i < this.
|
|
33
|
+
for (let i = 0; i < this.scenario.totalBatches; ++i) {
|
|
34
34
|
const promises = [];
|
|
35
|
-
const readerTasks = Array(this.
|
|
35
|
+
const readerTasks = Array(this.scenario.taskPerBatch).fill(undefined).map(() => this.scenario.createReader(this.db));
|
|
36
36
|
readerTasks.forEach((reader) => {
|
|
37
37
|
promises.push(this.runQueryTask(reader));
|
|
38
38
|
});
|
|
39
39
|
results.push(...await Promise.all(promises));
|
|
40
40
|
}
|
|
41
|
-
|
|
41
|
+
overallTime.stop();
|
|
42
42
|
const errors = results.filter((x) => x.error !== undefined);
|
|
43
43
|
const errorsMap = new Map();
|
|
44
44
|
errors.forEach((x) => {
|
|
@@ -94,7 +94,7 @@ class LoadSimulator {
|
|
|
94
94
|
retryCount,
|
|
95
95
|
prepareTime,
|
|
96
96
|
},
|
|
97
|
-
|
|
97
|
+
overallTimeInSec: overallTime.currentSeconds,
|
|
98
98
|
errorCount,
|
|
99
99
|
totalQueries: results.length,
|
|
100
100
|
errorMap: errorsMap
|
|
@@ -105,32 +105,22 @@ describe.skip("ConcurrentQueryLoad", () => {
|
|
|
105
105
|
it("should run", async () => {
|
|
106
106
|
Logger.initializeToConsole();
|
|
107
107
|
Logger.setLevel("ECDb.ConcurrentQuery", LogLevel.Trace);
|
|
108
|
-
|
|
109
|
-
// workerThreads: 4,
|
|
110
|
-
// requestQueueSize: 2000,
|
|
111
|
-
// ignorePriority: false,
|
|
112
|
-
// ignoreDelay: true,
|
|
113
|
-
// doNotUsePrimaryConnToPrepare: false,
|
|
114
|
-
// autoShutdowWhenIdlelForSeconds: 300,
|
|
115
|
-
// statementCacheSizePerWorker: 40,
|
|
116
|
-
// monitorPollInterval: 1000,
|
|
117
|
-
// memoryMapFileSize: 0,
|
|
118
|
-
// allowTestingArgs: false,
|
|
119
|
-
// globalQuota: { time: 60, memory: 8388608 }
|
|
120
|
-
// }
|
|
121
|
-
const senario = {
|
|
108
|
+
const scenario = {
|
|
122
109
|
name: "ConcurrentQueryLoad",
|
|
123
|
-
config: {
|
|
110
|
+
config: {
|
|
111
|
+
globalQuota: { time: 1, memory: 8388608 },
|
|
112
|
+
workerThreads: 1,
|
|
113
|
+
},
|
|
124
114
|
totalBatches: 1,
|
|
125
115
|
taskPerBatch: 1,
|
|
126
116
|
createReader: (dbs) => {
|
|
127
|
-
const
|
|
117
|
+
const queries = [
|
|
128
118
|
{
|
|
129
119
|
sql: `
|
|
130
120
|
WITH sequence(n) AS (
|
|
131
121
|
SELECT 1
|
|
132
122
|
UNION ALL
|
|
133
|
-
SELECT n + 1 FROM sequence WHERE n <
|
|
123
|
+
SELECT n + 1 FROM sequence WHERE n < 10000000
|
|
134
124
|
)
|
|
135
125
|
SELECT COUNT(*)
|
|
136
126
|
FROM bis.SpatialIndex i, sequence s
|
|
@@ -142,7 +132,7 @@ describe.skip("ConcurrentQueryLoad", () => {
|
|
|
142
132
|
WITH sequence(n) AS (
|
|
143
133
|
SELECT 1
|
|
144
134
|
UNION ALL
|
|
145
|
-
SELECT n + 1 FROM sequence WHERE n <
|
|
135
|
+
SELECT n + 1 FROM sequence WHERE n < 10000000
|
|
146
136
|
)
|
|
147
137
|
SELECT COUNT(*) FROM sequence`
|
|
148
138
|
},
|
|
@@ -150,13 +140,13 @@ describe.skip("ConcurrentQueryLoad", () => {
|
|
|
150
140
|
sql: "SELECT $ FROM bis.Element LIMIT 10000"
|
|
151
141
|
}
|
|
152
142
|
];
|
|
153
|
-
const idx = Math.floor(Math.random() *
|
|
154
|
-
return dbs.createQueryReader(
|
|
143
|
+
const idx = Math.floor(Math.random() * queries.length);
|
|
144
|
+
return dbs.createQueryReader(queries[idx].sql);
|
|
155
145
|
}
|
|
156
146
|
};
|
|
157
147
|
const verySmallFile = IModelTestUtils.resolveAssetFile("test.bim");
|
|
158
148
|
const db = SnapshotDb.openFile(verySmallFile);
|
|
159
|
-
const simulator = new LoadSimulator(db,
|
|
149
|
+
const simulator = new LoadSimulator(db, scenario);
|
|
160
150
|
const result = await simulator.run();
|
|
161
151
|
// eslint-disable-next-line no-console
|
|
162
152
|
console.log(result);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConcurrentQueryLoad.test.js","sourceRoot":"","sources":["../../../../src/test/ecdb/ConcurrentQueryLoad.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAElE,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,EAAY,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAgBrD,MAAM,aAAa;IACE;IAA4B;IAA/C,YAAmB,EAAmB,EAAS,OAAiB;QAA7C,OAAE,GAAF,EAAE,CAAiB;QAAS,YAAO,GAAP,OAAO,CAAU;IAAI,CAAC;IAC7D,KAAK,CAAC,YAAY,CAAC,MAAmB;QAC5C,IAAI,CAAC;YACH,OAAO,MAAM,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;YAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,C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AAC,CAAC;YAChD,CAAC;SACF,CAAC;QAEF,MAAM,aAAa,GAAG,eAAe,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;QACnE,MAAM,EAAE,GAAG,UAAU,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;QAC9C,MAAM,SAAS,GAAG,IAAI,aAAa,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QACjD,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,GAAG,EAAE,CAAC;QACrC,sCAAsC;QACtC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACpB,EAAE,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;AAEL,CAAC,CAAC,CAAC","sourcesContent":["import { Logger, LogLevel, StopWatch } from \"@itwin/core-bentley\";\nimport { DbQueryConfig, ECSqlReader, QueryStats } from \"@itwin/core-common\";\nimport { expect } from \"chai\";\nimport { ConcurrentQuery } from \"../../ConcurrentQuery\";\nimport { ECDb } from \"../../ECDb\";\nimport { IModelDb, SnapshotDb } from \"../../IModelDb\";\nimport { _nativeDb } from \"../../core-backend\";\nimport { IModelTestUtils } from \"../IModelTestUtils\";\n\ninterface ITaskResult {\n stats: QueryStats;\n error?: any;\n}\n\ninterface ISenario {\n name: string;\n config?: DbQueryConfig;\n totalBatches: number;\n taskPerBatch: number;\n createReader: (db: ECDb | IModelDb) => ECSqlReader;\n}\n\n\nclass LoadSimulator {\n constructor(public db: ECDb | IModelDb, public senario: ISenario) { }\n private async runQueryTask(reader: ECSqlReader): Promise<ITaskResult> {\n try {\n while (await reader.step()) { }\n return { stats: reader.stats };\n } catch (err) {\n return { stats: reader.stats, error: err };\n }\n }\n\n public async run() {\n ConcurrentQuery.shutdown(this.db[_nativeDb]);\n if (this.senario.config) {\n const config = ConcurrentQuery.resetConfig(this.db[_nativeDb], this.senario.config);\n // eslint-disable-next-line no-console\n console.log(config);\n }\n const overalTime = new StopWatch();\n overalTime.start();\n const results: ITaskResult[] = [];\n for (let i = 0; i < this.senario.totalBatches; ++i) {\n const promises: Promise<ITaskResult>[] = [];\n const readerTasks = Array(this.senario.taskPerBatch).fill(undefined).map(() => this.senario.createReader(this.db));\n readerTasks.forEach((reader) => {\n promises.push(this.runQueryTask(reader));\n });\n results.push(... await Promise.all(promises));\n\n }\n overalTime.stop();\n const errors = results.filter((x) => x.error !== undefined);\n const errorsMap = new Map<string, number>();\n errors.forEach((x) => {\n if (x.error instanceof Error) {\n if (!errorsMap.has(x.error.message)) {\n errorsMap.set(x.error.message, 1);\n } else {\n errorsMap.set(x.error.message, errorsMap.get(x.error.message)! + 1);\n }\n } else {\n if (!errorsMap.has(\"error\")) {\n errorsMap.set(\"error\", 1);\n } else {\n errorsMap.set(\"error\", errorsMap.get(\"error\")! + 1);\n }\n }\n });\n const errorCount = errors.length;\n let backendCpuTime: bigint = BigInt(0);\n let backendTotalTime: bigint = BigInt(0);\n let backendMemUsed: bigint = BigInt(0);\n let backendRowsReturned: bigint = BigInt(0);\n let totalTime: bigint = BigInt(0);\n let retryCount: bigint = BigInt(0);\n let prepareTime: bigint = BigInt(0);\n\n // Calculate average\n results.forEach((r: ITaskResult) => {\n backendCpuTime += BigInt(r.stats.backendCpuTime);\n backendTotalTime += BigInt(r.stats.backendTotalTime);\n backendMemUsed += BigInt(r.stats.backendMemUsed);\n backendRowsReturned += BigInt(r.stats.backendRowsReturned);\n totalTime += BigInt(r.stats.totalTime);\n retryCount += BigInt(r.stats.retryCount);\n prepareTime += BigInt(r.stats.prepareTime);\n });\n\n backendCpuTime /= BigInt(results.length);\n backendTotalTime /= BigInt(results.length);\n backendMemUsed /= BigInt(results.length);\n backendRowsReturned /= BigInt(results.length);\n totalTime /= BigInt(results.length);\n retryCount /= BigInt(results.length);\n // prepareTime /= BigInt(results.length);\n\n return {\n result: {\n backendCpuTime,\n backendTotalTime,\n backendMemUsed,\n backendRowsReturned,\n totalTime,\n retryCount,\n prepareTime,\n },\n overalTimeInSec: overalTime.currentSeconds,\n errorCount,\n totalQueries: results.length,\n errorMap: errorsMap\n };\n\n }\n}\n\ndescribe.skip(\"ConcurrentQueryLoad\", () => {\n it(\"should run\", async () => {\n Logger.initializeToConsole();\n Logger.setLevel(\"ECDb.ConcurrentQuery\", LogLevel.Trace);\n // {\n // workerThreads: 4,\n // requestQueueSize: 2000,\n // ignorePriority: false,\n // ignoreDelay: true,\n // doNotUsePrimaryConnToPrepare: false,\n // autoShutdowWhenIdlelForSeconds: 300,\n // statementCacheSizePerWorker: 40,\n // monitorPollInterval: 1000,\n // memoryMapFileSize: 0,\n // allowTestingArgs: false,\n // globalQuota: { time: 60, memory: 8388608 }\n // }\n\n const senario: ISenario = {\n name: \"ConcurrentQueryLoad\",\n config: {\n\n },\n totalBatches: 1,\n taskPerBatch: 1,\n createReader: (dbs: ECDb | IModelDb) => {\n const quries = [\n {\n sql: `\n WITH sequence(n) AS (\n SELECT 1\n UNION ALL\n SELECT n + 1 FROM sequence WHERE n < 10000\n )\n SELECT COUNT(*)\n FROM bis.SpatialIndex i, sequence s\n WHERE i.ECInstanceId MATCH iModel_spatial_overlap_aabb(\n iModel_bbox(random(), random(), random(), random(),random(), random()))`\n },\n {\n sql: `\n WITH sequence(n) AS (\n SELECT 1\n UNION ALL\n SELECT n + 1 FROM sequence WHERE n < 1000000\n )\n SELECT COUNT(*) FROM sequence`\n },\n {\n sql: \"SELECT $ FROM bis.Element LIMIT 10000\"\n }\n ];\n const idx = Math.floor(Math.random() * quries.length);\n return dbs.createQueryReader(quries[idx].sql);\n }\n };\n\n const verySmallFile = IModelTestUtils.resolveAssetFile(\"test.bim\");\n const db = SnapshotDb.openFile(verySmallFile);\n const simulator = new LoadSimulator(db, senario);\n const result = await simulator.run();\n // eslint-disable-next-line no-console\n console.log(result);\n db.close();\n expect(result.errorCount).to.be.equal(0);\n });\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import { Logger, LogLevel, StopWatch } from \"@itwin/core-bentley\";\nimport { DbQueryConfig, ECSqlReader, QueryStats } from \"@itwin/core-common\";\nimport { expect } from \"chai\";\nimport { ConcurrentQuery } from \"../../ConcurrentQuery\";\nimport { ECDb } from \"../../ECDb\";\nimport { IModelDb, SnapshotDb } from \"../../IModelDb\";\nimport { _nativeDb } from \"../../core-backend\";\nimport { IModelTestUtils } from \"../IModelTestUtils\";\n\ninterface ITaskResult {\n stats: QueryStats;\n error?: any;\n}\n\ninterface IScenario {\n name: string;\n config?: DbQueryConfig;\n totalBatches: number;\n taskPerBatch: number;\n createReader: (db: ECDb | IModelDb) => ECSqlReader;\n}\n\nclass LoadSimulator {\n constructor(public db: ECDb | IModelDb, public scenario: IScenario) { }\n private async runQueryTask(reader: ECSqlReader): Promise<ITaskResult> {\n try {\n while (await reader.step()) { }\n return { stats: reader.stats };\n } catch (err) {\n return { stats: reader.stats, error: err };\n }\n }\n\n public async run() {\n ConcurrentQuery.shutdown(this.db[_nativeDb]);\n if (this.scenario.config) {\n const config = ConcurrentQuery.resetConfig(this.db[_nativeDb], this.scenario.config);\n // eslint-disable-next-line no-console\n console.log(config);\n }\n const overallTime = new StopWatch();\n overallTime.start();\n const results: ITaskResult[] = [];\n for (let i = 0; i < this.scenario.totalBatches; ++i) {\n const promises: Promise<ITaskResult>[] = [];\n const readerTasks = Array(this.scenario.taskPerBatch).fill(undefined).map(() => this.scenario.createReader(this.db));\n readerTasks.forEach((reader) => {\n promises.push(this.runQueryTask(reader));\n });\n results.push(... await Promise.all(promises));\n\n }\n overallTime.stop();\n const errors = results.filter((x) => x.error !== undefined);\n const errorsMap = new Map<string, number>();\n errors.forEach((x) => {\n if (x.error instanceof Error) {\n if (!errorsMap.has(x.error.message)) {\n errorsMap.set(x.error.message, 1);\n } else {\n errorsMap.set(x.error.message, errorsMap.get(x.error.message)! + 1);\n }\n } else {\n if (!errorsMap.has(\"error\")) {\n errorsMap.set(\"error\", 1);\n } else {\n errorsMap.set(\"error\", errorsMap.get(\"error\")! + 1);\n }\n }\n });\n const errorCount = errors.length;\n let backendCpuTime: bigint = BigInt(0);\n let backendTotalTime: bigint = BigInt(0);\n let backendMemUsed: bigint = BigInt(0);\n let backendRowsReturned: bigint = BigInt(0);\n let totalTime: bigint = BigInt(0);\n let retryCount: bigint = BigInt(0);\n let prepareTime: bigint = BigInt(0);\n\n // Calculate average\n results.forEach((r: ITaskResult) => {\n backendCpuTime += BigInt(r.stats.backendCpuTime);\n backendTotalTime += BigInt(r.stats.backendTotalTime);\n backendMemUsed += BigInt(r.stats.backendMemUsed);\n backendRowsReturned += BigInt(r.stats.backendRowsReturned);\n totalTime += BigInt(r.stats.totalTime);\n retryCount += BigInt(r.stats.retryCount);\n prepareTime += BigInt(r.stats.prepareTime);\n });\n\n backendCpuTime /= BigInt(results.length);\n backendTotalTime /= BigInt(results.length);\n backendMemUsed /= BigInt(results.length);\n backendRowsReturned /= BigInt(results.length);\n totalTime /= BigInt(results.length);\n retryCount /= BigInt(results.length);\n // prepareTime /= BigInt(results.length);\n\n return {\n result: {\n backendCpuTime,\n backendTotalTime,\n backendMemUsed,\n backendRowsReturned,\n totalTime,\n retryCount,\n prepareTime,\n },\n overallTimeInSec: overallTime.currentSeconds,\n errorCount,\n totalQueries: results.length,\n errorMap: errorsMap\n };\n\n }\n}\ndescribe.skip(\"ConcurrentQueryLoad\", () => {\n it(\"should run\", async () => {\n Logger.initializeToConsole();\n Logger.setLevel(\"ECDb.ConcurrentQuery\", LogLevel.Trace);\n\n const scenario: IScenario = {\n name: \"ConcurrentQueryLoad\",\n config: {\n globalQuota: { time: 1, memory: 8388608 },\n workerThreads: 1,\n },\n totalBatches: 1,\n taskPerBatch: 1,\n createReader: (dbs: ECDb | IModelDb) => {\n const queries = [\n {\n sql: `\n WITH sequence(n) AS (\n SELECT 1\n UNION ALL\n SELECT n + 1 FROM sequence WHERE n < 10000000\n )\n SELECT COUNT(*)\n FROM bis.SpatialIndex i, sequence s\n WHERE i.ECInstanceId MATCH iModel_spatial_overlap_aabb(\n iModel_bbox(random(), random(), random(), random(),random(), random()))`\n },\n {\n sql: `\n WITH sequence(n) AS (\n SELECT 1\n UNION ALL\n SELECT n + 1 FROM sequence WHERE n < 10000000\n )\n SELECT COUNT(*) FROM sequence`\n },\n {\n sql: \"SELECT $ FROM bis.Element LIMIT 10000\"\n }\n ];\n const idx = Math.floor(Math.random() * queries.length);\n return dbs.createQueryReader(queries[idx].sql);\n }\n };\n\n const verySmallFile = IModelTestUtils.resolveAssetFile(\"test.bim\");\n const db = SnapshotDb.openFile(verySmallFile);\n const simulator = new LoadSimulator(db, scenario);\n const result = await simulator.run();\n // eslint-disable-next-line no-console\n console.log(result);\n db.close();\n expect(result.errorCount).to.be.equal(0);\n });\n});\n"]}
|
|
@@ -57,11 +57,12 @@ var __disposeResources = (this && this.__disposeResources) || (function (Suppres
|
|
|
57
57
|
import { assert, expect } from "chai";
|
|
58
58
|
import * as path from "path";
|
|
59
59
|
import * as sinon from "sinon";
|
|
60
|
-
import { DbResult, Id64, Logger } from "@itwin/core-bentley";
|
|
60
|
+
import { DbResult, Id64, Logger, LogLevel } from "@itwin/core-bentley";
|
|
61
61
|
import { ECDb, ECDbOpenMode, IModelJsFs, SqliteValueType } from "../../core-backend";
|
|
62
62
|
import { KnownTestLocations } from "../KnownTestLocations";
|
|
63
63
|
import { ECDbTestHelper } from "./ECDbTestHelper";
|
|
64
64
|
import { QueryOptionsBuilder } from "@itwin/core-common";
|
|
65
|
+
import { EntityClass, SchemaContext, SchemaJsonLocater, SchemaKey } from "@itwin/ecschema-metadata";
|
|
65
66
|
describe("ECDb", () => {
|
|
66
67
|
const outDir = KnownTestLocations.outputDir;
|
|
67
68
|
it("should be able to create a new ECDb", () => {
|
|
@@ -615,7 +616,7 @@ describe("ECDb", () => {
|
|
|
615
616
|
});
|
|
616
617
|
ecdb.closeDb();
|
|
617
618
|
});
|
|
618
|
-
it("should
|
|
619
|
+
it("should log warning but continue if new schema changes are observed without version bump", async () => {
|
|
619
620
|
const ecdb = ECDbTestHelper.createECDb(outDir, "importSchemaNoVersionBump.ecdb");
|
|
620
621
|
const xmlpathOriginal = path.join(outDir, "importSchemaNoVersionBump1.ecschema.xml");
|
|
621
622
|
IModelJsFs.writeFileSync(xmlpathOriginal, `<?xml version="1.0" encoding="UTF-8"?>
|
|
@@ -638,15 +639,35 @@ describe("ECDb", () => {
|
|
|
638
639
|
</ECSchema>`);
|
|
639
640
|
let calledCategory = "";
|
|
640
641
|
let calledMessage = "";
|
|
641
|
-
const
|
|
642
|
+
const stubbedLogWarning = sinon.stub(Logger, "logWarning").callsFake((category, message) => {
|
|
642
643
|
calledCategory = category;
|
|
643
644
|
calledMessage = message;
|
|
644
645
|
});
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
646
|
+
const prevLevel = Logger.getLevel("ECDb");
|
|
647
|
+
try {
|
|
648
|
+
Logger.setLevel("ECDb", LogLevel.Warning);
|
|
649
|
+
// We do not want this behavior (just logs a warning and proceeds), initially we intended to throw an error
|
|
650
|
+
// We will wait for the next major change to make this a hard error
|
|
651
|
+
expect(ecdb.importSchema(xmlpathUpdated)).to.not.throw;
|
|
652
|
+
expect(calledCategory).to.equal("ECDb");
|
|
653
|
+
expect(calledMessage).to.equal("Schema 'Test' has changes but its version was not incremented. Proceeding with import, but this may lead to unexpected behavior.");
|
|
654
|
+
stubbedLogWarning.restore();
|
|
655
|
+
}
|
|
656
|
+
finally {
|
|
657
|
+
if (prevLevel !== undefined)
|
|
658
|
+
Logger.setLevel("ECDb", prevLevel);
|
|
659
|
+
else
|
|
660
|
+
delete Logger._categoryFilter.ECDb;
|
|
661
|
+
}
|
|
662
|
+
const context = new SchemaContext();
|
|
663
|
+
const locater = new SchemaJsonLocater((name) => ecdb.getSchemaProps(name));
|
|
664
|
+
context.addLocater(locater);
|
|
665
|
+
const schema = await context.getSchema(new SchemaKey("Test", 1, 0, 0));
|
|
666
|
+
assert.isDefined(schema);
|
|
667
|
+
const personClass = await schema.getItem("Person", EntityClass);
|
|
668
|
+
assert.isDefined(personClass);
|
|
669
|
+
const heightProp = personClass.getProperty("Height");
|
|
670
|
+
assert.isDefined(heightProp);
|
|
650
671
|
ecdb.closeDb();
|
|
651
672
|
});
|
|
652
673
|
});
|