@itwin/core-backend 5.5.0-dev.1 → 5.5.0-dev.2
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/BackendHubAccess.js.map +1 -1
- package/lib/cjs/BackendLoggerCategory.js.map +1 -1
- package/lib/cjs/BisCoreSchema.js.map +1 -1
- package/lib/cjs/BlobContainerService.js.map +1 -1
- package/lib/cjs/BriefcaseManager.js.map +1 -1
- package/lib/cjs/CatalogDb.js.map +1 -1
- package/lib/cjs/Category.js.map +1 -1
- package/lib/cjs/ChangeSummaryManager.js +2 -2
- package/lib/cjs/ChangeSummaryManager.js.map +1 -1
- package/lib/cjs/ChangedElementsDb.js.map +1 -1
- package/lib/cjs/ChangesetECAdaptor.js +248 -248
- package/lib/cjs/ChangesetECAdaptor.js.map +1 -1
- package/lib/cjs/ChannelControl.js.map +1 -1
- package/lib/cjs/CheckpointManager.js.map +1 -1
- package/lib/cjs/ClassRegistry.js +5 -5
- package/lib/cjs/ClassRegistry.js.map +1 -1
- package/lib/cjs/CloudSqlite.js.map +1 -1
- package/lib/cjs/CodeService.js.map +1 -1
- package/lib/cjs/CodeSpecs.js.map +1 -1
- package/lib/cjs/ConcurrentQuery.js.map +1 -1
- package/lib/cjs/CustomViewState3dCreator.js.map +1 -1
- package/lib/cjs/DevTools.js.map +1 -1
- package/lib/cjs/DisplayStyle.js.map +1 -1
- package/lib/cjs/ECDb.js.map +1 -1
- package/lib/cjs/ECSchemaXmlContext.js.map +1 -1
- package/lib/cjs/ECSqlStatement.js.map +1 -1
- package/lib/cjs/Element.js.map +1 -1
- package/lib/cjs/ElementAspect.js.map +1 -1
- package/lib/cjs/ElementGraphics.js.map +1 -1
- package/lib/cjs/ElementTreeWalker.js.map +1 -1
- package/lib/cjs/Entity.js.map +1 -1
- package/lib/cjs/EntityReferences.js.map +1 -1
- package/lib/cjs/ExportGraphics.js.map +1 -1
- package/lib/cjs/ExternalSource.js.map +1 -1
- package/lib/cjs/FontFile.js.map +1 -1
- package/lib/cjs/GeoCoordConfig.js.map +1 -1
- package/lib/cjs/GeographicCRSServices.js.map +1 -1
- package/lib/cjs/GeometrySummary.js +47 -47
- package/lib/cjs/GeometrySummary.js.map +1 -1
- package/lib/cjs/IModelDb.js +8 -8
- package/lib/cjs/IModelDb.js.map +1 -1
- package/lib/cjs/IModelDbFonts.js.map +1 -1
- package/lib/cjs/IModelElementCloneContext.js.map +1 -1
- package/lib/cjs/IModelHost.js.map +1 -1
- package/lib/cjs/IModelIncrementalSchemaLocater.js.map +1 -1
- package/lib/cjs/IModelJsFs.js.map +1 -1
- package/lib/cjs/ImageSourceConversion.js.map +1 -1
- package/lib/cjs/IpcHost.js.map +1 -1
- package/lib/cjs/LineStyle.js.map +1 -1
- package/lib/cjs/LocalHub.js +1 -1
- package/lib/cjs/LocalHub.js.map +1 -1
- package/lib/cjs/LocalhostIpcHost.js.map +1 -1
- package/lib/cjs/LockControl.js.map +1 -1
- package/lib/cjs/Material.js.map +1 -1
- package/lib/cjs/Model.js.map +1 -1
- package/lib/cjs/NativeAppStorage.js.map +1 -1
- package/lib/cjs/NativeHost.js.map +1 -1
- package/lib/cjs/NavigationRelationship.js.map +1 -1
- package/lib/cjs/PromiseMemoizer.js.map +1 -1
- package/lib/cjs/PropertyStore.js.map +1 -1
- package/lib/cjs/Relationship.js.map +1 -1
- package/lib/cjs/RpcBackend.js.map +1 -1
- package/lib/cjs/SQLiteDb.js.map +1 -1
- package/lib/cjs/Schema.js.map +1 -1
- package/lib/cjs/SchemaSync.js.map +1 -1
- package/lib/cjs/SchemaUtils.js.map +1 -1
- package/lib/cjs/SheetIndex.js.map +1 -1
- package/lib/cjs/SqliteChangesetReader.js.map +1 -1
- package/lib/cjs/SqliteStatement.js.map +1 -1
- package/lib/cjs/StashManager.js.map +1 -1
- package/lib/cjs/Texture.js.map +1 -1
- package/lib/cjs/TileStorage.js.map +1 -1
- package/lib/cjs/TxnManager.js.map +1 -1
- package/lib/cjs/ViewDefinition.js.map +1 -1
- package/lib/cjs/ViewStateHydrator.js.map +1 -1
- package/lib/cjs/ViewStore.js.map +1 -1
- package/lib/cjs/annotations/ElementDrivesTextAnnotation.js.map +1 -1
- package/lib/cjs/annotations/FrameGeometry.js.map +1 -1
- package/lib/cjs/annotations/LeaderGeometry.js.map +1 -1
- package/lib/cjs/annotations/TextAnnotationElement.js.map +1 -1
- package/lib/cjs/annotations/TextAnnotationGeometry.js.map +1 -1
- package/lib/cjs/annotations/TextBlockGeometry.js.map +1 -1
- package/lib/cjs/annotations/TextBlockLayout.js.map +1 -1
- package/lib/cjs/assets/IModelChange.02.00.00.ecschema.xml +90 -90
- package/lib/cjs/assets/Settings/Schemas/Base.Schema.json +32 -32
- package/lib/cjs/assets/Settings/Schemas/Gcs.schema.json +27 -27
- package/lib/cjs/assets/Settings/Schemas/Workspace.Schema.json +94 -94
- package/lib/cjs/assets/Settings/backend.setting.json5 +21 -21
- package/lib/cjs/core-backend.js.map +1 -1
- package/lib/cjs/domains/FunctionalElements.js.map +1 -1
- package/lib/cjs/domains/FunctionalSchema.js.map +1 -1
- package/lib/cjs/domains/GenericElements.js.map +1 -1
- package/lib/cjs/domains/GenericSchema.js.map +1 -1
- package/lib/cjs/internal/ChangesetConflictArgs.js.map +1 -1
- package/lib/cjs/internal/ChannelAdmin.js.map +1 -1
- package/lib/cjs/internal/ElementLRUCache.js.map +1 -1
- package/lib/cjs/internal/FontFileImpl.js.map +1 -1
- package/lib/cjs/internal/HubMock.js.map +1 -1
- package/lib/cjs/internal/IModelDbFontsImpl.js.map +1 -1
- package/lib/cjs/internal/NativePlatform.js.map +1 -1
- package/lib/cjs/internal/NoLocks.js.map +1 -1
- package/lib/cjs/internal/OnlineStatus.js.map +1 -1
- package/lib/cjs/internal/ServerBasedLocks.js.map +1 -1
- package/lib/cjs/internal/Symbols.js.map +1 -1
- package/lib/cjs/internal/annotations/fields.js.map +1 -1
- package/lib/cjs/internal/cross-package.js.map +1 -1
- package/lib/cjs/internal/workspace/SettingsImpl.js.map +1 -1
- package/lib/cjs/internal/workspace/SettingsSchemasImpl.js.map +1 -1
- package/lib/cjs/internal/workspace/WorkspaceImpl.js.map +1 -1
- package/lib/cjs/internal/workspace/WorkspaceSqliteDb.js.map +1 -1
- package/lib/cjs/rpc/multipart.js.map +1 -1
- package/lib/cjs/rpc/tracing.js.map +1 -1
- package/lib/cjs/rpc/web/logging.js.map +1 -1
- package/lib/cjs/rpc/web/request.js.map +1 -1
- package/lib/cjs/rpc/web/response.js.map +1 -1
- package/lib/cjs/rpc-impl/DevToolsRpcImpl.js.map +1 -1
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
- package/lib/cjs/rpc-impl/IModelTileRpcImpl.js.map +1 -1
- package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
- package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
- package/lib/cjs/workspace/Settings.js.map +1 -1
- package/lib/cjs/workspace/SettingsSchemas.js.map +1 -1
- package/lib/cjs/workspace/Workspace.js.map +1 -1
- package/lib/cjs/workspace/WorkspaceEditor.js.map +1 -1
- package/lib/esm/BackendHubAccess.js.map +1 -1
- package/lib/esm/BackendLoggerCategory.js.map +1 -1
- package/lib/esm/BisCoreSchema.js.map +1 -1
- package/lib/esm/BlobContainerService.js.map +1 -1
- package/lib/esm/BriefcaseManager.js.map +1 -1
- package/lib/esm/CatalogDb.js.map +1 -1
- package/lib/esm/Category.js.map +1 -1
- package/lib/esm/ChangeSummaryManager.js +2 -2
- package/lib/esm/ChangeSummaryManager.js.map +1 -1
- package/lib/esm/ChangedElementsDb.js.map +1 -1
- package/lib/esm/ChangesetECAdaptor.js +248 -248
- package/lib/esm/ChangesetECAdaptor.js.map +1 -1
- package/lib/esm/ChannelControl.js.map +1 -1
- package/lib/esm/CheckpointManager.js.map +1 -1
- package/lib/esm/ClassRegistry.js +5 -5
- package/lib/esm/ClassRegistry.js.map +1 -1
- package/lib/esm/CloudSqlite.js.map +1 -1
- package/lib/esm/CodeService.js.map +1 -1
- package/lib/esm/CodeSpecs.js.map +1 -1
- package/lib/esm/ConcurrentQuery.js.map +1 -1
- package/lib/esm/CustomViewState3dCreator.js.map +1 -1
- package/lib/esm/DevTools.js.map +1 -1
- package/lib/esm/DisplayStyle.js.map +1 -1
- package/lib/esm/ECDb.js.map +1 -1
- package/lib/esm/ECSchemaXmlContext.js.map +1 -1
- package/lib/esm/ECSqlStatement.js.map +1 -1
- package/lib/esm/Element.js.map +1 -1
- package/lib/esm/ElementAspect.js.map +1 -1
- package/lib/esm/ElementGraphics.js.map +1 -1
- package/lib/esm/ElementTreeWalker.js.map +1 -1
- package/lib/esm/Entity.js.map +1 -1
- package/lib/esm/EntityReferences.js.map +1 -1
- package/lib/esm/ExportGraphics.js.map +1 -1
- package/lib/esm/ExternalSource.js.map +1 -1
- package/lib/esm/FontFile.js.map +1 -1
- package/lib/esm/GeoCoordConfig.js.map +1 -1
- package/lib/esm/GeographicCRSServices.js.map +1 -1
- package/lib/esm/GeometrySummary.js +47 -47
- package/lib/esm/GeometrySummary.js.map +1 -1
- package/lib/esm/IModelDb.js +8 -8
- package/lib/esm/IModelDb.js.map +1 -1
- package/lib/esm/IModelDbFonts.js.map +1 -1
- package/lib/esm/IModelElementCloneContext.js.map +1 -1
- package/lib/esm/IModelHost.js.map +1 -1
- package/lib/esm/IModelIncrementalSchemaLocater.js.map +1 -1
- package/lib/esm/IModelJsFs.js.map +1 -1
- package/lib/esm/ImageSourceConversion.js.map +1 -1
- package/lib/esm/IpcHost.js.map +1 -1
- package/lib/esm/LineStyle.js.map +1 -1
- package/lib/esm/LocalHub.js +1 -1
- package/lib/esm/LocalHub.js.map +1 -1
- package/lib/esm/LocalhostIpcHost.js.map +1 -1
- package/lib/esm/LockControl.js.map +1 -1
- package/lib/esm/Material.js.map +1 -1
- package/lib/esm/Model.js.map +1 -1
- package/lib/esm/NativeAppStorage.js.map +1 -1
- package/lib/esm/NativeHost.js.map +1 -1
- package/lib/esm/NavigationRelationship.js.map +1 -1
- package/lib/esm/PromiseMemoizer.js.map +1 -1
- package/lib/esm/PropertyStore.js.map +1 -1
- package/lib/esm/Relationship.js.map +1 -1
- package/lib/esm/RpcBackend.js.map +1 -1
- package/lib/esm/SQLiteDb.js.map +1 -1
- package/lib/esm/Schema.js.map +1 -1
- package/lib/esm/SchemaSync.js.map +1 -1
- package/lib/esm/SchemaUtils.js.map +1 -1
- package/lib/esm/SheetIndex.js.map +1 -1
- package/lib/esm/SqliteChangesetReader.js.map +1 -1
- package/lib/esm/SqliteStatement.js.map +1 -1
- package/lib/esm/StashManager.js.map +1 -1
- package/lib/esm/Texture.js.map +1 -1
- package/lib/esm/TileStorage.js.map +1 -1
- package/lib/esm/TxnManager.js.map +1 -1
- package/lib/esm/ViewDefinition.js.map +1 -1
- package/lib/esm/ViewStateHydrator.js.map +1 -1
- package/lib/esm/ViewStore.js.map +1 -1
- package/lib/esm/annotations/ElementDrivesTextAnnotation.js.map +1 -1
- package/lib/esm/annotations/FrameGeometry.js.map +1 -1
- package/lib/esm/annotations/LeaderGeometry.js.map +1 -1
- package/lib/esm/annotations/TextAnnotationElement.js.map +1 -1
- package/lib/esm/annotations/TextAnnotationGeometry.js.map +1 -1
- package/lib/esm/annotations/TextBlockGeometry.js.map +1 -1
- package/lib/esm/annotations/TextBlockLayout.js.map +1 -1
- package/lib/esm/core-backend.js.map +1 -1
- package/lib/esm/domains/FunctionalElements.js.map +1 -1
- package/lib/esm/domains/FunctionalSchema.js.map +1 -1
- package/lib/esm/domains/GenericElements.js.map +1 -1
- package/lib/esm/domains/GenericSchema.js.map +1 -1
- package/lib/esm/internal/ChangesetConflictArgs.js.map +1 -1
- package/lib/esm/internal/ChannelAdmin.js.map +1 -1
- package/lib/esm/internal/ElementLRUCache.js.map +1 -1
- package/lib/esm/internal/FontFileImpl.js.map +1 -1
- package/lib/esm/internal/HubMock.js.map +1 -1
- package/lib/esm/internal/IModelDbFontsImpl.js.map +1 -1
- package/lib/esm/internal/NativePlatform.js.map +1 -1
- package/lib/esm/internal/NoLocks.js.map +1 -1
- package/lib/esm/internal/OnlineStatus.js.map +1 -1
- package/lib/esm/internal/ServerBasedLocks.js.map +1 -1
- package/lib/esm/internal/Symbols.js.map +1 -1
- package/lib/esm/internal/annotations/fields.js.map +1 -1
- package/lib/esm/internal/cross-package.js.map +1 -1
- package/lib/esm/internal/workspace/SettingsImpl.js.map +1 -1
- package/lib/esm/internal/workspace/SettingsSchemasImpl.js.map +1 -1
- package/lib/esm/internal/workspace/WorkspaceImpl.js.map +1 -1
- package/lib/esm/internal/workspace/WorkspaceSqliteDb.js.map +1 -1
- package/lib/esm/rpc/multipart.js.map +1 -1
- package/lib/esm/rpc/tracing.js.map +1 -1
- package/lib/esm/rpc/web/logging.js.map +1 -1
- package/lib/esm/rpc/web/request.js.map +1 -1
- package/lib/esm/rpc/web/response.js.map +1 -1
- package/lib/esm/rpc-impl/DevToolsRpcImpl.js.map +1 -1
- package/lib/esm/rpc-impl/IModelReadRpcImpl.js.map +1 -1
- package/lib/esm/rpc-impl/IModelTileRpcImpl.js.map +1 -1
- package/lib/esm/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
- package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
- package/lib/esm/test/AdvancedEqual.js.map +1 -1
- package/lib/esm/test/AnnotationTestUtils.js.map +1 -1
- package/lib/esm/test/AttachDb.test.js +11 -11
- package/lib/esm/test/AttachDb.test.js.map +1 -1
- package/lib/esm/test/ElementDrivesElement.test.js +23 -23
- package/lib/esm/test/ElementDrivesElement.test.js.map +1 -1
- package/lib/esm/test/ElementLRUCache.test.js.map +1 -1
- package/lib/esm/test/GeometryTestUtil.js.map +1 -1
- package/lib/esm/test/IModelHost.test.js.map +1 -1
- package/lib/esm/test/IModelTestUtils.js.map +1 -1
- package/lib/esm/test/ImageSourceConversion.test.js.map +1 -1
- package/lib/esm/test/IpcHost.test.js.map +1 -1
- package/lib/esm/test/KnownTestLocations.js.map +1 -1
- package/lib/esm/test/PrintElementTree.js.map +1 -1
- package/lib/esm/test/PropertyDb.test.js.map +1 -1
- package/lib/esm/test/RevisionUtility.js.map +1 -1
- package/lib/esm/test/SchemaUtils.test.js +25 -25
- package/lib/esm/test/SchemaUtils.test.js.map +1 -1
- package/lib/esm/test/SequentialLogMatcher.js.map +1 -1
- package/lib/esm/test/TestChangeSetUtility.js.map +1 -1
- package/lib/esm/test/TestUtils.js.map +1 -1
- package/lib/esm/test/annotations/Fields.test.js +53 -53
- package/lib/esm/test/annotations/Fields.test.js.map +1 -1
- package/lib/esm/test/annotations/FrameGeometry.test.js.map +1 -1
- package/lib/esm/test/annotations/LeaderGeometry.test.js.map +1 -1
- package/lib/esm/test/annotations/TextAnnotation.test.js.map +1 -1
- package/lib/esm/test/annotations/TextBlock.test.js.map +1 -1
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.js.map +1 -1
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.js.map +1 -1
- package/lib/esm/test/categories/Category.test.js.map +1 -1
- package/lib/esm/test/codespec/CodeSpec.test.js.map +1 -1
- package/lib/esm/test/ecdb/CTE.test.js +88 -88
- package/lib/esm/test/ecdb/CTE.test.js.map +1 -1
- package/lib/esm/test/ecdb/ConcurrentQuery.test.js +15 -15
- package/lib/esm/test/ecdb/ConcurrentQuery.test.js.map +1 -1
- package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js +15 -15
- package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECDb.test.js +72 -72
- package/lib/esm/test/ecdb/ECDb.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECDbTestHelper.js.map +1 -1
- package/lib/esm/test/ecdb/ECSchemaXmlContext.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECSqlAst.test.js +65 -65
- package/lib/esm/test/ecdb/ECSqlAst.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECSqlQuery.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECSqlReader.test.js +16 -16
- package/lib/esm/test/ecdb/ECSqlReader.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECSqlStatement.test.js +332 -332
- package/lib/esm/test/ecdb/ECSqlStatement.test.js.map +1 -1
- package/lib/esm/test/ecdb/SqliteStatement.test.js.map +1 -1
- package/lib/esm/test/ecsql/dataset/ECSqlDatasets.js.map +1 -1
- package/lib/esm/test/ecsql/src/ECSqlTestGenerator.js +21 -21
- package/lib/esm/test/ecsql/src/ECSqlTestGenerator.js.map +1 -1
- package/lib/esm/test/ecsql/src/ECSqlTestParser.js.map +1 -1
- package/lib/esm/test/ecsql/src/ECSqlTestRunner.test.js.map +1 -1
- package/lib/esm/test/element/DeleteDefinitionElements.test.js.map +1 -1
- package/lib/esm/test/element/ElementAspect.test.js +22 -22
- package/lib/esm/test/element/ElementAspect.test.js.map +1 -1
- package/lib/esm/test/element/ElementDependencyGraph.test.js.map +1 -1
- package/lib/esm/test/element/ElementRoundTrip.test.js +139 -139
- package/lib/esm/test/element/ElementRoundTrip.test.js.map +1 -1
- package/lib/esm/test/element/ExcludedElements.test.js.map +1 -1
- package/lib/esm/test/element/ExternalSource.test.js.map +1 -1
- package/lib/esm/test/element/NullStructArray.test.js +13 -13
- package/lib/esm/test/element/NullStructArray.test.js.map +1 -1
- package/lib/esm/test/element/ProjectInformationRecord.test.js.map +1 -1
- package/lib/esm/test/element/SheetInformationAspect.test.js.map +1 -1
- package/lib/esm/test/element/UrlLink.test.js.map +1 -1
- package/lib/esm/test/font/FontFile.test.js.map +1 -1
- package/lib/esm/test/font/IModelDbFonts.test.js.map +1 -1
- package/lib/esm/test/hubaccess/ApplyChangeset.test.js +32 -32
- package/lib/esm/test/hubaccess/ApplyChangeset.test.js.map +1 -1
- package/lib/esm/test/hubaccess/BriefcaseManager.test.js.map +1 -1
- package/lib/esm/test/hubaccess/CheckpointManager.test.js.map +1 -1
- package/lib/esm/test/hubaccess/Rebase.test.js +40 -40
- package/lib/esm/test/hubaccess/Rebase.test.js.map +1 -1
- package/lib/esm/test/imageData.js.map +1 -1
- package/lib/esm/test/imodel/Code.test.js.map +1 -1
- package/lib/esm/test/imodel/ElementTreeWalker.test.js.map +1 -1
- package/lib/esm/test/imodel/GetTextureImage.test.js.map +1 -1
- package/lib/esm/test/imodel/IModel.test.js +44 -44
- package/lib/esm/test/imodel/IModel.test.js.map +1 -1
- package/lib/esm/test/imodel/ProjectExtents.test.js.map +1 -1
- package/lib/esm/test/imodel/SchemaXmlImport.test.js.map +1 -1
- package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.js.map +1 -1
- package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.js.map +1 -1
- package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.js.map +1 -1
- package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.js.map +1 -1
- package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.js.map +1 -1
- package/lib/esm/test/index.js.map +1 -1
- package/lib/esm/test/misc/DevTools.test.js.map +1 -1
- package/lib/esm/test/misc/EntitySubClasses.test.js.map +1 -1
- package/lib/esm/test/misc/GeoServices.test.js.map +1 -1
- package/lib/esm/test/misc/PromiseMemoizer.test.js.map +1 -1
- package/lib/esm/test/native/DgnDbWorker.test.js.map +1 -1
- package/lib/esm/test/rpc/response.test.js.map +1 -1
- package/lib/esm/test/schema/ClassRegistry.test.js +99 -99
- package/lib/esm/test/schema/ClassRegistry.test.js.map +1 -1
- package/lib/esm/test/schema/FunctionalDomain.test.js.map +1 -1
- package/lib/esm/test/schema/GenericDomain.test.js.map +1 -1
- package/lib/esm/test/schema/IModelSchemaContext.test.js.map +1 -1
- package/lib/esm/test/sheetindex/SheetIndex.test.js.map +1 -1
- package/lib/esm/test/standalone/ChangeMerge.test.js.map +1 -1
- package/lib/esm/test/standalone/ChangesetReader.test.js +124 -124
- package/lib/esm/test/standalone/ChangesetReader.test.js.map +1 -1
- package/lib/esm/test/standalone/CustomViewState3dCreator.test.js.map +1 -1
- package/lib/esm/test/standalone/DisplayStyle.test.js.map +1 -1
- package/lib/esm/test/standalone/Drawing.test.js.map +1 -1
- package/lib/esm/test/standalone/ElementGraphics.test.js.map +1 -1
- package/lib/esm/test/standalone/ElementMesh.test.js.map +1 -1
- package/lib/esm/test/standalone/ExportGraphics.test.js +14 -14
- package/lib/esm/test/standalone/ExportGraphics.test.js.map +1 -1
- package/lib/esm/test/standalone/GeometryChangeEvents.test.js.map +1 -1
- package/lib/esm/test/standalone/GeometryStream.test.js.map +1 -1
- package/lib/esm/test/standalone/HubMock.test.js.map +1 -1
- package/lib/esm/test/standalone/IModelLimits.test.js.map +1 -1
- package/lib/esm/test/standalone/IModelWrite.test.js +27 -27
- package/lib/esm/test/standalone/IModelWrite.test.js.map +1 -1
- package/lib/esm/test/standalone/InlineGeometryPartReferences.test.js.map +1 -1
- package/lib/esm/test/standalone/MergeConflict.test.js.map +1 -1
- package/lib/esm/test/standalone/NativeAppStorage.test.js.map +1 -1
- package/lib/esm/test/standalone/RenderMaterialElement.test.js.map +1 -1
- package/lib/esm/test/standalone/RenderTimeline.test.js.map +1 -1
- package/lib/esm/test/standalone/SQLiteDb.test.js.map +1 -1
- package/lib/esm/test/standalone/SchemaUtils.test.js.map +1 -1
- package/lib/esm/test/standalone/SectionDrawing.test.js.map +1 -1
- package/lib/esm/test/standalone/ServerBasedLocks.test.js.map +1 -1
- package/lib/esm/test/standalone/Setting.test.js.map +1 -1
- package/lib/esm/test/standalone/Settings.test.js.map +1 -1
- package/lib/esm/test/standalone/SettingsSchemas.test.js.map +1 -1
- package/lib/esm/test/standalone/SnapshotDb.test.js.map +1 -1
- package/lib/esm/test/standalone/Texture.test.js.map +1 -1
- package/lib/esm/test/standalone/TileCache.test.js.map +1 -1
- package/lib/esm/test/standalone/TileTree.test.js.map +1 -1
- package/lib/esm/test/standalone/TxnManager.test.js.map +1 -1
- package/lib/esm/test/standalone/ViewDefinition.test.js.map +1 -1
- package/lib/esm/test/standalone/ViewStoreDb.test.js.map +1 -1
- package/lib/esm/test/standalone/Workspace.test.js.map +1 -1
- package/lib/esm/workspace/Settings.js.map +1 -1
- package/lib/esm/workspace/SettingsSchemas.js.map +1 -1
- package/lib/esm/workspace/Workspace.js.map +1 -1
- package/lib/esm/workspace/WorkspaceEditor.js.map +1 -1
- package/package.json +14 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ECSchemaXmlContext.js","sourceRoot":"","sources":["../../src/ECSchemaXmlContext.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA6C;AAC7C,oDAAiD;AAEjD,8DAAyD;AAQzD;;;;;;;GAOG;AACH,MAAa,kBAAkB;IACrB,cAAc,CAAgD;IAEtE,8DAA8D;IAC9D;QACE,IAAI,CAAC,cAAc,GAAG,IAAI,6BAAY,CAAC,QAAQ,CAAC,kBAAkB,EAAE,CAAC;IACvE,CAAC;IAED,gBAAgB;IAChB,IAAW,aAAa;QACtB,IAAA,qBAAM,EAAC,SAAS,KAAK,IAAI,CAAC,cAAc,CAAC,CAAC;QAC1C,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAED;;;OAGG;IACI,aAAa,CAAC,UAAkB;QACrC,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IAC/C,CAAC;IAED;;;OAGG;IACI,gBAAgB,CAAC,OAAgE;QACtF,IAAI,CAAC,aAAa,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAC/C,CAAC;IAED;;;;OAIG;IACI,qBAAqB,CAAC,OAAgE;QAC3F,IAAI,CAAC,aAAa,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;IACpD,CAAC;IAED;;;;OAIG;IACI,qBAAqB,CAAC,QAAgB;QAC3C,MAAM,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC;QACpE,IAAI,QAAQ,CAAC,KAAK,EAAE,CAAC;YACnB,MAAM,IAAI,yBAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACvE,CAAC;QAED,IAAA,qBAAM,EAAC,SAAS,KAAK,QAAQ,CAAC,MAAM,CAAC,CAAC;QACtC,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC;CACF;AArDD,gDAqDC","sourcesContent":["/*---------------------------------------------------------------------------------------------\
|
|
1
|
+
{"version":3,"file":"ECSchemaXmlContext.js","sourceRoot":"","sources":["../../src/ECSchemaXmlContext.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA6C;AAC7C,oDAAiD;AAEjD,8DAAyD;AAQzD;;;;;;;GAOG;AACH,MAAa,kBAAkB;IACrB,cAAc,CAAgD;IAEtE,8DAA8D;IAC9D;QACE,IAAI,CAAC,cAAc,GAAG,IAAI,6BAAY,CAAC,QAAQ,CAAC,kBAAkB,EAAE,CAAC;IACvE,CAAC;IAED,gBAAgB;IAChB,IAAW,aAAa;QACtB,IAAA,qBAAM,EAAC,SAAS,KAAK,IAAI,CAAC,cAAc,CAAC,CAAC;QAC1C,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAED;;;OAGG;IACI,aAAa,CAAC,UAAkB;QACrC,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IAC/C,CAAC;IAED;;;OAGG;IACI,gBAAgB,CAAC,OAAgE;QACtF,IAAI,CAAC,aAAa,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAC/C,CAAC;IAED;;;;OAIG;IACI,qBAAqB,CAAC,OAAgE;QAC3F,IAAI,CAAC,aAAa,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;IACpD,CAAC;IAED;;;;OAIG;IACI,qBAAqB,CAAC,QAAgB;QAC3C,MAAM,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC;QACpE,IAAI,QAAQ,CAAC,KAAK,EAAE,CAAC;YACnB,MAAM,IAAI,yBAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACvE,CAAC;QAED,IAAA,qBAAM,EAAC,SAAS,KAAK,QAAQ,CAAC,MAAM,CAAC,CAAC;QACtC,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC;CACF;AArDD,gDAqDC","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 Schema\n */\n\nimport { assert } from \"@itwin/core-bentley\";\nimport { IModelError } from \"@itwin/core-common\";\nimport { IModelJsNative } from \"@bentley/imodeljs-native\";\nimport { IModelNative } from \"./internal/NativePlatform\";\n\n/** @internal */\nexport type SchemaKey = IModelJsNative.ECSchemaXmlContext.SchemaKey;\n\n/** @internal */\nexport type SchemaMatchType = IModelJsNative.ECSchemaXmlContext.SchemaMatchType;\n\n/** Context used when deserializing a [Schema]($ecschema-metadata) from an XML file.\n * A schema may contain references to other schemas, which may reside elsewhere on the local disk than the referencing schema.\n * The context maintains a list of directories (\"search paths\") to search for referenced schemas. Directories can be appended to the list via [[addSchemaPath]].\n * When a referenced schema needs to be located, the list of directories is searched in the order in which each was added.\n * Once located, the schema is cached to avoid performing repeated lookups in the file system.\n * @see [[readSchemaFromXmlFile]] to deserialize a schema.\n * @public @preview\n */\nexport class ECSchemaXmlContext {\n private _nativeContext: IModelJsNative.ECSchemaXmlContext | undefined;\n\n /** Construct a context with an empty list of search paths. */\n constructor() {\n this._nativeContext = new IModelNative.platform.ECSchemaXmlContext();\n }\n\n /** @internal */\n public get nativeContext(): IModelJsNative.ECSchemaXmlContext {\n assert(undefined !== this._nativeContext);\n return this._nativeContext;\n }\n\n /** Append a directory to the list of directories that will be searched to locate referenced schemas.\n * The directories are searched in the order in which they were added to the list.\n * @param searchPath The absolute path to the directory to search.\n */\n public addSchemaPath(searchPath: string): void {\n this.nativeContext.addSchemaPath(searchPath);\n }\n\n /** Set the last locater to be used when trying to find a schema\n * @param locater Locater that should be used as the last locater when trying to find a schema\n * @internal\n */\n public setSchemaLocater(locater: IModelJsNative.ECSchemaXmlContext.SchemaLocaterCallback): void {\n this.nativeContext.setSchemaLocater(locater);\n }\n\n /** Adds a schema locator to the beginning of the list of locators used to search for schemas.\n * This schema locator will be prioritized over other locators when searching for schemas in the current context.\n * @param locater Locater to add to the current context\n * @internal\n */\n public setFirstSchemaLocater(locater: IModelJsNative.ECSchemaXmlContext.SchemaLocaterCallback): void {\n this.nativeContext.setFirstSchemaLocater(locater);\n }\n\n /** Deserialize a [Schema]($ecschema-metadata) from an ECSchemaXML-formatted file.\n * @param filePath The absolute path of the XML file.\n * @returns The JSON representation of the schema, as a [SchemaProps]($ecschema-metadata).\n * @throws [[IModelError]] if there is a problem reading schema from the XML file\n */\n public readSchemaFromXmlFile(filePath: string): any {\n const response = this.nativeContext.readSchemaFromXmlFile(filePath);\n if (response.error) {\n throw new IModelError(response.error.status, response.error.message);\n }\n\n assert(undefined !== response.result);\n return JSON.parse(response.result);\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ECSqlStatement.js","sourceRoot":"","sources":["../../src/ECSqlStatement.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA+E;AAC/E,wDAAkF;AAClF,oDAA0J;AAG1J,8DAAyD;AAEzD;;;;;;;;;GASG;AACH,MAAa,iBAAiB;IACF;IAAyB;IAAnD,YAA0B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;QAC3E,CAAC,CAAC,CAAC;IACP,CAAC;CACF;AAED,MAAM,eAAe;IACZ,MAAM,CAAC,MAAM,CAAC,GAAQ,IAAuB,OAAO,GAAG,YAAY,UAAU,CAAC,CAAC,CAAC;IAEhF,MAAM,CAAC,OAAO,CAAC,GAAQ,IAAkB,OAAO,mBAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACnE,MAAM,CAAC,QAAQ,CAAC,GAAQ,IAAmB,OAAO,mBAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACtE,MAAM,CAAC,eAAe,CAAC,GAAQ,IAA0B,OAAO,GAAG,CAAC,GAAG,KAAK,SAAS,IAAI,eAAe,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,IAAI,KAAK,SAAS,IAAI,eAAe,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAE7L,MAAM,CAAC,wBAAwB,CAAC,GAAQ,IAAmC,OAAO,GAAG,CAAC,EAAE,KAAK,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC;CACjJ","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ECSQL\r\n */\r\n\r\nimport { assert, DbResult, GuidString, Id64String } from \"@itwin/core-bentley\";\r\nimport { LowAndHighXYZ, Range3d, XAndY, XYAndZ, XYZ } from \"@itwin/core-geometry\";\r\nimport { ECJsNames, ECSqlValueType, IModelError, NavigationBindingValue, NavigationValue, PropertyMetaDataMap, QueryRowFormat } from \"@itwin/core-common\";\r\nimport { IModelJsNative } from \"@bentley/imodeljs-native\";\r\nimport { ECDb } from \"./ECDb\";\r\nimport { IModelNative } from \"./internal/NativePlatform\";\r\n\r\n/** The result of an **ECSQL INSERT** statement as returned from [ECSqlStatement.stepForInsert]($backend).\r\n *\r\n * If the step was successful, the ECSqlInsertResult contains\r\n * [DbResult.BE_SQLITE_DONE]($core-bentley)\r\n * and the ECInstanceId of the newly created instance.\r\n * In case of failure it contains the [DbResult]($core-bentley) error code.\r\n *\r\n * > Insert statements can be used with ECDb only, not with IModelDb.\r\n * @public\r\n */\r\nexport class ECSqlInsertResult {\r\n public constructor(public status: DbResult, public id?: Id64String) { }\r\n}\r\n\r\n/**\r\n * Arguments supplied to [[ECSqlStatement.getRow]].\r\n * @public\r\n * */\r\nexport interface ECSqlRowArg {\r\n /** Determine row format. */\r\n rowFormat?: QueryRowFormat;\r\n /**\r\n * Determine if classIds are converted to class names.\r\n */\r\n classIdsToClassNames?: boolean;\r\n}\r\n\r\n/** Executes ECSQL statements.\r\n *\r\n * A statement must be prepared before it can be executed, and it must be released when no longer needed.\r\n * See [IModelDb.withPreparedStatement]($backend) or\r\n * [ECDb.withPreparedStatement]($backend) for a convenient and\r\n * reliable way to prepare, execute, and then release a statement.\r\n *\r\n * A statement may contain parameters that must be filled in before use by the **bind** methods.\r\n *\r\n * Once prepared (and parameters are bound, if any), the statement is executed by calling [ECSqlStatement.step]($backend).\r\n * In case of an **ECSQL SELECT** statement, the current row can be retrieved with [ECSqlStatement.getRow]($backend) as\r\n * a whole, or with [ECSqlStatement.getValue]($backend) when individual values are needed.\r\n * Alternatively, query results of an **ECSQL SELECT** statement can be stepped through by using\r\n * standard iteration syntax, such as `for of`.\r\n *\r\n * > Preparing a statement can be time-consuming. The best way to reduce the effect of this overhead is to cache and reuse prepared\r\n * > statements. A cached prepared statement may be used in different places in an app, as long as the statement is general enough.\r\n * > The key to making this strategy work is to phrase a statement in a general way and use placeholders to represent parameters that will vary on each use.\r\n *\r\n * See also\r\n * - [Executing ECSQL]($docs/learning/backend/ExecutingECSQL) provides more background on ECSQL and an introduction on how to execute ECSQL with the iTwin.js API.\r\n * - [Code Examples]($docs/learning/backend/ECSQLCodeExamples) illustrate the use of the iTwin.js API for executing and working with ECSQL\r\n * @public\r\n * @deprecated in 4.11 - will not be removed until after 2026-06-13. Use [IModelDb.createQueryReader]($backend) or [ECDb.createQueryReader]($backend) to query.\r\n * For ECDb, use [ECDb.withCachedWriteStatement]($backend) or [ECDb.withWriteStatement]($backend) to Insert/Update/Delete.\r\n */\r\nexport class ECSqlStatement implements IterableIterator<any>, Disposable {\r\n private _stmt: IModelJsNative.ECSqlStatement | undefined;\r\n private _sql: string | undefined;\r\n private _props = new PropertyMetaDataMap([]);\r\n\r\n public get sql() { return this._sql!; } // eslint-disable-line @typescript-eslint/no-non-null-assertion\r\n\r\n /** Check if this statement has been prepared successfully or not */\r\n public get isPrepared(): boolean { return !!this._stmt; }\r\n\r\n /** Prepare this statement prior to first use.\r\n * @param db The DgnDb or ECDb to prepare the statement against\r\n * @param ecsql The ECSQL statement string to prepare\r\n * @param logErrors Determine if errors are logged or not\r\n * @throws [IModelError]($common) if the ECSQL statement cannot be prepared. Normally, prepare fails due to ECSQL syntax errors or references to tables or properties that do not exist.\r\n * The error.message property will provide details.\r\n * @internal\r\n */\r\n public prepare(db: IModelJsNative.DgnDb | IModelJsNative.ECDb, ecsql: string, logErrors = true): void {\r\n const stat = this.tryPrepare(db, ecsql, logErrors);\r\n if (stat.status !== DbResult.BE_SQLITE_OK) {\r\n throw new IModelError(stat.status, stat.message);\r\n }\r\n }\r\n\r\n /** Prepare this statement prior to first use.\r\n * @param db The DgnDb or ECDb to prepare the statement against\r\n * @param ecsql The ECSQL statement string to prepare\r\n * @param logErrors Determine if errors are logged or not, its set to false by default for tryPrepare()\r\n * @returns An object with a `status` member equal to [DbResult.BE_SQLITE_OK]($bentley) on success. Upon error, the `message` member will provide details.\r\n * @internal\r\n */\r\n public tryPrepare(db: IModelJsNative.DgnDb | IModelJsNative.ECDb, ecsql: string, logErrors = false): { status: DbResult, message: string } {\r\n if (this.isPrepared)\r\n throw new Error(\"ECSqlStatement is already prepared\");\r\n this._sql = ecsql;\r\n this._stmt = new IModelNative.platform.ECSqlStatement();\r\n return this._stmt.prepare(db, ecsql, logErrors);\r\n }\r\n\r\n /** Reset this statement so that the next call to step will return the first row, if any. */\r\n public reset(): void {\r\n assert(undefined !== this._stmt);\r\n this._stmt.reset();\r\n this._props = new PropertyMetaDataMap([]);\r\n }\r\n\r\n /** Get the Native SQL statement\r\n * @internal\r\n */\r\n public getNativeSql(): string {\r\n assert(undefined !== this._stmt);\r\n return this._stmt.getNativeSql();\r\n }\r\n\r\n /** Call this function when finished with this statement. This releases the native resources held by the statement.\r\n *\r\n * > Do not call this method directly on a statement that is being managed by a statement cache.\r\n */\r\n public [Symbol.dispose](): void {\r\n if (this._stmt) {\r\n this._stmt.dispose(); // free native statement\r\n this._stmt = undefined;\r\n }\r\n }\r\n\r\n /** @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [Symbol.dispose] instead. */\r\n public dispose(): void {\r\n this[Symbol.dispose]();\r\n }\r\n\r\n /** Binds the specified value to the specified ECSQL parameter.\r\n * The section \"[iTwin.js Types used in ECSQL Parameter Bindings]($docs/learning/ECSQLParameterTypes)\" describes the\r\n * iTwin.js types to be used for the different ECSQL parameter types.\r\n * @param parameter Index (1-based) or name of the parameter\r\n */\r\n public bindValue(parameter: number | string, val: any): void { this.getBinder(parameter).bind(val); }\r\n\r\n /** Binds null to the specified ECSQL parameter.\r\n * @param parameter Index (1-based) or name of the parameter\r\n */\r\n public bindNull(parameter: number | string): void { this.getBinder(parameter).bindNull(); }\r\n\r\n /** Binds a BLOB value to the specified ECSQL parameter.\r\n * @param parameter Index (1-based) or name of the parameter\r\n * @param BLOB value as either a Uint8Array, ArrayBuffer or a Base64 string\r\n */\r\n public bindBlob(parameter: number | string, blob: string | Uint8Array | ArrayBuffer | SharedArrayBuffer): void { this.getBinder(parameter).bindBlob(blob); }\r\n\r\n /** Binds a boolean value to the specified ECSQL parameter.\r\n * @param parameter Index (1-based) or name of the parameter\r\n * @param val Boolean value\r\n */\r\n public bindBoolean(parameter: number | string, val: boolean): void { this.getBinder(parameter).bindBoolean(val); }\r\n\r\n /** Binds a DateTime value to the specified ECSQL parameter.\r\n * @param parameter Index (1-based) or name of the parameter\r\n * @param isoDateTimeString DateTime value as ISO8601 string\r\n */\r\n public bindDateTime(parameter: number | string, isoDateTimeString: string): void { this.getBinder(parameter).bindDateTime(isoDateTimeString); }\r\n\r\n /** Binds a double value to the specified ECSQL parameter.\r\n * @param parameter Index (1-based) or name of the parameter\r\n * @param val Double value\r\n */\r\n public bindDouble(parameter: number | string, val: number): void { this.getBinder(parameter).bindDouble(val); }\r\n\r\n /** Binds an GUID value to the specified ECSQL parameter.\r\n * @param parameter Index (1-based) or name of the parameter\r\n * @param val GUID value\r\n */\r\n public bindGuid(parameter: number | string, val: GuidString): void { this.getBinder(parameter).bindGuid(val); }\r\n\r\n /** Binds an Id value to the specified ECSQL parameter.\r\n * @param parameter Index (1-based) or name of the parameter\r\n * @param val Id value\r\n */\r\n public bindId(parameter: number | string, val: Id64String): void { this.getBinder(parameter).bindId(val); }\r\n\r\n /** Binds an integer value to the specified ECSQL parameter.\r\n * @param parameter Index (1-based) or name of the parameter\r\n * @param val Integer value as number, decimal string or hexadecimal string.\r\n */\r\n public bindInteger(parameter: number | string, val: number | string): void { this.getBinder(parameter).bindInteger(val); }\r\n\r\n /** Binds an Point2d value to the specified ECSQL parameter.\r\n * @param parameter Index (1-based) or name of the parameter\r\n * @param val Point2d value\r\n */\r\n public bindPoint2d(parameter: number | string, val: XAndY): void { this.getBinder(parameter).bindPoint2d(val); }\r\n\r\n /** Binds an Point3d value to the specified ECSQL parameter.\r\n * @param parameter Index (1-based) or name of the parameter\r\n * @param val Point3d value\r\n */\r\n public bindPoint3d(parameter: number | string, val: XYAndZ): void { this.getBinder(parameter).bindPoint3d(val); }\r\n\r\n /** Binds a Range3d as a blob to the specified ECSQL parameter\r\n * @param parameter Index(1-based) or name of the parameter\r\n * @param val Range3d value\r\n */\r\n public bindRange3d(parameter: number | string, val: LowAndHighXYZ): void { this.getBinder(parameter).bindRange3d(val); }\r\n\r\n /** Binds an string to the specified ECSQL parameter.\r\n * @param parameter Index (1-based) or name of the parameter\r\n * @param val String value\r\n */\r\n public bindString(parameter: number | string, val: string): void { this.getBinder(parameter).bindString(val); }\r\n\r\n /** Binds a navigation property value to the specified ECSQL parameter.\r\n * @param parameter Index (1-based) or name of the parameter\r\n * @param val Navigation property value\r\n */\r\n public bindNavigation(parameter: number | string, val: NavigationBindingValue): void { this.getBinder(parameter).bindNavigation(val); }\r\n\r\n /** Binds a struct property value to the specified ECSQL parameter.\r\n * @param parameter Index (1-based) or name of the parameter\r\n * @param val Struct value. The struct value is an object composed of pairs of a struct member property name and its value\r\n * (of one of the supported types)\r\n */\r\n public bindStruct(parameter: number | string, val: object): void { this.getBinder(parameter).bindStruct(val); }\r\n\r\n /** Binds an array value to the specified ECSQL parameter.\r\n * @param parameter Index (1-based) or name of the parameter\r\n * @param val Array value. The array value is an array of values of the supported types\r\n */\r\n public bindArray(parameter: number | string, val: any[]): void { this.getBinder(parameter).bindArray(val); }\r\n\r\n public bindIdSet(parameter: number | string, val: Id64String[]): void { this.getBinder(parameter).bindIdSet(val); }\r\n /**\r\n * Gets a binder to bind a value for an ECSQL parameter\r\n * > This is the most low-level API to bind a value to a specific parameter. Alternatively you can use the ECSqlStatement.bindXX methods\r\n * > or [ECSqlStatement.bindValues]($backend).\r\n * @param parameter Index (1-based) or name of the parameter\r\n */\r\n public getBinder(parameter: string | number): ECSqlBinder {\r\n assert(undefined !== this._stmt);\r\n return new ECSqlBinder(this._stmt.getBinder(parameter));\r\n }\r\n\r\n /** Bind values to all parameters in the statement.\r\n * @param values The values to bind to the parameters.\r\n * Pass an *array* of values if the parameters are *positional*.\r\n * Pass an *object of the values keyed on the parameter name* for *named parameters*.\r\n * The values in either the array or object must match the respective types of the parameter.\r\n *\r\n * The section \"[iTwin.js Types used in ECSQL Parameter Bindings]($docs/learning/ECSQLParameterTypes)\" describes the\r\n * iTwin.js types to be used for the different ECSQL parameter types.\r\n *\r\n * See also these [Code Samples]($docs/learning/backend/ECSQLCodeExamples#binding-to-all-parameters-at-once)\r\n */\r\n public bindValues(values: any[] | object): void {\r\n if (Array.isArray(values)) {\r\n for (let i = 0; i < values.length; i++) {\r\n const paramIndex: number = i + 1;\r\n const paramValue: any = values[i];\r\n if (paramValue === undefined || paramValue === null)\r\n continue;\r\n\r\n this.bindValue(paramIndex, paramValue);\r\n }\r\n return;\r\n }\r\n\r\n for (const entry of Object.entries(values)) {\r\n const paramName: string = entry[0];\r\n const paramValue: any = entry[1];\r\n if (paramValue === undefined || paramValue === null)\r\n continue;\r\n\r\n this.bindValue(paramName, paramValue);\r\n }\r\n }\r\n\r\n /** Clear any bindings that were previously set on this statement.\r\n * @throws [IModelError]($common) in case of errors\r\n */\r\n public clearBindings(): void {\r\n if (this._stmt) {\r\n const stat: DbResult = this._stmt.clearBindings();\r\n if (stat !== DbResult.BE_SQLITE_OK)\r\n throw new IModelError(stat, \"Error clearing bindings\");\r\n }\r\n }\r\n\r\n /** Step this statement to the next row.\r\n *\r\n * For **ECSQL SELECT** statements the method returns\r\n * - [DbResult.BE_SQLITE_ROW]($core-bentley) if the statement now points successfully to the next row.\r\n * - [DbResult.BE_SQLITE_DONE]($core-bentley) if the statement has no more rows.\r\n * - Error status in case of errors.\r\n *\r\n * For **ECSQL INSERT, UPDATE, DELETE** statements the method returns\r\n * - [DbResult.BE_SQLITE_DONE]($core-bentley) if the statement has been executed successfully.\r\n * - Error status in case of errors.\r\n *\r\n * > Insert statements can be used with ECDb only, not with IModelDb.\r\n *\r\n * See also: [Code Samples]($docs/learning/backend/ECSQLCodeExamples)\r\n */\r\n public step(): DbResult { return this._stmt!.step(); } // eslint-disable-line @typescript-eslint/no-non-null-assertion\r\n\r\n /** @internal added this back in for testing purposes */\r\n public async stepAsync(): Promise<DbResult> {\r\n return new Promise((resolve, _reject) => {\r\n this._stmt!.stepAsync(resolve); // eslint-disable-line @typescript-eslint/no-non-null-assertion\r\n });\r\n }\r\n\r\n /** Step this INSERT statement and returns status and the ECInstanceId of the newly\r\n * created instance.\r\n *\r\n * > Insert statements can be used with ECDb only, not with IModelDb.\r\n *\r\n * @returns Returns the generated ECInstanceId in case of success and the status of the step\r\n * call. In case of error, the respective error code is returned.\r\n */\r\n public stepForInsert(): ECSqlInsertResult {\r\n assert(undefined !== this._stmt);\r\n const r: { status: DbResult, id: string } = this._stmt.stepForInsert();\r\n if (r.status === DbResult.BE_SQLITE_DONE)\r\n return new ECSqlInsertResult(r.status, r.id);\r\n\r\n return new ECSqlInsertResult(r.status);\r\n }\r\n\r\n /** Get the query result's column count (only for ECSQL SELECT statements). */\r\n public getColumnCount(): number { return this._stmt!.getColumnCount(); } // eslint-disable-line @typescript-eslint/no-non-null-assertion\r\n\r\n /** Get the current row.\r\n * The returned row is formatted as JavaScript object where every SELECT clause item becomes a property in the JavaScript object.\r\n *\r\n * See also:\r\n * - [ECSQL row format]($docs/learning/ECSQLRowFormat) for details about the format of the returned row.\r\n * - [Code Samples]($docs/learning/backend/ECSQLCodeExamples#working-with-the-query-result)\r\n */\r\n public getRow(args?: ECSqlRowArg): any {\r\n if (!this._stmt)\r\n throw new Error(\"ECSqlStatement is not prepared\");\r\n\r\n args = args ?? {};\r\n if (args.rowFormat === undefined) {\r\n args.rowFormat = QueryRowFormat.UseJsPropertyNames;\r\n }\r\n const resp = this._stmt.toRow({\r\n classIdsToClassNames: args.classIdsToClassNames,\r\n useJsName: args.rowFormat === QueryRowFormat.UseJsPropertyNames,\r\n abbreviateBlobs: false,\r\n // In 4.x, people are currently dependent on the behavior of aliased classIds `select classId as aliasedClassId` not being\r\n // converted into classNames which is a bug that we must now support.This option preserves this special behavior until\r\n // it can be removed in a future version.\r\n doNotConvertClassIdsToClassNamesWhenAliased: true,\r\n });\r\n return this.formatCurrentRow(resp, args.rowFormat);\r\n }\r\n\r\n private formatCurrentRow(currentResp: any, rowFormat: QueryRowFormat = QueryRowFormat.UseJsPropertyNames): any[] | object {\r\n if (!this._stmt)\r\n throw new Error(\"ECSqlStatement is not prepared\");\r\n\r\n if (rowFormat === QueryRowFormat.UseECSqlPropertyIndexes)\r\n return currentResp.data;\r\n\r\n if (this._props.length === 0) {\r\n const resp = this._stmt.getMetadata();\r\n this._props = new PropertyMetaDataMap(resp.meta);\r\n }\r\n const formattedRow = {};\r\n for (const prop of this._props) {\r\n const propName = rowFormat === QueryRowFormat.UseJsPropertyNames ? prop.jsonName : prop.name;\r\n const val = currentResp.data[prop.index];\r\n if (typeof val !== \"undefined\" && val !== null) {\r\n Object.defineProperty(formattedRow, propName, {\r\n value: val,\r\n enumerable: true,\r\n writable: true,\r\n });\r\n }\r\n }\r\n return formattedRow;\r\n }\r\n\r\n /** Calls step when called as an iterator.\r\n *\r\n * Each iteration returns an [ECSQL row format]($docs/learning/ECSQLRowFormat) as returned\r\n * from [ECSqlStatement.getRow]($backend).\r\n */\r\n public next(): IteratorResult<any> {\r\n if (DbResult.BE_SQLITE_ROW === this.step()) {\r\n return {\r\n done: false,\r\n value: this.getRow(),\r\n };\r\n } else {\r\n return {\r\n done: true,\r\n value: undefined,\r\n };\r\n }\r\n }\r\n\r\n /** The iterator that will step through the results of this statement. */\r\n public [Symbol.iterator](): IterableIterator<any> { return this; }\r\n\r\n /** Get the value for the column at the given index in the query result.\r\n * @param columnIx Index of ECSQL column in query result (0-based)\r\n *\r\n * See also: [Code Samples]($docs/learning/backend/ECSQLCodeExamples#working-with-the-query-result)\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n public getValue(columnIx: number): ECSqlValue {\r\n assert(undefined !== this._stmt);\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n return new ECSqlValue(this._stmt.getValue(columnIx));\r\n }\r\n}\r\n\r\n/** Executes ECSQL INSERT/UPDATE/DELETE statements.\r\n *\r\n * A statement must be prepared before it can be executed, and it must be released when no longer needed.\r\n * See [ECDb.withCachedWriteStatement]($backend) for a convenient and\r\n * reliable way to prepare, execute, and then release a statement.\r\n *\r\n * A statement may contain parameters that must be filled in before use by the **bind** methods.\r\n *\r\n * Once prepared (and parameters are bound, if any), the statement is executed by calling [ECSqlStatement.stepForInsert]($backend).\r\n *\r\n * > Preparing a statement can be time-consuming. The best way to reduce the effect of this overhead is to cache and reuse prepared\r\n * > statements. A cached prepared statement may be used in different places in an app, as long as the statement is general enough.\r\n * > The key to making this strategy work is to phrase a statement in a general way and use placeholders to represent parameters that will vary on each use.\r\n *\r\n * See also\r\n * - [Executing ECSQL]($docs/learning/backend/ExecutingECSQL) provides more background on ECSQL and an introduction on how to execute ECSQL with the iTwin.js API.\r\n * - [Code Examples]($docs/learning/backend/ECSQLCodeExamples) illustrate the use of the iTwin.js API for executing and working with ECSQL\r\n * @public\r\n */\r\nexport class ECSqlWriteStatement {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n private _stmt: ECSqlStatement;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n public constructor(stmt?: ECSqlStatement) {\r\n if (stmt)\r\n this._stmt = stmt;\r\n else {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n this._stmt = new ECSqlStatement();\r\n }\r\n }\r\n\r\n public get sql() { return this._stmt.sql; }\r\n\r\n /** Check if this statement has been prepared successfully or not */\r\n public get isPrepared(): boolean { return this._stmt.isPrepared; }\r\n\r\n /** Get the underlying ECSqlStatement. Needed until we remove ECSqlStatement.\r\n * @param\r\n * @internal\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n public get stmt(): ECSqlStatement { return this._stmt; }\r\n\r\n /** Prepare this statement prior to first use.\r\n * @param db The ECDb to prepare the statement against\r\n * @param ecsql The ECSQL statement string to prepare\r\n * @param logErrors Determine if errors are logged or not\r\n * @throws [IModelError]($common) if the ECSQL statement cannot be prepared. Normally, prepare fails due to ECSQL syntax errors or references to tables or properties that do not exist.\r\n * The error.message property will provide details.\r\n * @internal\r\n */\r\n public prepare(db: IModelJsNative.ECDb, ecsql: string, logErrors = true): void {\r\n this._stmt.prepare(db, ecsql, logErrors);\r\n }\r\n\r\n /** Prepare this statement prior to first use.\r\n * @param db The DgnDb or ECDb to prepare the statement against\r\n * @param ecsql The ECSQL statement string to prepare\r\n * @param logErrors Determine if errors are logged or not, its set to false by default for tryPrepare()\r\n * @returns An object with a `status` member equal to [DbResult.BE_SQLITE_OK]($bentley) on success. Upon error, the `message` member will provide details.\r\n * @internal\r\n */\r\n public tryPrepare(db: IModelJsNative.DgnDb | IModelJsNative.ECDb, ecsql: string, logErrors = false): { status: DbResult, message: string } {\r\n return this.tryPrepare(db, ecsql, logErrors);\r\n }\r\n\r\n /** Reset this statement so that the next call to step will return the first row, if any. */\r\n public reset(): void {\r\n this._stmt.reset();\r\n }\r\n\r\n /**\r\n * Releases the native resources held by this ECSqlWriteStatement.\r\n *\r\n * This method should be called when the statement is no longer needed to free up native resources.\r\n *\r\n * > Do not call this method directly on a statement that is being managed by a statement cache.\r\n */\r\n public [Symbol.dispose](): void {\r\n if (this._stmt)\r\n this._stmt[Symbol.dispose]();\r\n }\r\n\r\n /** Get the Native SQL statement\r\n * @internal\r\n */\r\n public getNativeSql(): string {\r\n return this._stmt.getNativeSql();\r\n }\r\n\r\n /** Binds the specified value to the specified ECSQL parameter.\r\n * The section \"[iTwin.js Types used in ECSQL Parameter Bindings]($docs/learning/ECSQLParameterTypes)\" describes the\r\n * iTwin.js types to be used for the different ECSQL parameter types.\r\n * @param parameter Index (1-based) or name of the parameter\r\n */\r\n public bindValue(parameter: number | string, val: any): void { this.getBinder(parameter).bind(val); }\r\n\r\n /** Binds null to the specified ECSQL parameter.\r\n * @param parameter Index (1-based) or name of the parameter\r\n */\r\n public bindNull(parameter: number | string): void { this.getBinder(parameter).bindNull(); }\r\n\r\n /** Binds a BLOB value to the specified ECSQL parameter.\r\n * @param parameter Index (1-based) or name of the parameter\r\n * @param BLOB value as either a Uint8Array, ArrayBuffer or a Base64 string\r\n */\r\n public bindBlob(parameter: number | string, blob: string | Uint8Array | ArrayBuffer | SharedArrayBuffer): void { this.getBinder(parameter).bindBlob(blob); }\r\n\r\n /** Binds a boolean value to the specified ECSQL parameter.\r\n * @param parameter Index (1-based) or name of the parameter\r\n * @param val Boolean value\r\n */\r\n public bindBoolean(parameter: number | string, val: boolean): void { this.getBinder(parameter).bindBoolean(val); }\r\n\r\n /** Binds a DateTime value to the specified ECSQL parameter.\r\n * @param parameter Index (1-based) or name of the parameter\r\n * @param isoDateTimeString DateTime value as ISO8601 string\r\n */\r\n public bindDateTime(parameter: number | string, isoDateTimeString: string): void { this.getBinder(parameter).bindDateTime(isoDateTimeString); }\r\n\r\n /** Binds a double value to the specified ECSQL parameter.\r\n * @param parameter Index (1-based) or name of the parameter\r\n * @param val Double value\r\n */\r\n public bindDouble(parameter: number | string, val: number): void { this.getBinder(parameter).bindDouble(val); }\r\n\r\n /** Binds an GUID value to the specified ECSQL parameter.\r\n * @param parameter Index (1-based) or name of the parameter\r\n * @param val GUID value\r\n */\r\n public bindGuid(parameter: number | string, val: GuidString): void { this.getBinder(parameter).bindGuid(val); }\r\n\r\n /** Binds an Id value to the specified ECSQL parameter.\r\n * @param parameter Index (1-based) or name of the parameter\r\n * @param val Id value\r\n */\r\n public bindId(parameter: number | string, val: Id64String): void { this.getBinder(parameter).bindId(val); }\r\n\r\n /** Binds an integer value to the specified ECSQL parameter.\r\n * @param parameter Index (1-based) or name of the parameter\r\n * @param val Integer value as number, decimal string or hexadecimal string.\r\n */\r\n public bindInteger(parameter: number | string, val: number | string): void { this.getBinder(parameter).bindInteger(val); }\r\n\r\n /** Binds an Point2d value to the specified ECSQL parameter.\r\n * @param parameter Index (1-based) or name of the parameter\r\n * @param val Point2d value\r\n */\r\n public bindPoint2d(parameter: number | string, val: XAndY): void { this.getBinder(parameter).bindPoint2d(val); }\r\n\r\n /** Binds an Point3d value to the specified ECSQL parameter.\r\n * @param parameter Index (1-based) or name of the parameter\r\n * @param val Point3d value\r\n */\r\n public bindPoint3d(parameter: number | string, val: XYAndZ): void { this.getBinder(parameter).bindPoint3d(val); }\r\n\r\n /** Binds a Range3d as a blob to the specified ECSQL parameter\r\n * @param parameter Index(1-based) or name of the parameter\r\n * @param val Range3d value\r\n */\r\n public bindRange3d(parameter: number | string, val: LowAndHighXYZ): void { this.getBinder(parameter).bindRange3d(val); }\r\n\r\n /** Binds an string to the specified ECSQL parameter.\r\n * @param parameter Index (1-based) or name of the parameter\r\n * @param val String value\r\n */\r\n public bindString(parameter: number | string, val: string): void { this.getBinder(parameter).bindString(val); }\r\n\r\n /** Binds a navigation property value to the specified ECSQL parameter.\r\n * @param parameter Index (1-based) or name of the parameter\r\n * @param val Navigation property value\r\n */\r\n public bindNavigation(parameter: number | string, val: NavigationBindingValue): void { this.getBinder(parameter).bindNavigation(val); }\r\n\r\n /** Binds a struct property value to the specified ECSQL parameter.\r\n * @param parameter Index (1-based) or name of the parameter\r\n * @param val Struct value. The struct value is an object composed of pairs of a struct member property name and its value\r\n * (of one of the supported types)\r\n */\r\n public bindStruct(parameter: number | string, val: object): void { this.getBinder(parameter).bindStruct(val); }\r\n\r\n /** Binds an array value to the specified ECSQL parameter.\r\n * @param parameter Index (1-based) or name of the parameter\r\n * @param val Array value. The array value is an array of values of the supported types\r\n */\r\n public bindArray(parameter: number | string, val: any[]): void { this.getBinder(parameter).bindArray(val); }\r\n\r\n public bindIdSet(parameter: number | string, val: Id64String[]): void { this.getBinder(parameter).bindIdSet(val); }\r\n /**\r\n * Gets a binder to bind a value for an ECSQL parameter\r\n * > This is the most low-level API to bind a value to a specific parameter. Alternatively you can use the ECSqlStatement.bindXX methods\r\n * > or [ECSqlStatement.bindValues]($backend).\r\n * @param parameter Index (1-based) or name of the parameter\r\n */\r\n public getBinder(parameter: string | number): ECSqlBinder {\r\n return this._stmt.getBinder(parameter);\r\n }\r\n\r\n /** Bind values to all parameters in the statement.\r\n * @param values The values to bind to the parameters.\r\n * Pass an *array* of values if the parameters are *positional*.\r\n * Pass an *object of the values keyed on the parameter name* for *named parameters*.\r\n * The values in either the array or object must match the respective types of the parameter.\r\n *\r\n * The section \"[iTwin.js Types used in ECSQL Parameter Bindings]($docs/learning/ECSQLParameterTypes)\" describes the\r\n * iTwin.js types to be used for the different ECSQL parameter types.\r\n *\r\n * See also these [Code Samples]($docs/learning/backend/ECSQLCodeExamples#binding-to-all-parameters-at-once)\r\n */\r\n public bindValues(values: any[] | object): void {\r\n this._stmt.bindValues(values);\r\n }\r\n\r\n /** Clear any bindings that were previously set on this statement.\r\n * @throws [IModelError]($common) in case of errors\r\n */\r\n public clearBindings(): void {\r\n this._stmt.clearBindings();\r\n }\r\n\r\n /** Step this INSERT statement and returns status and the ECInstanceId of the newly\r\n * created instance.\r\n *\r\n * > Insert statements can be used with ECDb only, not with IModelDb.\r\n *\r\n * @returns Returns the generated ECInstanceId in case of success and the status of the step\r\n * call. In case of error, the respective error code is returned.\r\n */\r\n public stepForInsert(): ECSqlInsertResult {\r\n return this._stmt.stepForInsert();\r\n }\r\n\r\n public step(): DbResult {\r\n return this._stmt.step();\r\n }\r\n\r\n /** Get the query result's column count (only for ECSQL SELECT statements). */\r\n public getColumnCount(): number { return this._stmt.getColumnCount(); }\r\n}\r\n\r\n/** Binds a value to an ECSQL parameter.\r\n *\r\n * See also:\r\n *\r\n * - [ECSqlStatement]($backend)\r\n * - [ECSqlStatement.getBinder]($backend)\r\n * - [Executing ECSQL]($docs/learning/backend/ExecutingECSQL)\r\n * @public\r\n */\r\nexport class ECSqlBinder {\r\n private _binder: IModelJsNative.ECSqlBinder;\r\n\r\n /** @internal */\r\n public constructor(binder: IModelJsNative.ECSqlBinder) { this._binder = binder; }\r\n\r\n /** Binds the specified value to the ECSQL parameter.\r\n * The section \"[iTwin.js Types used in ECSQL Parameter Bindings]($docs/learning/ECSQLParameterTypes)\" describes the\r\n * iTwin.js types to be used for the different ECSQL parameter types.\r\n * @param val Value to bind\r\n */\r\n public bind(val: any): void {\r\n ECSqlBindingHelper.bindValue(this, val);\r\n }\r\n\r\n /** Binds null to the ECSQL parameter. */\r\n public bindNull(): void {\r\n const stat: DbResult = this._binder.bindNull();\r\n if (stat !== DbResult.BE_SQLITE_OK)\r\n throw new IModelError(stat, \"Error binding null\");\r\n }\r\n\r\n /** Binds a BLOB value to the ECSQL parameter.\r\n * @param BLOB value as either a UInt8Array, ArrayBuffer or a Base64 string\r\n */\r\n public bindBlob(blob: string | Uint8Array | ArrayBuffer | SharedArrayBuffer): void {\r\n const stat: DbResult = this._binder.bindBlob(blob);\r\n if (stat !== DbResult.BE_SQLITE_OK)\r\n throw new IModelError(stat, \"Error binding blob\");\r\n }\r\n\r\n /** Binds a boolean value to the ECSQL parameter.\r\n * @param val Boolean value\r\n */\r\n public bindBoolean(val: boolean): void {\r\n const stat: DbResult = this._binder.bindBoolean(val);\r\n if (stat !== DbResult.BE_SQLITE_OK)\r\n throw new IModelError(stat, \"Error binding boolean\");\r\n }\r\n\r\n /** Binds a DateTime value to the ECSQL parameter.\r\n * @param isoDateTimeString DateTime value as ISO8601 string\r\n */\r\n public bindDateTime(isoDateTimeString: string): void {\r\n const stat: DbResult = this._binder.bindDateTime(isoDateTimeString);\r\n if (stat !== DbResult.BE_SQLITE_OK)\r\n throw new IModelError(stat, \"Error binding DateTime\");\r\n }\r\n\r\n /** Binds a double value to the ECSQL parameter.\r\n * @param val Double value\r\n */\r\n public bindDouble(val: number): void {\r\n const stat: DbResult = this._binder.bindDouble(val);\r\n if (stat !== DbResult.BE_SQLITE_OK)\r\n throw new IModelError(stat, \"Error binding double\");\r\n }\r\n\r\n /** Binds an GUID value to the ECSQL parameter.\r\n * @param val GUID value. If passed as string, it must be formatted as described in [GuidString]($core-bentley).\r\n */\r\n public bindGuid(val: GuidString): void {\r\n const stat: DbResult = this._binder.bindGuid(val);\r\n if (stat !== DbResult.BE_SQLITE_OK)\r\n throw new IModelError(stat, \"Error binding GUID\");\r\n }\r\n\r\n /** Binds an Id value to the ECSQL parameter.\r\n * @param val Id value. If passed as string it must be the hexadecimal representation of the Id.\r\n */\r\n public bindId(val: Id64String): void {\r\n const stat: DbResult = this._binder.bindId(val);\r\n if (stat !== DbResult.BE_SQLITE_OK)\r\n throw new IModelError(stat, \"Error binding Id\");\r\n }\r\n\r\n /** Binds an integer value to the ECSQL parameter.\r\n * @param val Integer value as number, decimal string or hexadecimal string.\r\n */\r\n public bindInteger(val: number | string): void {\r\n const stat: DbResult = this._binder.bindInteger(val);\r\n if (stat !== DbResult.BE_SQLITE_OK)\r\n throw new IModelError(stat, \"Error binding integer\");\r\n }\r\n\r\n /** Binds an Point2d value to the ECSQL parameter.\r\n * @param val Point2d value\r\n */\r\n public bindPoint2d(val: XAndY): void {\r\n const stat: DbResult = this._binder.bindPoint2d(val.x, val.y);\r\n if (stat !== DbResult.BE_SQLITE_OK)\r\n throw new IModelError(stat, \"Error binding Point2d\");\r\n }\r\n\r\n /** Binds an Point3d value to the ECSQL parameter.\r\n * @param val Point3d value\r\n */\r\n public bindPoint3d(val: XYAndZ): void {\r\n const stat: DbResult = this._binder.bindPoint3d(val.x, val.y, val.z);\r\n if (stat !== DbResult.BE_SQLITE_OK)\r\n throw new IModelError(stat, \"Error binding Point3d\");\r\n }\r\n\r\n /** Binds a Range3d as a blob to the ECSQL parameter.\r\n * @param val Range3d value\r\n */\r\n public bindRange3d(val: LowAndHighXYZ): void {\r\n const stat: DbResult = this._binder.bindBlob(Range3d.toFloat64Array(val).buffer);\r\n if (stat !== DbResult.BE_SQLITE_OK)\r\n throw new IModelError(stat, \"Error binding Range3d\");\r\n }\r\n\r\n /** Binds an string to the ECSQL parameter.\r\n * @param val String value\r\n */\r\n public bindString(val: string): void {\r\n const stat: DbResult = this._binder.bindString(val);\r\n if (stat !== DbResult.BE_SQLITE_OK)\r\n throw new IModelError(stat, \"Error binding string\");\r\n }\r\n\r\n /** Binds a navigation property value to the ECSQL parameter.\r\n * @param val Navigation property value\r\n */\r\n public bindNavigation(val: NavigationBindingValue): void {\r\n const stat: DbResult = this._binder.bindNavigation(val.id, val.relClassName, val.relClassTableSpace);\r\n if (stat !== DbResult.BE_SQLITE_OK)\r\n throw new IModelError(stat, \"Error binding navigation property\");\r\n }\r\n\r\n /** Binds a struct property value to the ECSQL parameter.\r\n * @param val Struct value. The struct value is an object composed of pairs of a struct member property name and its value\r\n * (of one of the supported types)\r\n */\r\n public bindStruct(val: object): void { ECSqlBindingHelper.bindStruct(this, val); }\r\n\r\n /** Gets the binder for the specified member of a struct parameter\r\n *\r\n * > This is the most low-level way to bind struct parameters with most flexibility. A simpler alternative is\r\n * > to just call [ECSqlBinder.bindStruct]($backend).\r\n */\r\n public bindMember(memberName: string): ECSqlBinder { return new ECSqlBinder(this._binder.bindMember(memberName)); }\r\n\r\n /** Binds a set of Id strings to the ECSQL parameter.\r\n * @param val array of Id values. If passed as string they must be the hexadecimal representation of the Ids.\r\n */\r\n public bindIdSet(vector: Id64String[]): void {\r\n const stat: DbResult = this._binder.bindIdSet(vector);\r\n if (stat !== DbResult.BE_SQLITE_OK)\r\n throw new IModelError(stat, \"Error binding id set\");\r\n }\r\n\r\n /** Binds an array value to the ECSQL parameter.\r\n * @param val Array value. The array value is an array of values of the supported types\r\n */\r\n public bindArray(val: any[]): void { ECSqlBindingHelper.bindArray(this, val); }\r\n\r\n /** Adds a new array element to the array parameter and returns the binder for the new array element\r\n *\r\n * > This is the most low-level way to bind array parameters with most flexibility. A simpler alternative is\r\n * > to just call [ECSqlBinder.bindArray]($backend).\r\n */\r\n public addArrayElement(): ECSqlBinder { return new ECSqlBinder(this._binder.addArrayElement()); }\r\n}\r\n\r\n/** Represents the value of an ECEnumeration.\r\n *\r\n * See also:\r\n * - [[ECSqlValue.getEnum]]\r\n * - [[ECSqlStatement]]\r\n * - [[ECSqlStatement.getValue]]\r\n * - [Code Samples]($docs/learning/backend/ECSQLCodeExamples#working-with-the-query-result)\r\n * @public\r\n * @deprecated in 4.11 - will not be removed until after 2026-06-13. Use [IModelDb.createQueryReader]($backend) or [ECDb.createQueryReader]($backend) instead.\r\n */\r\nexport interface ECEnumValue {\r\n schema: string;\r\n name: string;\r\n key: string;\r\n value: number | string;\r\n}\r\n\r\n/** Value of a column in a row of an ECSQL query result.\r\n *\r\n * See also:\r\n * - [ECSqlStatement]($backend)\r\n * - [ECSqlStatement.getValue]($backend)\r\n * - [Code Samples]($docs/learning/backend/ECSQLCodeExamples#working-with-the-query-result)\r\n * @public\r\n * @deprecated in 4.11 - will not be removed until after 2026-06-13. Use [IModelDb.createQueryReader]($backend) or [ECDb.createQueryReader]($backend) instead.\r\n*/\r\nexport class ECSqlValue {\r\n private _val: IModelJsNative.ECSqlValue;\r\n\r\n /** @internal */\r\n public constructor(val: IModelJsNative.ECSqlValue) { this._val = val; }\r\n\r\n /** Get information about the query result's column this value refers to. */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n public get columnInfo(): ECSqlColumnInfo { return this._val.getColumnInfo() as ECSqlColumnInfo; }\r\n\r\n /** Get the value of this ECSQL value */\r\n public get value(): any { return ECSqlValueHelper.getValue(this); }\r\n\r\n /** Indicates whether the value is NULL or not. */\r\n public get isNull(): boolean { return this._val.isNull(); }\r\n /** Get the value as BLOB */\r\n public getBlob(): Uint8Array { return this._val.getBlob(); }\r\n /** Get the value as a boolean value */\r\n public getBoolean(): boolean { return this._val.getBoolean(); }\r\n /** Get the value as a DateTime value (formatted as ISO8601 string) */\r\n public getDateTime(): string { return this._val.getDateTime(); }\r\n /** Get the value as a double value */\r\n public getDouble(): number { return this._val.getDouble(); }\r\n /** Get the value as a IGeometry value (as ECJSON IGeometry) */\r\n public getGeometry(): any { return JSON.parse(this._val.getGeometry()); }\r\n /** Get the value as a GUID (formatted as GUID string).\r\n * See [GuidString]($core-bentley)\r\n */\r\n public getGuid(): GuidString { return this._val.getGuid(); }\r\n /** Get the value as a Id (formatted as hexadecimal string). */\r\n public getId(): Id64String { return this._val.getId(); }\r\n /** Get the ClassId value formatted as fully qualified class name. */\r\n public getClassNameForClassId(): string { return this._val.getClassNameForClassId(); }\r\n /** Get the value as a integer value */\r\n public getInteger(): number { return this._val.getInt64(); }\r\n /** Get the value as a string value */\r\n public getString(): string { return this._val.getString(); }\r\n /** Get the value as [XAndY]($core-geometry) */\r\n public getXAndY(): XAndY { return this._val.getPoint2d(); }\r\n /** Get the value as [XYAndZ]($core-geometry) */\r\n public getXYAndZ(): XYAndZ { return this._val.getPoint3d(); }\r\n /** Get the value as ECEnumeration value\r\n * Note: This method is optional. Using [[ECSqlValue.getInteger]] for integral enums and\r\n * [[ECSqlValue.getString]] for string enums respectively are the usual way to get\r\n * enum values. This method can be used if the context of the underlying ECEnumeration\r\n * is required.\r\n * The value is broken down into the ECEnumerators that make it up, if the value\r\n * is a combination of ECEnumerators. If the value is not a strict match of an ECEnumerator\r\n * or a combination of them, undefined is returned.\r\n * > Note: You can call [[ECSqlValue.columnInfo.isEnum]] to find out whether\r\n * > this method can be called or not.\r\n * @return ECEnumeration value(s) or undefined if the ECSqlValue does not represent an ECEnumeration.\r\n * or is not a strict match of an ECEnumerator or a combination of them.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n public getEnum(): ECEnumValue[] | undefined { return this._val.getEnum(); }\r\n\r\n /** Get the value as [NavigationValue]($common) */\r\n public getNavigation(): NavigationValue { return this._val.getNavigation(); }\r\n\r\n /** Get an iterator for iterating the struct members of this struct value. */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n public getStructIterator(): ECSqlValueIterator { return new ECSqlValueIterator(this._val.getStructIterator()); }\r\n\r\n /** Get this struct value's content as object literal */\r\n public getStruct(): any { return ECSqlValueHelper.getStruct(this); }\r\n\r\n /** Get an iterator for iterating the array elements of this array value. */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n public getArrayIterator(): ECSqlValueIterator { return new ECSqlValueIterator(this._val.getArrayIterator()); }\r\n\r\n /** Get this array value as JavaScript array */\r\n public getArray(): any[] { return ECSqlValueHelper.getArray(this); }\r\n}\r\n\r\n/** Iterator over members of a struct [ECSqlValue]($backend) or the elements of an array [ECSqlValue]($backend).\r\n * See [ECSqlValue.getStructIterator]($backend) or [ECSqlValue.getArrayIterator]($backend).\r\n * @public\r\n * @deprecated in 4.11 - will not be removed until after 2026-06-13. Use [IModelDb.createQueryReader]($backend) or [ECDb.createQueryReader]($backend) instead.\r\n*/\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nexport class ECSqlValueIterator implements IterableIterator<ECSqlValue> {\r\n private _it: IModelJsNative.ECSqlValueIterator;\r\n\r\n /** @internal */\r\n public constructor(it: IModelJsNative.ECSqlValueIterator) { this._it = it; }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n public next(): IteratorResult<ECSqlValue> {\r\n if (this._it.moveNext()) {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n return { done: false, value: new ECSqlValue(this._it.getCurrent()) };\r\n }\r\n return { done: true, value: undefined };\r\n }\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n public [Symbol.iterator](): IterableIterator<ECSqlValue> { return this; }\r\n}\r\n\r\n/** Information about an ECSQL column in an ECSQL query result.\r\n * See [ECSqlValue.columnInfo]($backend), [ECSqlStatement.getValue]($backend), [ECSqlStatement]($backend)\r\n * @public\r\n * @deprecated in 4.11 - will not be removed until after 2026-06-13. Use [IModelDb.createQueryReader]($backend) or [ECDb.createQueryReader]($backend) instead.\r\n */\r\nexport interface ECSqlColumnInfo {\r\n /** Gets the data type of the column.\r\n */\r\n getType(): ECSqlValueType;\r\n\r\n /** Gets the name of the property backing the column.\r\n * > If this column is backed by a generated property, i.e. it represents ECSQL expression,\r\n * > the access string consists of the name of the generated property. [[ECSqlColumnInfo.getOriginPropertyName]]\r\n * > can be used to obtain the non-aliased name in that case.\r\n */\r\n getPropertyName(): string;\r\n\r\n /** Gets the name of the original property that the column data is from.\r\n * > Other than [[ECSqlColumnInfo.getPropertyName]], this ignores aliases and allows getting the name\r\n * > of the property which is being used for the column. A column may not be backed\r\n * > by a property, in which case this returns undefined.\r\n */\r\n getOriginPropertyName(): string | undefined;\r\n\r\n /** Gets the full access string to the corresponding ECSqlValue starting from the root class.\r\n * > If this column is backed by a generated property, i.e. it represents ECSQL expression,\r\n * > the access string consists of the ECSQL expression.\r\n */\r\n getAccessString(): string;\r\n\r\n /** Indicates whether the column refers to an ECEnumeration property. */\r\n isEnum(): boolean;\r\n\r\n /** Indicates whether the column refers to a system property (e.g. id, className). */\r\n isSystemProperty(): boolean;\r\n\r\n /** Indicates whether the column is backed by a generated property or not. For SELECT clause items that are expressions other\r\n * than simply a reference to an ECProperty, a property is generated containing the expression name.\r\n */\r\n isGeneratedProperty(): boolean;\r\n\r\n /** Gets the table space in which this root class is persisted.\r\n * > For classes in the primary file the table space is MAIN. For classes in attached\r\n * > files, the table space is the name by which the file was attached. For generated properties the table space is empty.\r\n */\r\n getRootClassTableSpace(): string;\r\n\r\n /** Gets the fully qualified name of the ECClass of the top-level ECProperty backing this column. */\r\n getRootClassName(): string;\r\n\r\n /** Gets the class alias of the root class to which the column refers to.\r\n * > Returns an empty string if no class alias was specified in the select clause.\r\n */\r\n getRootClassAlias(): string;\r\n}\r\n\r\nclass ECSqlBindingHelper {\r\n\r\n /** Binds the specified value to the specified binder\r\n * @param binder Parameter Binder to bind to\r\n * @param val Value to be bound. (See [iTwin.js Types used in ECSQL Parameter Bindings]($docs/learning/ECSQLParameterTypes))\r\n * @throws IModelError in case of errors\r\n */\r\n public static bindValue(binder: ECSqlBinder, val: any): void {\r\n // returns false if val is no primitive and returns true if it is primitive and a binding call was done\r\n if (ECSqlBindingHelper.tryBindPrimitiveTypes(binder, val))\r\n return;\r\n\r\n if (Array.isArray(val)) {\r\n ECSqlBindingHelper.bindArray(binder, val);\r\n return;\r\n }\r\n\r\n if (typeof (val) === \"object\") {\r\n ECSqlBindingHelper.bindStruct(binder, val);\r\n return;\r\n }\r\n\r\n throw new Error(`Bound value is of an unsupported type: ${val}`);\r\n }\r\n\r\n /** Binds the specified primitive value to the specified binder\r\n * @param binder Parameter Binder to bind to\r\n * @param val Primitive value to be bound. Must be of one of these types described here:\r\n * [ECSQL Binding types]($docs/learning/ECSQLParameterTypes)\r\n * @throws IModelError in case of errors\r\n */\r\n public static bindPrimitive(binder: ECSqlBinder, val: any): void {\r\n if (!ECSqlBindingHelper.tryBindPrimitiveTypes(binder, val))\r\n throw new IModelError(DbResult.BE_SQLITE_ERROR, `Binding value is of an unsupported primitive type: ${val}`);\r\n }\r\n\r\n /** Binds the specified object to the specified struct binder\r\n * @param binder Struct parameter binder to bind to\r\n * @param val Value to be bound. Must be an Object with members of the supported types\r\n * @throws IModelError in case of errors\r\n */\r\n public static bindStruct(binder: ECSqlBinder, val: object): void {\r\n if (val === null || val === undefined) {\r\n binder.bindNull();\r\n return;\r\n }\r\n\r\n for (const member of Object.entries(val)) {\r\n const memberName: string = member[0];\r\n const memberVal: any = member[1];\r\n ECSqlBindingHelper.bindValue(binder.bindMember(memberName), memberVal);\r\n }\r\n }\r\n\r\n /** Binds the specified array to the specified array binder\r\n * @param binder Array parameter binder to bind to\r\n * @param val Value to be bound. Must be an Array with elements of the supported types\r\n * @throws IModelError in case of errors\r\n */\r\n public static bindArray(binder: ECSqlBinder, val: any[]): void {\r\n if (val === null || val === undefined) {\r\n binder.bindNull();\r\n return;\r\n }\r\n\r\n for (const element of val) {\r\n ECSqlBindingHelper.bindValue(binder.addArrayElement(), element);\r\n }\r\n }\r\n\r\n /** tries to interpret the passed value as known leaf types (primitives and navigation values).\r\n * @returns Returns undefined if the value wasn't a primitive. DbResult if it was a primitive and was bound to the binder\r\n */\r\n private static tryBindPrimitiveTypes(binder: ECSqlBinder, val: any): boolean {\r\n if (val === undefined || val === null) {\r\n binder.bindNull();\r\n return true;\r\n }\r\n\r\n if (typeof (val) === \"number\") {\r\n if (Number.isInteger(val))\r\n binder.bindInteger(val);\r\n else\r\n binder.bindDouble(val);\r\n\r\n return true;\r\n }\r\n\r\n if (typeof (val) === \"boolean\") {\r\n binder.bindBoolean(val);\r\n return true;\r\n }\r\n\r\n if (typeof (val) === \"string\") {\r\n binder.bindString(val);\r\n return true;\r\n }\r\n\r\n if (ECSqlTypeHelper.isBlob(val)) {\r\n binder.bindBlob(val);\r\n return true;\r\n }\r\n\r\n if (ECSqlTypeHelper.isXYAndZ(val)) {\r\n binder.bindPoint3d(val);\r\n return true;\r\n }\r\n\r\n if (ECSqlTypeHelper.isXAndY(val)) {\r\n binder.bindPoint2d(val);\r\n return true;\r\n }\r\n\r\n if (ECSqlTypeHelper.isLowAndHighXYZ(val)) {\r\n binder.bindRange3d(val);\r\n return true;\r\n }\r\n\r\n if (ECSqlTypeHelper.isNavigationBindingValue(val)) {\r\n binder.bindNavigation(val);\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n}\r\n\r\nclass ECSqlValueHelper {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n public static getValue(ecsqlValue: ECSqlValue): any {\r\n if (ecsqlValue.isNull)\r\n return undefined;\r\n\r\n const dataType: ECSqlValueType = ecsqlValue.columnInfo.getType();\r\n switch (dataType) {\r\n case ECSqlValueType.Struct:\r\n return ECSqlValueHelper.getStruct(ecsqlValue);\r\n\r\n case ECSqlValueType.Navigation:\r\n return ecsqlValue.getNavigation();\r\n\r\n case ECSqlValueType.PrimitiveArray:\r\n case ECSqlValueType.StructArray:\r\n return ECSqlValueHelper.getArray(ecsqlValue);\r\n\r\n default:\r\n return ECSqlValueHelper.getPrimitiveValue(ecsqlValue);\r\n }\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n public static getStruct(ecsqlValue: ECSqlValue): any {\r\n if (ecsqlValue.isNull)\r\n return undefined;\r\n\r\n const structVal = {};\r\n const it = ecsqlValue.getStructIterator();\r\n try {\r\n for (const memberECSqlVal of it) {\r\n if (memberECSqlVal.isNull)\r\n continue;\r\n\r\n const memberName: string = ECJsNames.toJsName(memberECSqlVal.columnInfo.getPropertyName());\r\n const memberVal = ECSqlValueHelper.getValue(memberECSqlVal);\r\n Object.defineProperty(structVal, memberName, { enumerable: true, configurable: true, writable: true, value: memberVal });\r\n }\r\n } finally {\r\n }\r\n\r\n return structVal;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n public static getArray(ecsqlValue: ECSqlValue): any[] {\r\n const arrayVal: any[] = [];\r\n const it = ecsqlValue.getArrayIterator();\r\n try {\r\n for (const elementECSqlVal of it) {\r\n const memberVal = ECSqlValueHelper.getValue(elementECSqlVal);\r\n arrayVal.push(memberVal);\r\n }\r\n } finally {\r\n }\r\n return arrayVal;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n private static getPrimitiveValue(ecsqlValue: ECSqlValue): any {\r\n if (ecsqlValue.isNull)\r\n return undefined;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n const colInfo: ECSqlColumnInfo = ecsqlValue.columnInfo;\r\n switch (colInfo.getType()) {\r\n case ECSqlValueType.Blob:\r\n return ecsqlValue.getBlob();\r\n case ECSqlValueType.Boolean:\r\n return ecsqlValue.getBoolean();\r\n case ECSqlValueType.DateTime:\r\n return ecsqlValue.getDateTime();\r\n case ECSqlValueType.Double:\r\n return ecsqlValue.getDouble();\r\n case ECSqlValueType.Geometry:\r\n return ecsqlValue.getGeometry();\r\n case ECSqlValueType.Guid:\r\n return ecsqlValue.getGuid();\r\n case ECSqlValueType.Id: {\r\n if (colInfo.isSystemProperty() && colInfo.getPropertyName().endsWith(\"ECClassId\"))\r\n return ecsqlValue.getClassNameForClassId();\r\n\r\n return ecsqlValue.getId();\r\n }\r\n case ECSqlValueType.Int:\r\n case ECSqlValueType.Int64:\r\n return ecsqlValue.getInteger();\r\n case ECSqlValueType.Point2d:\r\n return ecsqlValue.getXAndY();\r\n case ECSqlValueType.Point3d:\r\n return ecsqlValue.getXYAndZ();\r\n case ECSqlValueType.String:\r\n return ecsqlValue.getString();\r\n default:\r\n throw new IModelError(DbResult.BE_SQLITE_ERROR, `Unsupported type ${ecsqlValue.columnInfo.getType()} of the ECSQL Value`);\r\n }\r\n }\r\n\r\n public static queryClassName(ecdb: ECDb, classId: Id64String, tableSpace?: string): string {\r\n if (!tableSpace)\r\n tableSpace = \"main\";\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n return ecdb.withPreparedStatement(`SELECT s.Name, c.Name FROM [${tableSpace}].meta.ECSchemaDef s, JOIN [${tableSpace}].meta.ECClassDef c ON s.ECInstanceId=c.SchemaId WHERE c.ECInstanceId=?`,\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n (stmt: ECSqlStatement) => {\r\n stmt.bindId(1, classId);\r\n if (stmt.step() !== DbResult.BE_SQLITE_ROW)\r\n throw new IModelError(DbResult.BE_SQLITE_ERROR, `No class found with ECClassId ${classId} in table space ${tableSpace}.`);\r\n\r\n return `${stmt.getValue(0).getString()}.${stmt.getValue(1).getString()}`;\r\n });\r\n }\r\n}\r\n\r\nclass ECSqlTypeHelper {\r\n public static isBlob(val: any): val is Uint8Array { return val instanceof Uint8Array; }\r\n\r\n public static isXAndY(val: any): val is XAndY { return XYZ.isXAndY(val); }\r\n public static isXYAndZ(val: any): val is XYAndZ { return XYZ.isXYAndZ(val); }\r\n public static isLowAndHighXYZ(arg: any): arg is LowAndHighXYZ { return arg.low !== undefined && ECSqlTypeHelper.isXYAndZ(arg.low) && arg.high !== undefined && ECSqlTypeHelper.isXYAndZ(arg.high); }\r\n\r\n public static isNavigationBindingValue(val: any): val is NavigationBindingValue { return val.id !== undefined && typeof (val.id) === \"string\"; }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"ECSqlStatement.js","sourceRoot":"","sources":["../../src/ECSqlStatement.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA+E;AAC/E,wDAAkF;AAClF,oDAA0J;AAG1J,8DAAyD;A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AAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC;QAC3E,CAAC,CAAC,CAAC;IACP,CAAC;CACF;AAED,MAAM,eAAe;IACZ,MAAM,CAAC,MAAM,CAAC,GAAQ,IAAuB,OAAO,GAAG,YAAY,UAAU,CAAC,CAAC,CAAC;IAEhF,MAAM,CAAC,OAAO,CAAC,GAAQ,IAAkB,OAAO,mBAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACnE,MAAM,CAAC,QAAQ,CAAC,GAAQ,IAAmB,OAAO,mBAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACtE,MAAM,CAAC,eAAe,CAAC,GAAQ,IAA0B,OAAO,GAAG,CAAC,GAAG,KAAK,SAAS,IAAI,eAAe,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,IAAI,KAAK,SAAS,IAAI,eAAe,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAE7L,MAAM,CAAC,wBAAwB,CAAC,GAAQ,IAAmC,OAAO,GAAG,CAAC,EAAE,KAAK,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC;CACjJ","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 ECSQL\n */\n\nimport { assert, DbResult, GuidString, Id64String } from \"@itwin/core-bentley\";\nimport { LowAndHighXYZ, Range3d, XAndY, XYAndZ, XYZ } from \"@itwin/core-geometry\";\nimport { ECJsNames, ECSqlValueType, IModelError, NavigationBindingValue, NavigationValue, PropertyMetaDataMap, QueryRowFormat } from \"@itwin/core-common\";\nimport { IModelJsNative } from \"@bentley/imodeljs-native\";\nimport { ECDb } from \"./ECDb\";\nimport { IModelNative } from \"./internal/NativePlatform\";\n\n/** The result of an **ECSQL INSERT** statement as returned from [ECSqlStatement.stepForInsert]($backend).\n *\n * If the step was successful, the ECSqlInsertResult contains\n * [DbResult.BE_SQLITE_DONE]($core-bentley)\n * and the ECInstanceId of the newly created instance.\n * In case of failure it contains the [DbResult]($core-bentley) error code.\n *\n * > Insert statements can be used with ECDb only, not with IModelDb.\n * @public\n */\nexport class ECSqlInsertResult {\n public constructor(public status: DbResult, public id?: Id64String) { }\n}\n\n/**\n * Arguments supplied to [[ECSqlStatement.getRow]].\n * @public\n * */\nexport interface ECSqlRowArg {\n /** Determine row format. */\n rowFormat?: QueryRowFormat;\n /**\n * Determine if classIds are converted to class names.\n */\n classIdsToClassNames?: boolean;\n}\n\n/** Executes ECSQL statements.\n *\n * A statement must be prepared before it can be executed, and it must be released when no longer needed.\n * See [IModelDb.withPreparedStatement]($backend) or\n * [ECDb.withPreparedStatement]($backend) for a convenient and\n * reliable way to prepare, execute, and then release a statement.\n *\n * A statement may contain parameters that must be filled in before use by the **bind** methods.\n *\n * Once prepared (and parameters are bound, if any), the statement is executed by calling [ECSqlStatement.step]($backend).\n * In case of an **ECSQL SELECT** statement, the current row can be retrieved with [ECSqlStatement.getRow]($backend) as\n * a whole, or with [ECSqlStatement.getValue]($backend) when individual values are needed.\n * Alternatively, query results of an **ECSQL SELECT** statement can be stepped through by using\n * standard iteration syntax, such as `for of`.\n *\n * > Preparing a statement can be time-consuming. The best way to reduce the effect of this overhead is to cache and reuse prepared\n * > statements. A cached prepared statement may be used in different places in an app, as long as the statement is general enough.\n * > The key to making this strategy work is to phrase a statement in a general way and use placeholders to represent parameters that will vary on each use.\n *\n * See also\n * - [Executing ECSQL]($docs/learning/backend/ExecutingECSQL) provides more background on ECSQL and an introduction on how to execute ECSQL with the iTwin.js API.\n * - [Code Examples]($docs/learning/backend/ECSQLCodeExamples) illustrate the use of the iTwin.js API for executing and working with ECSQL\n * @public\n * @deprecated in 4.11 - will not be removed until after 2026-06-13. Use [IModelDb.createQueryReader]($backend) or [ECDb.createQueryReader]($backend) to query.\n * For ECDb, use [ECDb.withCachedWriteStatement]($backend) or [ECDb.withWriteStatement]($backend) to Insert/Update/Delete.\n */\nexport class ECSqlStatement implements IterableIterator<any>, Disposable {\n private _stmt: IModelJsNative.ECSqlStatement | undefined;\n private _sql: string | undefined;\n private _props = new PropertyMetaDataMap([]);\n\n public get sql() { return this._sql!; } // eslint-disable-line @typescript-eslint/no-non-null-assertion\n\n /** Check if this statement has been prepared successfully or not */\n public get isPrepared(): boolean { return !!this._stmt; }\n\n /** Prepare this statement prior to first use.\n * @param db The DgnDb or ECDb to prepare the statement against\n * @param ecsql The ECSQL statement string to prepare\n * @param logErrors Determine if errors are logged or not\n * @throws [IModelError]($common) if the ECSQL statement cannot be prepared. Normally, prepare fails due to ECSQL syntax errors or references to tables or properties that do not exist.\n * The error.message property will provide details.\n * @internal\n */\n public prepare(db: IModelJsNative.DgnDb | IModelJsNative.ECDb, ecsql: string, logErrors = true): void {\n const stat = this.tryPrepare(db, ecsql, logErrors);\n if (stat.status !== DbResult.BE_SQLITE_OK) {\n throw new IModelError(stat.status, stat.message);\n }\n }\n\n /** Prepare this statement prior to first use.\n * @param db The DgnDb or ECDb to prepare the statement against\n * @param ecsql The ECSQL statement string to prepare\n * @param logErrors Determine if errors are logged or not, its set to false by default for tryPrepare()\n * @returns An object with a `status` member equal to [DbResult.BE_SQLITE_OK]($bentley) on success. Upon error, the `message` member will provide details.\n * @internal\n */\n public tryPrepare(db: IModelJsNative.DgnDb | IModelJsNative.ECDb, ecsql: string, logErrors = false): { status: DbResult, message: string } {\n if (this.isPrepared)\n throw new Error(\"ECSqlStatement is already prepared\");\n this._sql = ecsql;\n this._stmt = new IModelNative.platform.ECSqlStatement();\n return this._stmt.prepare(db, ecsql, logErrors);\n }\n\n /** Reset this statement so that the next call to step will return the first row, if any. */\n public reset(): void {\n assert(undefined !== this._stmt);\n this._stmt.reset();\n this._props = new PropertyMetaDataMap([]);\n }\n\n /** Get the Native SQL statement\n * @internal\n */\n public getNativeSql(): string {\n assert(undefined !== this._stmt);\n return this._stmt.getNativeSql();\n }\n\n /** Call this function when finished with this statement. This releases the native resources held by the statement.\n *\n * > Do not call this method directly on a statement that is being managed by a statement cache.\n */\n public [Symbol.dispose](): void {\n if (this._stmt) {\n this._stmt.dispose(); // free native statement\n this._stmt = undefined;\n }\n }\n\n /** @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [Symbol.dispose] instead. */\n public dispose(): void {\n this[Symbol.dispose]();\n }\n\n /** Binds the specified value to the specified ECSQL parameter.\n * The section \"[iTwin.js Types used in ECSQL Parameter Bindings]($docs/learning/ECSQLParameterTypes)\" describes the\n * iTwin.js types to be used for the different ECSQL parameter types.\n * @param parameter Index (1-based) or name of the parameter\n */\n public bindValue(parameter: number | string, val: any): void { this.getBinder(parameter).bind(val); }\n\n /** Binds null to the specified ECSQL parameter.\n * @param parameter Index (1-based) or name of the parameter\n */\n public bindNull(parameter: number | string): void { this.getBinder(parameter).bindNull(); }\n\n /** Binds a BLOB value to the specified ECSQL parameter.\n * @param parameter Index (1-based) or name of the parameter\n * @param BLOB value as either a Uint8Array, ArrayBuffer or a Base64 string\n */\n public bindBlob(parameter: number | string, blob: string | Uint8Array | ArrayBuffer | SharedArrayBuffer): void { this.getBinder(parameter).bindBlob(blob); }\n\n /** Binds a boolean value to the specified ECSQL parameter.\n * @param parameter Index (1-based) or name of the parameter\n * @param val Boolean value\n */\n public bindBoolean(parameter: number | string, val: boolean): void { this.getBinder(parameter).bindBoolean(val); }\n\n /** Binds a DateTime value to the specified ECSQL parameter.\n * @param parameter Index (1-based) or name of the parameter\n * @param isoDateTimeString DateTime value as ISO8601 string\n */\n public bindDateTime(parameter: number | string, isoDateTimeString: string): void { this.getBinder(parameter).bindDateTime(isoDateTimeString); }\n\n /** Binds a double value to the specified ECSQL parameter.\n * @param parameter Index (1-based) or name of the parameter\n * @param val Double value\n */\n public bindDouble(parameter: number | string, val: number): void { this.getBinder(parameter).bindDouble(val); }\n\n /** Binds an GUID value to the specified ECSQL parameter.\n * @param parameter Index (1-based) or name of the parameter\n * @param val GUID value\n */\n public bindGuid(parameter: number | string, val: GuidString): void { this.getBinder(parameter).bindGuid(val); }\n\n /** Binds an Id value to the specified ECSQL parameter.\n * @param parameter Index (1-based) or name of the parameter\n * @param val Id value\n */\n public bindId(parameter: number | string, val: Id64String): void { this.getBinder(parameter).bindId(val); }\n\n /** Binds an integer value to the specified ECSQL parameter.\n * @param parameter Index (1-based) or name of the parameter\n * @param val Integer value as number, decimal string or hexadecimal string.\n */\n public bindInteger(parameter: number | string, val: number | string): void { this.getBinder(parameter).bindInteger(val); }\n\n /** Binds an Point2d value to the specified ECSQL parameter.\n * @param parameter Index (1-based) or name of the parameter\n * @param val Point2d value\n */\n public bindPoint2d(parameter: number | string, val: XAndY): void { this.getBinder(parameter).bindPoint2d(val); }\n\n /** Binds an Point3d value to the specified ECSQL parameter.\n * @param parameter Index (1-based) or name of the parameter\n * @param val Point3d value\n */\n public bindPoint3d(parameter: number | string, val: XYAndZ): void { this.getBinder(parameter).bindPoint3d(val); }\n\n /** Binds a Range3d as a blob to the specified ECSQL parameter\n * @param parameter Index(1-based) or name of the parameter\n * @param val Range3d value\n */\n public bindRange3d(parameter: number | string, val: LowAndHighXYZ): void { this.getBinder(parameter).bindRange3d(val); }\n\n /** Binds an string to the specified ECSQL parameter.\n * @param parameter Index (1-based) or name of the parameter\n * @param val String value\n */\n public bindString(parameter: number | string, val: string): void { this.getBinder(parameter).bindString(val); }\n\n /** Binds a navigation property value to the specified ECSQL parameter.\n * @param parameter Index (1-based) or name of the parameter\n * @param val Navigation property value\n */\n public bindNavigation(parameter: number | string, val: NavigationBindingValue): void { this.getBinder(parameter).bindNavigation(val); }\n\n /** Binds a struct property value to the specified ECSQL parameter.\n * @param parameter Index (1-based) or name of the parameter\n * @param val Struct value. The struct value is an object composed of pairs of a struct member property name and its value\n * (of one of the supported types)\n */\n public bindStruct(parameter: number | string, val: object): void { this.getBinder(parameter).bindStruct(val); }\n\n /** Binds an array value to the specified ECSQL parameter.\n * @param parameter Index (1-based) or name of the parameter\n * @param val Array value. The array value is an array of values of the supported types\n */\n public bindArray(parameter: number | string, val: any[]): void { this.getBinder(parameter).bindArray(val); }\n\n public bindIdSet(parameter: number | string, val: Id64String[]): void { this.getBinder(parameter).bindIdSet(val); }\n /**\n * Gets a binder to bind a value for an ECSQL parameter\n * > This is the most low-level API to bind a value to a specific parameter. Alternatively you can use the ECSqlStatement.bindXX methods\n * > or [ECSqlStatement.bindValues]($backend).\n * @param parameter Index (1-based) or name of the parameter\n */\n public getBinder(parameter: string | number): ECSqlBinder {\n assert(undefined !== this._stmt);\n return new ECSqlBinder(this._stmt.getBinder(parameter));\n }\n\n /** Bind values to all parameters in the statement.\n * @param values The values to bind to the parameters.\n * Pass an *array* of values if the parameters are *positional*.\n * Pass an *object of the values keyed on the parameter name* for *named parameters*.\n * The values in either the array or object must match the respective types of the parameter.\n *\n * The section \"[iTwin.js Types used in ECSQL Parameter Bindings]($docs/learning/ECSQLParameterTypes)\" describes the\n * iTwin.js types to be used for the different ECSQL parameter types.\n *\n * See also these [Code Samples]($docs/learning/backend/ECSQLCodeExamples#binding-to-all-parameters-at-once)\n */\n public bindValues(values: any[] | object): void {\n if (Array.isArray(values)) {\n for (let i = 0; i < values.length; i++) {\n const paramIndex: number = i + 1;\n const paramValue: any = values[i];\n if (paramValue === undefined || paramValue === null)\n continue;\n\n this.bindValue(paramIndex, paramValue);\n }\n return;\n }\n\n for (const entry of Object.entries(values)) {\n const paramName: string = entry[0];\n const paramValue: any = entry[1];\n if (paramValue === undefined || paramValue === null)\n continue;\n\n this.bindValue(paramName, paramValue);\n }\n }\n\n /** Clear any bindings that were previously set on this statement.\n * @throws [IModelError]($common) in case of errors\n */\n public clearBindings(): void {\n if (this._stmt) {\n const stat: DbResult = this._stmt.clearBindings();\n if (stat !== DbResult.BE_SQLITE_OK)\n throw new IModelError(stat, \"Error clearing bindings\");\n }\n }\n\n /** Step this statement to the next row.\n *\n * For **ECSQL SELECT** statements the method returns\n * - [DbResult.BE_SQLITE_ROW]($core-bentley) if the statement now points successfully to the next row.\n * - [DbResult.BE_SQLITE_DONE]($core-bentley) if the statement has no more rows.\n * - Error status in case of errors.\n *\n * For **ECSQL INSERT, UPDATE, DELETE** statements the method returns\n * - [DbResult.BE_SQLITE_DONE]($core-bentley) if the statement has been executed successfully.\n * - Error status in case of errors.\n *\n * > Insert statements can be used with ECDb only, not with IModelDb.\n *\n * See also: [Code Samples]($docs/learning/backend/ECSQLCodeExamples)\n */\n public step(): DbResult { return this._stmt!.step(); } // eslint-disable-line @typescript-eslint/no-non-null-assertion\n\n /** @internal added this back in for testing purposes */\n public async stepAsync(): Promise<DbResult> {\n return new Promise((resolve, _reject) => {\n this._stmt!.stepAsync(resolve); // eslint-disable-line @typescript-eslint/no-non-null-assertion\n });\n }\n\n /** Step this INSERT statement and returns status and the ECInstanceId of the newly\n * created instance.\n *\n * > Insert statements can be used with ECDb only, not with IModelDb.\n *\n * @returns Returns the generated ECInstanceId in case of success and the status of the step\n * call. In case of error, the respective error code is returned.\n */\n public stepForInsert(): ECSqlInsertResult {\n assert(undefined !== this._stmt);\n const r: { status: DbResult, id: string } = this._stmt.stepForInsert();\n if (r.status === DbResult.BE_SQLITE_DONE)\n return new ECSqlInsertResult(r.status, r.id);\n\n return new ECSqlInsertResult(r.status);\n }\n\n /** Get the query result's column count (only for ECSQL SELECT statements). */\n public getColumnCount(): number { return this._stmt!.getColumnCount(); } // eslint-disable-line @typescript-eslint/no-non-null-assertion\n\n /** Get the current row.\n * The returned row is formatted as JavaScript object where every SELECT clause item becomes a property in the JavaScript object.\n *\n * See also:\n * - [ECSQL row format]($docs/learning/ECSQLRowFormat) for details about the format of the returned row.\n * - [Code Samples]($docs/learning/backend/ECSQLCodeExamples#working-with-the-query-result)\n */\n public getRow(args?: ECSqlRowArg): any {\n if (!this._stmt)\n throw new Error(\"ECSqlStatement is not prepared\");\n\n args = args ?? {};\n if (args.rowFormat === undefined) {\n args.rowFormat = QueryRowFormat.UseJsPropertyNames;\n }\n const resp = this._stmt.toRow({\n classIdsToClassNames: args.classIdsToClassNames,\n useJsName: args.rowFormat === QueryRowFormat.UseJsPropertyNames,\n abbreviateBlobs: false,\n // In 4.x, people are currently dependent on the behavior of aliased classIds `select classId as aliasedClassId` not being\n // converted into classNames which is a bug that we must now support.This option preserves this special behavior until\n // it can be removed in a future version.\n doNotConvertClassIdsToClassNamesWhenAliased: true,\n });\n return this.formatCurrentRow(resp, args.rowFormat);\n }\n\n private formatCurrentRow(currentResp: any, rowFormat: QueryRowFormat = QueryRowFormat.UseJsPropertyNames): any[] | object {\n if (!this._stmt)\n throw new Error(\"ECSqlStatement is not prepared\");\n\n if (rowFormat === QueryRowFormat.UseECSqlPropertyIndexes)\n return currentResp.data;\n\n if (this._props.length === 0) {\n const resp = this._stmt.getMetadata();\n this._props = new PropertyMetaDataMap(resp.meta);\n }\n const formattedRow = {};\n for (const prop of this._props) {\n const propName = rowFormat === QueryRowFormat.UseJsPropertyNames ? prop.jsonName : prop.name;\n const val = currentResp.data[prop.index];\n if (typeof val !== \"undefined\" && val !== null) {\n Object.defineProperty(formattedRow, propName, {\n value: val,\n enumerable: true,\n writable: true,\n });\n }\n }\n return formattedRow;\n }\n\n /** Calls step when called as an iterator.\n *\n * Each iteration returns an [ECSQL row format]($docs/learning/ECSQLRowFormat) as returned\n * from [ECSqlStatement.getRow]($backend).\n */\n public next(): IteratorResult<any> {\n if (DbResult.BE_SQLITE_ROW === this.step()) {\n return {\n done: false,\n value: this.getRow(),\n };\n } else {\n return {\n done: true,\n value: undefined,\n };\n }\n }\n\n /** The iterator that will step through the results of this statement. */\n public [Symbol.iterator](): IterableIterator<any> { return this; }\n\n /** Get the value for the column at the given index in the query result.\n * @param columnIx Index of ECSQL column in query result (0-based)\n *\n * See also: [Code Samples]($docs/learning/backend/ECSQLCodeExamples#working-with-the-query-result)\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public getValue(columnIx: number): ECSqlValue {\n assert(undefined !== this._stmt);\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return new ECSqlValue(this._stmt.getValue(columnIx));\n }\n}\n\n/** Executes ECSQL INSERT/UPDATE/DELETE statements.\n *\n * A statement must be prepared before it can be executed, and it must be released when no longer needed.\n * See [ECDb.withCachedWriteStatement]($backend) for a convenient and\n * reliable way to prepare, execute, and then release a statement.\n *\n * A statement may contain parameters that must be filled in before use by the **bind** methods.\n *\n * Once prepared (and parameters are bound, if any), the statement is executed by calling [ECSqlStatement.stepForInsert]($backend).\n *\n * > Preparing a statement can be time-consuming. The best way to reduce the effect of this overhead is to cache and reuse prepared\n * > statements. A cached prepared statement may be used in different places in an app, as long as the statement is general enough.\n * > The key to making this strategy work is to phrase a statement in a general way and use placeholders to represent parameters that will vary on each use.\n *\n * See also\n * - [Executing ECSQL]($docs/learning/backend/ExecutingECSQL) provides more background on ECSQL and an introduction on how to execute ECSQL with the iTwin.js API.\n * - [Code Examples]($docs/learning/backend/ECSQLCodeExamples) illustrate the use of the iTwin.js API for executing and working with ECSQL\n * @public\n */\nexport class ECSqlWriteStatement {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n private _stmt: ECSqlStatement;\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public constructor(stmt?: ECSqlStatement) {\n if (stmt)\n this._stmt = stmt;\n else {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this._stmt = new ECSqlStatement();\n }\n }\n\n public get sql() { return this._stmt.sql; }\n\n /** Check if this statement has been prepared successfully or not */\n public get isPrepared(): boolean { return this._stmt.isPrepared; }\n\n /** Get the underlying ECSqlStatement. Needed until we remove ECSqlStatement.\n * @param\n * @internal\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public get stmt(): ECSqlStatement { return this._stmt; }\n\n /** Prepare this statement prior to first use.\n * @param db The ECDb to prepare the statement against\n * @param ecsql The ECSQL statement string to prepare\n * @param logErrors Determine if errors are logged or not\n * @throws [IModelError]($common) if the ECSQL statement cannot be prepared. Normally, prepare fails due to ECSQL syntax errors or references to tables or properties that do not exist.\n * The error.message property will provide details.\n * @internal\n */\n public prepare(db: IModelJsNative.ECDb, ecsql: string, logErrors = true): void {\n this._stmt.prepare(db, ecsql, logErrors);\n }\n\n /** Prepare this statement prior to first use.\n * @param db The DgnDb or ECDb to prepare the statement against\n * @param ecsql The ECSQL statement string to prepare\n * @param logErrors Determine if errors are logged or not, its set to false by default for tryPrepare()\n * @returns An object with a `status` member equal to [DbResult.BE_SQLITE_OK]($bentley) on success. Upon error, the `message` member will provide details.\n * @internal\n */\n public tryPrepare(db: IModelJsNative.DgnDb | IModelJsNative.ECDb, ecsql: string, logErrors = false): { status: DbResult, message: string } {\n return this.tryPrepare(db, ecsql, logErrors);\n }\n\n /** Reset this statement so that the next call to step will return the first row, if any. */\n public reset(): void {\n this._stmt.reset();\n }\n\n /**\n * Releases the native resources held by this ECSqlWriteStatement.\n *\n * This method should be called when the statement is no longer needed to free up native resources.\n *\n * > Do not call this method directly on a statement that is being managed by a statement cache.\n */\n public [Symbol.dispose](): void {\n if (this._stmt)\n this._stmt[Symbol.dispose]();\n }\n\n /** Get the Native SQL statement\n * @internal\n */\n public getNativeSql(): string {\n return this._stmt.getNativeSql();\n }\n\n /** Binds the specified value to the specified ECSQL parameter.\n * The section \"[iTwin.js Types used in ECSQL Parameter Bindings]($docs/learning/ECSQLParameterTypes)\" describes the\n * iTwin.js types to be used for the different ECSQL parameter types.\n * @param parameter Index (1-based) or name of the parameter\n */\n public bindValue(parameter: number | string, val: any): void { this.getBinder(parameter).bind(val); }\n\n /** Binds null to the specified ECSQL parameter.\n * @param parameter Index (1-based) or name of the parameter\n */\n public bindNull(parameter: number | string): void { this.getBinder(parameter).bindNull(); }\n\n /** Binds a BLOB value to the specified ECSQL parameter.\n * @param parameter Index (1-based) or name of the parameter\n * @param BLOB value as either a Uint8Array, ArrayBuffer or a Base64 string\n */\n public bindBlob(parameter: number | string, blob: string | Uint8Array | ArrayBuffer | SharedArrayBuffer): void { this.getBinder(parameter).bindBlob(blob); }\n\n /** Binds a boolean value to the specified ECSQL parameter.\n * @param parameter Index (1-based) or name of the parameter\n * @param val Boolean value\n */\n public bindBoolean(parameter: number | string, val: boolean): void { this.getBinder(parameter).bindBoolean(val); }\n\n /** Binds a DateTime value to the specified ECSQL parameter.\n * @param parameter Index (1-based) or name of the parameter\n * @param isoDateTimeString DateTime value as ISO8601 string\n */\n public bindDateTime(parameter: number | string, isoDateTimeString: string): void { this.getBinder(parameter).bindDateTime(isoDateTimeString); }\n\n /** Binds a double value to the specified ECSQL parameter.\n * @param parameter Index (1-based) or name of the parameter\n * @param val Double value\n */\n public bindDouble(parameter: number | string, val: number): void { this.getBinder(parameter).bindDouble(val); }\n\n /** Binds an GUID value to the specified ECSQL parameter.\n * @param parameter Index (1-based) or name of the parameter\n * @param val GUID value\n */\n public bindGuid(parameter: number | string, val: GuidString): void { this.getBinder(parameter).bindGuid(val); }\n\n /** Binds an Id value to the specified ECSQL parameter.\n * @param parameter Index (1-based) or name of the parameter\n * @param val Id value\n */\n public bindId(parameter: number | string, val: Id64String): void { this.getBinder(parameter).bindId(val); }\n\n /** Binds an integer value to the specified ECSQL parameter.\n * @param parameter Index (1-based) or name of the parameter\n * @param val Integer value as number, decimal string or hexadecimal string.\n */\n public bindInteger(parameter: number | string, val: number | string): void { this.getBinder(parameter).bindInteger(val); }\n\n /** Binds an Point2d value to the specified ECSQL parameter.\n * @param parameter Index (1-based) or name of the parameter\n * @param val Point2d value\n */\n public bindPoint2d(parameter: number | string, val: XAndY): void { this.getBinder(parameter).bindPoint2d(val); }\n\n /** Binds an Point3d value to the specified ECSQL parameter.\n * @param parameter Index (1-based) or name of the parameter\n * @param val Point3d value\n */\n public bindPoint3d(parameter: number | string, val: XYAndZ): void { this.getBinder(parameter).bindPoint3d(val); }\n\n /** Binds a Range3d as a blob to the specified ECSQL parameter\n * @param parameter Index(1-based) or name of the parameter\n * @param val Range3d value\n */\n public bindRange3d(parameter: number | string, val: LowAndHighXYZ): void { this.getBinder(parameter).bindRange3d(val); }\n\n /** Binds an string to the specified ECSQL parameter.\n * @param parameter Index (1-based) or name of the parameter\n * @param val String value\n */\n public bindString(parameter: number | string, val: string): void { this.getBinder(parameter).bindString(val); }\n\n /** Binds a navigation property value to the specified ECSQL parameter.\n * @param parameter Index (1-based) or name of the parameter\n * @param val Navigation property value\n */\n public bindNavigation(parameter: number | string, val: NavigationBindingValue): void { this.getBinder(parameter).bindNavigation(val); }\n\n /** Binds a struct property value to the specified ECSQL parameter.\n * @param parameter Index (1-based) or name of the parameter\n * @param val Struct value. The struct value is an object composed of pairs of a struct member property name and its value\n * (of one of the supported types)\n */\n public bindStruct(parameter: number | string, val: object): void { this.getBinder(parameter).bindStruct(val); }\n\n /** Binds an array value to the specified ECSQL parameter.\n * @param parameter Index (1-based) or name of the parameter\n * @param val Array value. The array value is an array of values of the supported types\n */\n public bindArray(parameter: number | string, val: any[]): void { this.getBinder(parameter).bindArray(val); }\n\n public bindIdSet(parameter: number | string, val: Id64String[]): void { this.getBinder(parameter).bindIdSet(val); }\n /**\n * Gets a binder to bind a value for an ECSQL parameter\n * > This is the most low-level API to bind a value to a specific parameter. Alternatively you can use the ECSqlStatement.bindXX methods\n * > or [ECSqlStatement.bindValues]($backend).\n * @param parameter Index (1-based) or name of the parameter\n */\n public getBinder(parameter: string | number): ECSqlBinder {\n return this._stmt.getBinder(parameter);\n }\n\n /** Bind values to all parameters in the statement.\n * @param values The values to bind to the parameters.\n * Pass an *array* of values if the parameters are *positional*.\n * Pass an *object of the values keyed on the parameter name* for *named parameters*.\n * The values in either the array or object must match the respective types of the parameter.\n *\n * The section \"[iTwin.js Types used in ECSQL Parameter Bindings]($docs/learning/ECSQLParameterTypes)\" describes the\n * iTwin.js types to be used for the different ECSQL parameter types.\n *\n * See also these [Code Samples]($docs/learning/backend/ECSQLCodeExamples#binding-to-all-parameters-at-once)\n */\n public bindValues(values: any[] | object): void {\n this._stmt.bindValues(values);\n }\n\n /** Clear any bindings that were previously set on this statement.\n * @throws [IModelError]($common) in case of errors\n */\n public clearBindings(): void {\n this._stmt.clearBindings();\n }\n\n /** Step this INSERT statement and returns status and the ECInstanceId of the newly\n * created instance.\n *\n * > Insert statements can be used with ECDb only, not with IModelDb.\n *\n * @returns Returns the generated ECInstanceId in case of success and the status of the step\n * call. In case of error, the respective error code is returned.\n */\n public stepForInsert(): ECSqlInsertResult {\n return this._stmt.stepForInsert();\n }\n\n public step(): DbResult {\n return this._stmt.step();\n }\n\n /** Get the query result's column count (only for ECSQL SELECT statements). */\n public getColumnCount(): number { return this._stmt.getColumnCount(); }\n}\n\n/** Binds a value to an ECSQL parameter.\n *\n * See also:\n *\n * - [ECSqlStatement]($backend)\n * - [ECSqlStatement.getBinder]($backend)\n * - [Executing ECSQL]($docs/learning/backend/ExecutingECSQL)\n * @public\n */\nexport class ECSqlBinder {\n private _binder: IModelJsNative.ECSqlBinder;\n\n /** @internal */\n public constructor(binder: IModelJsNative.ECSqlBinder) { this._binder = binder; }\n\n /** Binds the specified value to the ECSQL parameter.\n * The section \"[iTwin.js Types used in ECSQL Parameter Bindings]($docs/learning/ECSQLParameterTypes)\" describes the\n * iTwin.js types to be used for the different ECSQL parameter types.\n * @param val Value to bind\n */\n public bind(val: any): void {\n ECSqlBindingHelper.bindValue(this, val);\n }\n\n /** Binds null to the ECSQL parameter. */\n public bindNull(): void {\n const stat: DbResult = this._binder.bindNull();\n if (stat !== DbResult.BE_SQLITE_OK)\n throw new IModelError(stat, \"Error binding null\");\n }\n\n /** Binds a BLOB value to the ECSQL parameter.\n * @param BLOB value as either a UInt8Array, ArrayBuffer or a Base64 string\n */\n public bindBlob(blob: string | Uint8Array | ArrayBuffer | SharedArrayBuffer): void {\n const stat: DbResult = this._binder.bindBlob(blob);\n if (stat !== DbResult.BE_SQLITE_OK)\n throw new IModelError(stat, \"Error binding blob\");\n }\n\n /** Binds a boolean value to the ECSQL parameter.\n * @param val Boolean value\n */\n public bindBoolean(val: boolean): void {\n const stat: DbResult = this._binder.bindBoolean(val);\n if (stat !== DbResult.BE_SQLITE_OK)\n throw new IModelError(stat, \"Error binding boolean\");\n }\n\n /** Binds a DateTime value to the ECSQL parameter.\n * @param isoDateTimeString DateTime value as ISO8601 string\n */\n public bindDateTime(isoDateTimeString: string): void {\n const stat: DbResult = this._binder.bindDateTime(isoDateTimeString);\n if (stat !== DbResult.BE_SQLITE_OK)\n throw new IModelError(stat, \"Error binding DateTime\");\n }\n\n /** Binds a double value to the ECSQL parameter.\n * @param val Double value\n */\n public bindDouble(val: number): void {\n const stat: DbResult = this._binder.bindDouble(val);\n if (stat !== DbResult.BE_SQLITE_OK)\n throw new IModelError(stat, \"Error binding double\");\n }\n\n /** Binds an GUID value to the ECSQL parameter.\n * @param val GUID value. If passed as string, it must be formatted as described in [GuidString]($core-bentley).\n */\n public bindGuid(val: GuidString): void {\n const stat: DbResult = this._binder.bindGuid(val);\n if (stat !== DbResult.BE_SQLITE_OK)\n throw new IModelError(stat, \"Error binding GUID\");\n }\n\n /** Binds an Id value to the ECSQL parameter.\n * @param val Id value. If passed as string it must be the hexadecimal representation of the Id.\n */\n public bindId(val: Id64String): void {\n const stat: DbResult = this._binder.bindId(val);\n if (stat !== DbResult.BE_SQLITE_OK)\n throw new IModelError(stat, \"Error binding Id\");\n }\n\n /** Binds an integer value to the ECSQL parameter.\n * @param val Integer value as number, decimal string or hexadecimal string.\n */\n public bindInteger(val: number | string): void {\n const stat: DbResult = this._binder.bindInteger(val);\n if (stat !== DbResult.BE_SQLITE_OK)\n throw new IModelError(stat, \"Error binding integer\");\n }\n\n /** Binds an Point2d value to the ECSQL parameter.\n * @param val Point2d value\n */\n public bindPoint2d(val: XAndY): void {\n const stat: DbResult = this._binder.bindPoint2d(val.x, val.y);\n if (stat !== DbResult.BE_SQLITE_OK)\n throw new IModelError(stat, \"Error binding Point2d\");\n }\n\n /** Binds an Point3d value to the ECSQL parameter.\n * @param val Point3d value\n */\n public bindPoint3d(val: XYAndZ): void {\n const stat: DbResult = this._binder.bindPoint3d(val.x, val.y, val.z);\n if (stat !== DbResult.BE_SQLITE_OK)\n throw new IModelError(stat, \"Error binding Point3d\");\n }\n\n /** Binds a Range3d as a blob to the ECSQL parameter.\n * @param val Range3d value\n */\n public bindRange3d(val: LowAndHighXYZ): void {\n const stat: DbResult = this._binder.bindBlob(Range3d.toFloat64Array(val).buffer);\n if (stat !== DbResult.BE_SQLITE_OK)\n throw new IModelError(stat, \"Error binding Range3d\");\n }\n\n /** Binds an string to the ECSQL parameter.\n * @param val String value\n */\n public bindString(val: string): void {\n const stat: DbResult = this._binder.bindString(val);\n if (stat !== DbResult.BE_SQLITE_OK)\n throw new IModelError(stat, \"Error binding string\");\n }\n\n /** Binds a navigation property value to the ECSQL parameter.\n * @param val Navigation property value\n */\n public bindNavigation(val: NavigationBindingValue): void {\n const stat: DbResult = this._binder.bindNavigation(val.id, val.relClassName, val.relClassTableSpace);\n if (stat !== DbResult.BE_SQLITE_OK)\n throw new IModelError(stat, \"Error binding navigation property\");\n }\n\n /** Binds a struct property value to the ECSQL parameter.\n * @param val Struct value. The struct value is an object composed of pairs of a struct member property name and its value\n * (of one of the supported types)\n */\n public bindStruct(val: object): void { ECSqlBindingHelper.bindStruct(this, val); }\n\n /** Gets the binder for the specified member of a struct parameter\n *\n * > This is the most low-level way to bind struct parameters with most flexibility. A simpler alternative is\n * > to just call [ECSqlBinder.bindStruct]($backend).\n */\n public bindMember(memberName: string): ECSqlBinder { return new ECSqlBinder(this._binder.bindMember(memberName)); }\n\n /** Binds a set of Id strings to the ECSQL parameter.\n * @param val array of Id values. If passed as string they must be the hexadecimal representation of the Ids.\n */\n public bindIdSet(vector: Id64String[]): void {\n const stat: DbResult = this._binder.bindIdSet(vector);\n if (stat !== DbResult.BE_SQLITE_OK)\n throw new IModelError(stat, \"Error binding id set\");\n }\n\n /** Binds an array value to the ECSQL parameter.\n * @param val Array value. The array value is an array of values of the supported types\n */\n public bindArray(val: any[]): void { ECSqlBindingHelper.bindArray(this, val); }\n\n /** Adds a new array element to the array parameter and returns the binder for the new array element\n *\n * > This is the most low-level way to bind array parameters with most flexibility. A simpler alternative is\n * > to just call [ECSqlBinder.bindArray]($backend).\n */\n public addArrayElement(): ECSqlBinder { return new ECSqlBinder(this._binder.addArrayElement()); }\n}\n\n/** Represents the value of an ECEnumeration.\n *\n * See also:\n * - [[ECSqlValue.getEnum]]\n * - [[ECSqlStatement]]\n * - [[ECSqlStatement.getValue]]\n * - [Code Samples]($docs/learning/backend/ECSQLCodeExamples#working-with-the-query-result)\n * @public\n * @deprecated in 4.11 - will not be removed until after 2026-06-13. Use [IModelDb.createQueryReader]($backend) or [ECDb.createQueryReader]($backend) instead.\n */\nexport interface ECEnumValue {\n schema: string;\n name: string;\n key: string;\n value: number | string;\n}\n\n/** Value of a column in a row of an ECSQL query result.\n *\n * See also:\n * - [ECSqlStatement]($backend)\n * - [ECSqlStatement.getValue]($backend)\n * - [Code Samples]($docs/learning/backend/ECSQLCodeExamples#working-with-the-query-result)\n * @public\n * @deprecated in 4.11 - will not be removed until after 2026-06-13. Use [IModelDb.createQueryReader]($backend) or [ECDb.createQueryReader]($backend) instead.\n*/\nexport class ECSqlValue {\n private _val: IModelJsNative.ECSqlValue;\n\n /** @internal */\n public constructor(val: IModelJsNative.ECSqlValue) { this._val = val; }\n\n /** Get information about the query result's column this value refers to. */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public get columnInfo(): ECSqlColumnInfo { return this._val.getColumnInfo() as ECSqlColumnInfo; }\n\n /** Get the value of this ECSQL value */\n public get value(): any { return ECSqlValueHelper.getValue(this); }\n\n /** Indicates whether the value is NULL or not. */\n public get isNull(): boolean { return this._val.isNull(); }\n /** Get the value as BLOB */\n public getBlob(): Uint8Array { return this._val.getBlob(); }\n /** Get the value as a boolean value */\n public getBoolean(): boolean { return this._val.getBoolean(); }\n /** Get the value as a DateTime value (formatted as ISO8601 string) */\n public getDateTime(): string { return this._val.getDateTime(); }\n /** Get the value as a double value */\n public getDouble(): number { return this._val.getDouble(); }\n /** Get the value as a IGeometry value (as ECJSON IGeometry) */\n public getGeometry(): any { return JSON.parse(this._val.getGeometry()); }\n /** Get the value as a GUID (formatted as GUID string).\n * See [GuidString]($core-bentley)\n */\n public getGuid(): GuidString { return this._val.getGuid(); }\n /** Get the value as a Id (formatted as hexadecimal string). */\n public getId(): Id64String { return this._val.getId(); }\n /** Get the ClassId value formatted as fully qualified class name. */\n public getClassNameForClassId(): string { return this._val.getClassNameForClassId(); }\n /** Get the value as a integer value */\n public getInteger(): number { return this._val.getInt64(); }\n /** Get the value as a string value */\n public getString(): string { return this._val.getString(); }\n /** Get the value as [XAndY]($core-geometry) */\n public getXAndY(): XAndY { return this._val.getPoint2d(); }\n /** Get the value as [XYAndZ]($core-geometry) */\n public getXYAndZ(): XYAndZ { return this._val.getPoint3d(); }\n /** Get the value as ECEnumeration value\n * Note: This method is optional. Using [[ECSqlValue.getInteger]] for integral enums and\n * [[ECSqlValue.getString]] for string enums respectively are the usual way to get\n * enum values. This method can be used if the context of the underlying ECEnumeration\n * is required.\n * The value is broken down into the ECEnumerators that make it up, if the value\n * is a combination of ECEnumerators. If the value is not a strict match of an ECEnumerator\n * or a combination of them, undefined is returned.\n * > Note: You can call [[ECSqlValue.columnInfo.isEnum]] to find out whether\n * > this method can be called or not.\n * @return ECEnumeration value(s) or undefined if the ECSqlValue does not represent an ECEnumeration.\n * or is not a strict match of an ECEnumerator or a combination of them.\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public getEnum(): ECEnumValue[] | undefined { return this._val.getEnum(); }\n\n /** Get the value as [NavigationValue]($common) */\n public getNavigation(): NavigationValue { return this._val.getNavigation(); }\n\n /** Get an iterator for iterating the struct members of this struct value. */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public getStructIterator(): ECSqlValueIterator { return new ECSqlValueIterator(this._val.getStructIterator()); }\n\n /** Get this struct value's content as object literal */\n public getStruct(): any { return ECSqlValueHelper.getStruct(this); }\n\n /** Get an iterator for iterating the array elements of this array value. */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public getArrayIterator(): ECSqlValueIterator { return new ECSqlValueIterator(this._val.getArrayIterator()); }\n\n /** Get this array value as JavaScript array */\n public getArray(): any[] { return ECSqlValueHelper.getArray(this); }\n}\n\n/** Iterator over members of a struct [ECSqlValue]($backend) or the elements of an array [ECSqlValue]($backend).\n * See [ECSqlValue.getStructIterator]($backend) or [ECSqlValue.getArrayIterator]($backend).\n * @public\n * @deprecated in 4.11 - will not be removed until after 2026-06-13. Use [IModelDb.createQueryReader]($backend) or [ECDb.createQueryReader]($backend) instead.\n*/\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport class ECSqlValueIterator implements IterableIterator<ECSqlValue> {\n private _it: IModelJsNative.ECSqlValueIterator;\n\n /** @internal */\n public constructor(it: IModelJsNative.ECSqlValueIterator) { this._it = it; }\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public next(): IteratorResult<ECSqlValue> {\n if (this._it.moveNext()) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return { done: false, value: new ECSqlValue(this._it.getCurrent()) };\n }\n return { done: true, value: undefined };\n }\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public [Symbol.iterator](): IterableIterator<ECSqlValue> { return this; }\n}\n\n/** Information about an ECSQL column in an ECSQL query result.\n * See [ECSqlValue.columnInfo]($backend), [ECSqlStatement.getValue]($backend), [ECSqlStatement]($backend)\n * @public\n * @deprecated in 4.11 - will not be removed until after 2026-06-13. Use [IModelDb.createQueryReader]($backend) or [ECDb.createQueryReader]($backend) instead.\n */\nexport interface ECSqlColumnInfo {\n /** Gets the data type of the column.\n */\n getType(): ECSqlValueType;\n\n /** Gets the name of the property backing the column.\n * > If this column is backed by a generated property, i.e. it represents ECSQL expression,\n * > the access string consists of the name of the generated property. [[ECSqlColumnInfo.getOriginPropertyName]]\n * > can be used to obtain the non-aliased name in that case.\n */\n getPropertyName(): string;\n\n /** Gets the name of the original property that the column data is from.\n * > Other than [[ECSqlColumnInfo.getPropertyName]], this ignores aliases and allows getting the name\n * > of the property which is being used for the column. A column may not be backed\n * > by a property, in which case this returns undefined.\n */\n getOriginPropertyName(): string | undefined;\n\n /** Gets the full access string to the corresponding ECSqlValue starting from the root class.\n * > If this column is backed by a generated property, i.e. it represents ECSQL expression,\n * > the access string consists of the ECSQL expression.\n */\n getAccessString(): string;\n\n /** Indicates whether the column refers to an ECEnumeration property. */\n isEnum(): boolean;\n\n /** Indicates whether the column refers to a system property (e.g. id, className). */\n isSystemProperty(): boolean;\n\n /** Indicates whether the column is backed by a generated property or not. For SELECT clause items that are expressions other\n * than simply a reference to an ECProperty, a property is generated containing the expression name.\n */\n isGeneratedProperty(): boolean;\n\n /** Gets the table space in which this root class is persisted.\n * > For classes in the primary file the table space is MAIN. For classes in attached\n * > files, the table space is the name by which the file was attached. For generated properties the table space is empty.\n */\n getRootClassTableSpace(): string;\n\n /** Gets the fully qualified name of the ECClass of the top-level ECProperty backing this column. */\n getRootClassName(): string;\n\n /** Gets the class alias of the root class to which the column refers to.\n * > Returns an empty string if no class alias was specified in the select clause.\n */\n getRootClassAlias(): string;\n}\n\nclass ECSqlBindingHelper {\n\n /** Binds the specified value to the specified binder\n * @param binder Parameter Binder to bind to\n * @param val Value to be bound. (See [iTwin.js Types used in ECSQL Parameter Bindings]($docs/learning/ECSQLParameterTypes))\n * @throws IModelError in case of errors\n */\n public static bindValue(binder: ECSqlBinder, val: any): void {\n // returns false if val is no primitive and returns true if it is primitive and a binding call was done\n if (ECSqlBindingHelper.tryBindPrimitiveTypes(binder, val))\n return;\n\n if (Array.isArray(val)) {\n ECSqlBindingHelper.bindArray(binder, val);\n return;\n }\n\n if (typeof (val) === \"object\") {\n ECSqlBindingHelper.bindStruct(binder, val);\n return;\n }\n\n throw new Error(`Bound value is of an unsupported type: ${val}`);\n }\n\n /** Binds the specified primitive value to the specified binder\n * @param binder Parameter Binder to bind to\n * @param val Primitive value to be bound. Must be of one of these types described here:\n * [ECSQL Binding types]($docs/learning/ECSQLParameterTypes)\n * @throws IModelError in case of errors\n */\n public static bindPrimitive(binder: ECSqlBinder, val: any): void {\n if (!ECSqlBindingHelper.tryBindPrimitiveTypes(binder, val))\n throw new IModelError(DbResult.BE_SQLITE_ERROR, `Binding value is of an unsupported primitive type: ${val}`);\n }\n\n /** Binds the specified object to the specified struct binder\n * @param binder Struct parameter binder to bind to\n * @param val Value to be bound. Must be an Object with members of the supported types\n * @throws IModelError in case of errors\n */\n public static bindStruct(binder: ECSqlBinder, val: object): void {\n if (val === null || val === undefined) {\n binder.bindNull();\n return;\n }\n\n for (const member of Object.entries(val)) {\n const memberName: string = member[0];\n const memberVal: any = member[1];\n ECSqlBindingHelper.bindValue(binder.bindMember(memberName), memberVal);\n }\n }\n\n /** Binds the specified array to the specified array binder\n * @param binder Array parameter binder to bind to\n * @param val Value to be bound. Must be an Array with elements of the supported types\n * @throws IModelError in case of errors\n */\n public static bindArray(binder: ECSqlBinder, val: any[]): void {\n if (val === null || val === undefined) {\n binder.bindNull();\n return;\n }\n\n for (const element of val) {\n ECSqlBindingHelper.bindValue(binder.addArrayElement(), element);\n }\n }\n\n /** tries to interpret the passed value as known leaf types (primitives and navigation values).\n * @returns Returns undefined if the value wasn't a primitive. DbResult if it was a primitive and was bound to the binder\n */\n private static tryBindPrimitiveTypes(binder: ECSqlBinder, val: any): boolean {\n if (val === undefined || val === null) {\n binder.bindNull();\n return true;\n }\n\n if (typeof (val) === \"number\") {\n if (Number.isInteger(val))\n binder.bindInteger(val);\n else\n binder.bindDouble(val);\n\n return true;\n }\n\n if (typeof (val) === \"boolean\") {\n binder.bindBoolean(val);\n return true;\n }\n\n if (typeof (val) === \"string\") {\n binder.bindString(val);\n return true;\n }\n\n if (ECSqlTypeHelper.isBlob(val)) {\n binder.bindBlob(val);\n return true;\n }\n\n if (ECSqlTypeHelper.isXYAndZ(val)) {\n binder.bindPoint3d(val);\n return true;\n }\n\n if (ECSqlTypeHelper.isXAndY(val)) {\n binder.bindPoint2d(val);\n return true;\n }\n\n if (ECSqlTypeHelper.isLowAndHighXYZ(val)) {\n binder.bindRange3d(val);\n return true;\n }\n\n if (ECSqlTypeHelper.isNavigationBindingValue(val)) {\n binder.bindNavigation(val);\n return true;\n }\n\n return false;\n }\n}\n\nclass ECSqlValueHelper {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public static getValue(ecsqlValue: ECSqlValue): any {\n if (ecsqlValue.isNull)\n return undefined;\n\n const dataType: ECSqlValueType = ecsqlValue.columnInfo.getType();\n switch (dataType) {\n case ECSqlValueType.Struct:\n return ECSqlValueHelper.getStruct(ecsqlValue);\n\n case ECSqlValueType.Navigation:\n return ecsqlValue.getNavigation();\n\n case ECSqlValueType.PrimitiveArray:\n case ECSqlValueType.StructArray:\n return ECSqlValueHelper.getArray(ecsqlValue);\n\n default:\n return ECSqlValueHelper.getPrimitiveValue(ecsqlValue);\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public static getStruct(ecsqlValue: ECSqlValue): any {\n if (ecsqlValue.isNull)\n return undefined;\n\n const structVal = {};\n const it = ecsqlValue.getStructIterator();\n try {\n for (const memberECSqlVal of it) {\n if (memberECSqlVal.isNull)\n continue;\n\n const memberName: string = ECJsNames.toJsName(memberECSqlVal.columnInfo.getPropertyName());\n const memberVal = ECSqlValueHelper.getValue(memberECSqlVal);\n Object.defineProperty(structVal, memberName, { enumerable: true, configurable: true, writable: true, value: memberVal });\n }\n } finally {\n }\n\n return structVal;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public static getArray(ecsqlValue: ECSqlValue): any[] {\n const arrayVal: any[] = [];\n const it = ecsqlValue.getArrayIterator();\n try {\n for (const elementECSqlVal of it) {\n const memberVal = ECSqlValueHelper.getValue(elementECSqlVal);\n arrayVal.push(memberVal);\n }\n } finally {\n }\n return arrayVal;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n private static getPrimitiveValue(ecsqlValue: ECSqlValue): any {\n if (ecsqlValue.isNull)\n return undefined;\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const colInfo: ECSqlColumnInfo = ecsqlValue.columnInfo;\n switch (colInfo.getType()) {\n case ECSqlValueType.Blob:\n return ecsqlValue.getBlob();\n case ECSqlValueType.Boolean:\n return ecsqlValue.getBoolean();\n case ECSqlValueType.DateTime:\n return ecsqlValue.getDateTime();\n case ECSqlValueType.Double:\n return ecsqlValue.getDouble();\n case ECSqlValueType.Geometry:\n return ecsqlValue.getGeometry();\n case ECSqlValueType.Guid:\n return ecsqlValue.getGuid();\n case ECSqlValueType.Id: {\n if (colInfo.isSystemProperty() && colInfo.getPropertyName().endsWith(\"ECClassId\"))\n return ecsqlValue.getClassNameForClassId();\n\n return ecsqlValue.getId();\n }\n case ECSqlValueType.Int:\n case ECSqlValueType.Int64:\n return ecsqlValue.getInteger();\n case ECSqlValueType.Point2d:\n return ecsqlValue.getXAndY();\n case ECSqlValueType.Point3d:\n return ecsqlValue.getXYAndZ();\n case ECSqlValueType.String:\n return ecsqlValue.getString();\n default:\n throw new IModelError(DbResult.BE_SQLITE_ERROR, `Unsupported type ${ecsqlValue.columnInfo.getType()} of the ECSQL Value`);\n }\n }\n\n public static queryClassName(ecdb: ECDb, classId: Id64String, tableSpace?: string): string {\n if (!tableSpace)\n tableSpace = \"main\";\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return ecdb.withPreparedStatement(`SELECT s.Name, c.Name FROM [${tableSpace}].meta.ECSchemaDef s, JOIN [${tableSpace}].meta.ECClassDef c ON s.ECInstanceId=c.SchemaId WHERE c.ECInstanceId=?`,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n (stmt: ECSqlStatement) => {\n stmt.bindId(1, classId);\n if (stmt.step() !== DbResult.BE_SQLITE_ROW)\n throw new IModelError(DbResult.BE_SQLITE_ERROR, `No class found with ECClassId ${classId} in table space ${tableSpace}.`);\n\n return `${stmt.getValue(0).getString()}.${stmt.getValue(1).getString()}`;\n });\n }\n}\n\nclass ECSqlTypeHelper {\n public static isBlob(val: any): val is Uint8Array { return val instanceof Uint8Array; }\n\n public static isXAndY(val: any): val is XAndY { return XYZ.isXAndY(val); }\n public static isXYAndZ(val: any): val is XYAndZ { return XYZ.isXYAndZ(val); }\n public static isLowAndHighXYZ(arg: any): arg is LowAndHighXYZ { return arg.low !== undefined && ECSqlTypeHelper.isXYAndZ(arg.low) && arg.high !== undefined && ECSqlTypeHelper.isXYAndZ(arg.high); }\n\n public static isNavigationBindingValue(val: any): val is NavigationBindingValue { return val.id !== undefined && typeof (val.id) === \"string\"; }\n}\n"]}
|