@itwin/core-frontend 5.10.0-dev.18 → 5.10.0-dev.20
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/BriefcaseConnection.d.ts.map +1 -1
- package/lib/cjs/BriefcaseConnection.js +1 -0
- package/lib/cjs/BriefcaseConnection.js.map +1 -1
- package/lib/cjs/IModelConnection.d.ts +39 -1
- package/lib/cjs/IModelConnection.d.ts.map +1 -1
- package/lib/cjs/IModelConnection.js +110 -0
- package/lib/cjs/IModelConnection.js.map +1 -1
- package/lib/esm/BriefcaseConnection.d.ts.map +1 -1
- package/lib/esm/BriefcaseConnection.js +1 -0
- package/lib/esm/BriefcaseConnection.js.map +1 -1
- package/lib/esm/IModelConnection.d.ts +39 -1
- package/lib/esm/IModelConnection.d.ts.map +1 -1
- package/lib/esm/IModelConnection.js +111 -1
- package/lib/esm/IModelConnection.js.map +1 -1
- package/lib/public/scripts/parse-imdl-worker.js +1 -1
- package/lib/workers/webpack/parse-imdl-worker.js +1 -1
- package/package.json +20 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BriefcaseConnection.d.ts","sourceRoot":"","sources":["../../src/BriefcaseConnection.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAU,OAAO,EAA2B,UAAU,EAAE,OAAO,EAAE,UAAU,EAAgB,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACxI,OAAO,EACL,wBAAwB,EAAE,cAAc,EAAE,mBAAmB,EACb,SAAS,EAAE,kBAAkB,EAAE,qBAAqB,EACrG,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAKtD;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,wBAAwB;IACx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,QAAQ,EAAE,MAAM,EAAE,QAAQ,GAAE,QAA6B,EAAE,IAAI,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAOzJ,2DAA2D;IAC3D,IAAW,QAAQ,IAAI,OAAO,CAAoC;IAElE;;;OAGG;IACU,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAanC,SAAS,CAAC,eAAe;IAKzB,2FAA2F;IAC9E,cAAc,IAAI,OAAO,CAAC,OAAO,CAAC;IAI/C;;;OAGG;IACU,WAAW,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI7D;;OAEG;IACU,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAI5C;;;;OAIG;IACU,WAAW,CAAC,OAAO,CAAC,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAoC/F;;;;OAIG;IACU,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAK3E;;OAEG;IACH,IAAW,YAAY,IAAI,qBAAqB,GAAG,SAAS,CAE3D;IAED;;;OAGG;IACU,wBAAwB,IAAI,OAAO,CAAC,OAAO,CAAC;IAIzD;;;;;OAKG;IACU,iBAAiB,IAAI,OAAO,CAAC,qBAAqB,CAAC;IAIhE;;OAEG;IACH,SAAgB,sBAAsB,4BAAiC,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI,EAAI;CAChG"}
|
|
@@ -291,6 +291,7 @@ class BriefcaseConnection extends IModelConnection_1.IModelConnection {
|
|
|
291
291
|
finally {
|
|
292
292
|
removeListeners.forEach((remove) => remove());
|
|
293
293
|
}
|
|
294
|
+
await this.invalidateSchemaViewIfChanged();
|
|
294
295
|
}
|
|
295
296
|
/** Create a changeset from local Txns and push to iModelHub. On success, clear Txn table.
|
|
296
297
|
* @param description The description for the changeset
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file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AAgB,EAAE,OAAO,EAAE,gBAAgB;YAC3C,kBAAkB,EAAE,CAAC,CAAC,OAAO,EAAE,WAAW;SAC3C,CAAC;QACF,IAAI,CAAC;YACH,IAAI,CAAC,SAAS,GAAG,MAAM,eAAM,CAAC,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;QAC7F,CAAC;gBAAS,CAAC;YACT,eAAe,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;QAChD,CAAC;IACH,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,WAAW,CAAC,WAAmB;QAC1C,IAAI,CAAC,eAAe,EAAE,CAAC;QACvB,OAAO,eAAM,CAAC,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;IAClE,CAAC;IAED;;OAEG;IACH,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC;IAC1C,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,wBAAwB;QACnC,OAAO,eAAM,CAAC,cAAc,CAAC,2BAA2B,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACrE,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,iBAAiB;QAC5B,OAAO,IAAI,CAAC,cAAc,CAAC,iBAAiB,EAAE,CAAC;IACjD,CAAC;IAED;;OAEG;IACa,sBAAsB,GAAG,IAAI,sBAAO,EAA0C,CAAC;CAChG;AApMD,kDAoMC","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 IModelConnection\n */\n\nimport { assert, BeEvent, CompressedId64Set, Guid, GuidString, Id64Set, Id64String, IModelStatus, OpenMode } from \"@itwin/core-bentley\";\nimport {\n BriefcaseConnectionProps, ChangesetIndex, ChangesetIndexAndId, getPullChangesIpcChannel, IModelError,\n PullChangesOptions as IpcAppPullChangesOptions, LockState, OpenBriefcaseProps, StandaloneOpenOptions,\n} from \"@itwin/core-common\";\nimport { BriefcaseTxns } from \"./BriefcaseTxns\";\nimport { GraphicalEditingScope } from \"./GraphicalEditingScope\";\nimport { IModelApp } from \"./IModelApp\";\nimport { IModelConnection } from \"./IModelConnection\";\nimport { IpcApp } from \"./IpcApp\";\nimport { disposeTileTreesForGeometricModels } from \"./tile/internal\";\nimport { Viewport } from \"./Viewport\";\n\n/**\n * Download progress information.\n * @public\n */\nexport interface DownloadProgressInfo {\n /** Bytes downloaded. */\n loaded: number;\n /** Total size of the download in bytes. */\n total: number;\n}\n\n/**\n * Called to show progress during a download.\n * @public\n */\nexport type OnDownloadProgress = (progress: DownloadProgressInfo) => void;\n\n/**\n * Partial interface of AbortSignal.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal\n * @beta\n */\nexport interface GenericAbortSignal {\n /** Add Listener for abort signal. */\n addEventListener: (type: \"abort\", listener: (this: GenericAbortSignal, ev: any) => any) => void;\n /** Remove Listener for abort signal. */\n removeEventListener: (type: \"abort\", listener: (this: GenericAbortSignal, ev: any) => any) => void;\n}\n\n/**\n * Options for pulling iModel changes.\n * @public\n */\nexport interface PullChangesOptions {\n /** Function called regularly to report progress of changes download. */\n downloadProgressCallback?: OnDownloadProgress;\n /** Interval for calling progress callback (in milliseconds). */\n progressInterval?: number;\n /** Signal for cancelling the download.\n * @beta\n */\n abortSignal?: GenericAbortSignal;\n}\n\n/** Keeps track of changes to models, buffering them until synchronization points.\n * While a GraphicalEditingScope is open, the changes are buffered until the scope exits, at which point they are processed.\n * Otherwise, the buffered changes are processed after undo/redo, commit, or pull+merge changes.\n */\nclass ModelChangeMonitor {\n private _editingScope?: GraphicalEditingScope;\n private readonly _briefcase: BriefcaseConnection;\n private readonly _deletedModels = new Set<string>();\n private readonly _modelIdToGuid = new Map<string, string>();\n private readonly _removals: VoidFunction[] = [];\n\n public constructor(briefcase: BriefcaseConnection) {\n this._briefcase = briefcase;\n\n // Buffer updated geometry guids.\n this._removals.push(briefcase.txns.onModelGeometryChanged.addListener((changes) => {\n for (const change of changes) {\n this._deletedModels.delete(change.id);\n this._modelIdToGuid.set(change.id, change.guid);\n }\n }));\n\n // Buffer deletions of models.\n this._removals.push(briefcase.txns.onModelsChanged.addListener((changes) => {\n if (changes.deleted) {\n for (const id of CompressedId64Set.iterable(changes.deleted)) {\n this._modelIdToGuid.delete(id);\n this._deletedModels.add(id);\n }\n }\n }));\n\n // Outside of an editing scope, we want to update viewport contents after commit, undo/redo, or merging changes.\n const maybeProcess = async () => {\n if (this.editingScope)\n return;\n\n const modelIds = Array.from(this._modelIdToGuid.keys());\n if (modelIds.length > 0)\n await IModelApp.tileAdmin.purgeTileTrees(this._briefcase, modelIds);\n\n this.processBuffered();\n };\n\n this._removals.push(briefcase.txns.onCommitted.addListener(maybeProcess));\n this._removals.push(briefcase.txns.onReplayedExternalTxns.addListener(maybeProcess));\n this._removals.push(briefcase.txns.onAfterUndoRedo.addListener(maybeProcess));\n this._removals.push(briefcase.txns.onChangesPulled.addListener(maybeProcess));\n }\n\n public async close(): Promise<void> {\n for (const removal of this._removals)\n removal();\n\n this._removals.length = 0;\n\n if (this._editingScope) {\n await this._editingScope.exit();\n this._editingScope = undefined;\n }\n }\n\n public get editingScope(): GraphicalEditingScope | undefined {\n return this._editingScope;\n }\n\n public async enterEditingScope(): Promise<GraphicalEditingScope> {\n if (this._editingScope)\n throw new Error(\"Cannot create an editing scope for an iModel that already has one\");\n\n this._editingScope = await GraphicalEditingScope.enter(this._briefcase);\n\n const removeGeomListener = this._editingScope.onGeometryChanges.addListener((changes) => {\n const modelIds = [];\n for (const change of changes)\n modelIds.push(change.id);\n\n this.invalidateScenes(modelIds);\n });\n\n this._editingScope.onExited.addOnce((scope) => {\n assert(scope === this._editingScope);\n this._editingScope = undefined;\n removeGeomListener();\n this.processBuffered();\n });\n\n return this._editingScope;\n }\n\n private processBuffered(): void {\n const models = this._briefcase.models;\n for (const [id, guid] of this._modelIdToGuid) {\n const model = models.getLoaded(id)?.asGeometricModel;\n if (model)\n model.geometryGuid = guid;\n }\n\n const modelIds = new Set<string>(this._modelIdToGuid.keys());\n for (const deleted of this._deletedModels) {\n modelIds.add(deleted);\n models.unload(deleted);\n }\n\n this.invalidateScenes(modelIds);\n disposeTileTreesForGeometricModels(modelIds, this._briefcase);\n\n this._briefcase.onBufferedModelChanges.raiseEvent(modelIds);\n\n this._modelIdToGuid.clear();\n this._deletedModels.clear();\n }\n\n private invalidateScenes(changedModels: Iterable<Id64String>): void {\n for (const user of IModelApp.tileAdmin.tileUsers) {\n if (user instanceof Viewport && user.iModel === this._briefcase) {\n for (const modelId of changedModels) {\n if (user.view.viewsModel(modelId)) {\n user.invalidateScene();\n user.setFeatureOverrideProviderChanged();\n break;\n }\n }\n }\n }\n }\n}\n\n/**\n * Provides access to lock information in the iModel.\n * @see [[BriefcaseConnection.locks]]\n * @alpha\n */\nexport interface LockService {\n /** Get all elements with exclusive locks owned by other briefcases. */\n getExclusiveForeignLocks(): Promise<Id64Set>;\n /** Get all elements with shared locks owned by other briefcases. */\n getSharedForeignLocks(): Promise<Id64Set>;\n /** Check whether it's possible to acquire a lock for the element. */\n checkElementLockAvailability(elementId: Id64String, lock: LockState): Promise<boolean>;\n}\n\n/** Function for creating a [[LockService]] for a [[BriefcaseConnection]].\n * @alpha\n */\nexport type LockServiceFactory = (iModel: BriefcaseConnection) => Promise<LockService>;\n\n/** Settings that can be used to control the behavior of [[Tool]]s that modify a [[BriefcaseConnection]].\n * For example, tools that want to create new elements can consult the briefcase's editor tool settings to\n * determine into which model and category to insert the elements.\n * Specialized tools are free to ignore these settings.\n * @see [[BriefcaseConnection.editorToolSettings]] to query or modify the current settings for a briefcase.\n * @see [CreateElementTool]($editor-frontend) for an example of a tool that uses these settings.\n * @beta\n */\nexport class BriefcaseEditorToolSettings {\n private _category?: Id64String;\n private _model?: Id64String;\n\n /** An event raised just after the default [[category]] is changed. */\n public readonly onCategoryChanged = new BeEvent<(previousCategory: Id64String | undefined) => void>();\n\n /** An event raised just after the default [[model]] is changed. */\n public readonly onModelChanged = new BeEvent<(previousModel: Id64String | undefined) => void>();\n\n /** The [Category]($backend) into which new elements should be inserted by default.\n * Specialized tools are free to ignore this setting and instead use their own logic to select an appropriate category.\n * @see [[onCategoryChanged]] to be notified when this property is modified.\n * @see [CreateElementTool.targetCategory]($editor-frontend) for an example of a tool that uses this setting.\n */\n public get category(): Id64String | undefined {\n return this._category;\n }\n public set category(category: Id64String | undefined) {\n const previousCategory = this.category;\n if (category !== this.category) {\n this._category = category;\n this.onCategoryChanged.raiseEvent(previousCategory);\n }\n }\n\n /** The [Model]($backend) into which new elements should be inserted by default.\n * Specialized tools are free to ignore this setting and instead use their own logic to select an appropriate model.\n * @see [[onModelChanged]] to be notified when this property is modified.\n * @see [CreateElementTool.targetModelId]($editor-frontend) for an example of a tool that uses this setting.\n */\n public get model(): Id64String | undefined {\n return this._model;\n }\n public set model(model: Id64String | undefined) {\n const previousModel = this.model;\n if (model !== this.model) {\n this._model = model;\n this.onModelChanged.raiseEvent(previousModel);\n }\n }\n}\n\n/** A connection to an editable briefcase on the backend. This class uses [Ipc]($docs/learning/IpcInterface.md) to communicate\n * to the backend and may only be used by [[IpcApp]]s.\n * @public\n */\nexport class BriefcaseConnection extends IModelConnection {\n protected _isClosed?: boolean;\n private readonly _modelsMonitor: ModelChangeMonitor;\n private _locks?: LockService;\n\n /** The ID of the briefcase.\n * @beta\n */\n public readonly briefcaseId?: number;\n\n /** Default settings that can be used to control the behavior of [[Tool]]s that modify this briefcase.\n * @beta\n */\n public readonly editorToolSettings = new BriefcaseEditorToolSettings();\n\n /** Manages local changes to the briefcase via [Txns]($docs/learning/InteractiveEditing.md). */\n public readonly txns: BriefcaseTxns;\n\n /** Information about locks held on this iModel.\n * @note This is intended to be used by tools and other UI elements, to provide information about the current lock state. Implementations are expected to cache lock information and so may not reflect changes to locks immediately.\n * @alpha\n */\n public get locks(): LockService | undefined { return this._locks; }\n\n public override isBriefcaseConnection(): this is BriefcaseConnection { return true; }\n\n /** The Guid that identifies the iTwin that owns this iModel. */\n public override get iTwinId(): GuidString { return super.iTwinId ?? Guid.empty; } // GuidString | undefined for IModelConnection, but required for BriefcaseConnection\n\n /** The Guid that identifies this iModel. */\n public override get iModelId(): GuidString { return super.iModelId ?? Guid.empty; } // GuidString | undefined for IModelConnection, but required for BriefcaseConnection\n\n protected constructor(props: BriefcaseConnectionProps, openMode: OpenMode) {\n super(props);\n this._openMode = openMode;\n this.briefcaseId = props.briefcaseId;\n this.txns = new BriefcaseTxns(this);\n this._modelsMonitor = new ModelChangeMonitor(this);\n if (OpenMode.ReadWrite === this._openMode)\n this.txns.onAfterUndoRedo.addListener(async () => { await IModelApp.toolAdmin.restartPrimitiveTool(); });\n\n this.categories.cache.attachToBriefcase(this);\n }\n\n /** Open a BriefcaseConnection to a [BriefcaseDb]($backend). */\n public static async openFile(briefcaseProps: OpenBriefcaseProps): Promise<BriefcaseConnection>;\n\n /** Open a BriefcaseConnection to a [BriefcaseDb]($backend).\n * @alpha\n */\n public static async openFile(briefcaseProps: OpenBriefcaseProps, lockServiceFactory?: LockServiceFactory): Promise<BriefcaseConnection>\n\n public static async openFile(briefcaseProps: OpenBriefcaseProps, lockServiceFactory?: LockServiceFactory): Promise<BriefcaseConnection> {\n const iModelProps = await IpcApp.appFunctionIpc.openBriefcase(briefcaseProps);\n const connection = new this({ ...briefcaseProps, ...iModelProps }, briefcaseProps.readonly ? OpenMode.Readonly : OpenMode.ReadWrite);\n if (lockServiceFactory)\n connection._locks = await lockServiceFactory(connection);\n\n IModelConnection.onOpen.raiseEvent(connection);\n return connection;\n }\n\n /** Open a BriefcaseConnection to a [StandaloneDb]($backend)\n * @note StandaloneDbs, by definition, may not push or pull changes. Attempting to do so will throw exceptions.\n */\n public static async openStandalone(filePath: string, openMode: OpenMode = OpenMode.ReadWrite, opts?: StandaloneOpenOptions): Promise<BriefcaseConnection> {\n const openResponse = await IpcApp.appFunctionIpc.openStandalone(filePath, openMode, opts);\n const connection = new this(openResponse, openMode);\n IModelConnection.onOpen.raiseEvent(connection);\n return connection;\n }\n\n /** Returns `true` if [[close]] has already been called. */\n public get isClosed(): boolean { return this._isClosed === true; }\n\n /**\n * Close this BriefcaseConnection.\n * @note make sure to call [[saveChanges]] before calling this method. Unsaved local changes are abandoned.\n */\n public async close(): Promise<void> {\n if (this.isClosed)\n return;\n\n await this._modelsMonitor.close();\n\n this.beforeClose();\n this.txns[Symbol.dispose]();\n\n this._isClosed = true;\n await IpcApp.appFunctionIpc.closeIModel(this._fileKey);\n }\n\n protected requireTimeline() {\n if (this.iTwinId === Guid.empty)\n throw new IModelError(IModelStatus.WrongIModel, \"iModel has no timeline\");\n }\n\n /** Query if there are any pending Txns in this briefcase that are waiting to be pushed. */\n public async hasPendingTxns(): Promise<boolean> { // eslint-disable-line @itwin/prefer-get\n return this.txns.hasPendingTxns();\n }\n\n /** Commit pending changes to this briefcase.\n * @param description Optional description of the changes.\n * @deprecated in 5.9.0 - will not be removed until after 2027-05-04. Use methods on EditCommand instead.\n */\n public async saveChanges(description?: string): Promise<void> {\n await IpcApp.appFunctionIpc.saveChanges(this.key, description); // eslint-disable-line @typescript-eslint/no-deprecated\n }\n\n /** Abandon pending changes to this briefcase.\n * @deprecated in 5.9.0 - will not be removed until after 2027-05-04. Use methods on EditCommand instead.\n */\n public async abandonChanges(): Promise<void> {\n await IpcApp.appFunctionIpc.abandonChanges(this.key); // eslint-disable-line @typescript-eslint/no-deprecated\n }\n\n /** Pull (and potentially merge if there are local changes) up to a specified changeset from iModelHub into this briefcase\n * @param toIndex The changeset index to pull changes to. If `undefined`, pull all changes.\n * @param options Options for pulling changes.\n * @see [[BriefcaseTxns.onChangesPulled]] for the event dispatched after changes are pulled.\n */\n public async pullChanges(toIndex?: ChangesetIndex, options?: PullChangesOptions): Promise<void> {\n const removeListeners: VoidFunction[] = [];\n const shouldReportProgress = !!options?.downloadProgressCallback;\n\n if (shouldReportProgress) {\n const handleProgress = (_evt: Event, data: { loaded: number, total: number }) => {\n options?.downloadProgressCallback?.(data);\n };\n\n const removeProgressListener = IpcApp.addListener(\n getPullChangesIpcChannel(this.iModelId),\n handleProgress,\n );\n removeListeners.push(removeProgressListener);\n }\n\n if (options?.abortSignal) {\n const abort = () => void IpcApp.appFunctionIpc.cancelPullChangesRequest(this.key);\n options?.abortSignal.addEventListener(\"abort\", abort);\n removeListeners.push(() => options?.abortSignal?.removeEventListener(\"abort\", abort));\n }\n\n this.requireTimeline();\n const ipcAppOptions: IpcAppPullChangesOptions = {\n reportProgress: shouldReportProgress,\n progressInterval: options?.progressInterval,\n enableCancellation: !!options?.abortSignal,\n };\n try {\n this.changeset = await IpcApp.appFunctionIpc.pullChanges(this.key, toIndex, ipcAppOptions);\n } finally {\n removeListeners.forEach((remove) => remove());\n }\n }\n\n /** Create a changeset from local Txns and push to iModelHub. On success, clear Txn table.\n * @param description The description for the changeset\n * @returns the changesetId of the pushed changes\n * @see [[BriefcaseTxns.onChangesPushed]] for the event dispatched after changes are pushed.\n */\n public async pushChanges(description: string): Promise<ChangesetIndexAndId> {\n this.requireTimeline();\n return IpcApp.appFunctionIpc.pushChanges(this.key, description);\n }\n\n /** The current graphical editing scope, if one is in progress.\n * @see [[enterEditingScope]] to begin graphical editing.\n */\n public get editingScope(): GraphicalEditingScope | undefined {\n return this._modelsMonitor.editingScope;\n }\n\n /** Return whether graphical editing is supported for this briefcase. It is not supported if the briefcase is read-only, or the briefcase contains a version of\n * the BisCore ECSchema older than v0.1.11.\n * @see [[enterEditingScope]] to enable graphical editing.\n */\n public async supportsGraphicalEditing(): Promise<boolean> {\n return IpcApp.appFunctionIpc.isGraphicalEditingSupported(this.key);\n }\n\n /** Begin a new graphical editing scope.\n * @throws Error if an editing scope already exists or one could not be created.\n * @see [[GraphicalEditingScope.exit]] to exit the scope.\n * @see [[supportsGraphicalEditing]] to determine whether this method should be expected to succeed.\n * @see [[editingScope]] to obtain the current editing scope, if one is in progress.\n */\n public async enterEditingScope(): Promise<GraphicalEditingScope> {\n return this._modelsMonitor.enterEditingScope();\n }\n\n /** Strictly for tests - dispatched from ModelChangeMonitor.processBuffered.\n * @internal\n */\n public readonly onBufferedModelChanges = new BeEvent<(changedModelIds: Set<string>) => void>();\n}\n"]}
|
|
1
|
+
{"version":3,"file":"BriefcaseConnection.js","sourceRoot":"","sources":["../../src/BriefcaseConnection.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAwI;AACxI,oDAG4B;AAC5B,mDAAgD;AAChD,mEAAgE;AAChE,2CAAwC;AACxC,yDAAsD;AACtD,qCAAkC;AAClC,8CAAqE;AACrE,yCAAsC;AA8CtC;;;GAGG;AACH,MAAM,kBAAkB;IACd,aAAa,CAAyB;IAC7B,UAAU,CAAsB;IAChC,cAAc,GAAG,IAAI,GAAG,EAAU,CAAC;IACnC,cAAc,GAAG,IAAI,GAAG,EAAkB,CAAC;IAC3C,SAAS,GAAmB,EAAE,CAAC;IAEhD,YAAmB,SAA8B;QAC/C,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAE5B,iCAAiC;QACjC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,sBAAsB,CAAC,WAAW,CAAC,CAAC,OAAO,EAAE,EAAE;YAChF,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;gBAC7B,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;gBACtC,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;YAClD,CAAC;QACH,CAAC,CAAC,CAAC,CAAC;QAEJ,8BAA8B;QAC9B,IAAI,CAAC,SAAS,CAAC,IAAI,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AC;IAED;;OAEG;IACa,sBAAsB,GAAG,IAAI,sBAAO,EAA0C,CAAC;CAChG;AArMD,kDAqMC","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 IModelConnection\n */\n\nimport { assert, BeEvent, CompressedId64Set, Guid, GuidString, Id64Set, Id64String, IModelStatus, OpenMode } from \"@itwin/core-bentley\";\nimport {\n BriefcaseConnectionProps, ChangesetIndex, ChangesetIndexAndId, getPullChangesIpcChannel, IModelError,\n PullChangesOptions as IpcAppPullChangesOptions, LockState, OpenBriefcaseProps, StandaloneOpenOptions,\n} from \"@itwin/core-common\";\nimport { BriefcaseTxns } from \"./BriefcaseTxns\";\nimport { GraphicalEditingScope } from \"./GraphicalEditingScope\";\nimport { IModelApp } from \"./IModelApp\";\nimport { IModelConnection } from \"./IModelConnection\";\nimport { IpcApp } from \"./IpcApp\";\nimport { disposeTileTreesForGeometricModels } from \"./tile/internal\";\nimport { Viewport } from \"./Viewport\";\n\n/**\n * Download progress information.\n * @public\n */\nexport interface DownloadProgressInfo {\n /** Bytes downloaded. */\n loaded: number;\n /** Total size of the download in bytes. */\n total: number;\n}\n\n/**\n * Called to show progress during a download.\n * @public\n */\nexport type OnDownloadProgress = (progress: DownloadProgressInfo) => void;\n\n/**\n * Partial interface of AbortSignal.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal\n * @beta\n */\nexport interface GenericAbortSignal {\n /** Add Listener for abort signal. */\n addEventListener: (type: \"abort\", listener: (this: GenericAbortSignal, ev: any) => any) => void;\n /** Remove Listener for abort signal. */\n removeEventListener: (type: \"abort\", listener: (this: GenericAbortSignal, ev: any) => any) => void;\n}\n\n/**\n * Options for pulling iModel changes.\n * @public\n */\nexport interface PullChangesOptions {\n /** Function called regularly to report progress of changes download. */\n downloadProgressCallback?: OnDownloadProgress;\n /** Interval for calling progress callback (in milliseconds). */\n progressInterval?: number;\n /** Signal for cancelling the download.\n * @beta\n */\n abortSignal?: GenericAbortSignal;\n}\n\n/** Keeps track of changes to models, buffering them until synchronization points.\n * While a GraphicalEditingScope is open, the changes are buffered until the scope exits, at which point they are processed.\n * Otherwise, the buffered changes are processed after undo/redo, commit, or pull+merge changes.\n */\nclass ModelChangeMonitor {\n private _editingScope?: GraphicalEditingScope;\n private readonly _briefcase: BriefcaseConnection;\n private readonly _deletedModels = new Set<string>();\n private readonly _modelIdToGuid = new Map<string, string>();\n private readonly _removals: VoidFunction[] = [];\n\n public constructor(briefcase: BriefcaseConnection) {\n this._briefcase = briefcase;\n\n // Buffer updated geometry guids.\n this._removals.push(briefcase.txns.onModelGeometryChanged.addListener((changes) => {\n for (const change of changes) {\n this._deletedModels.delete(change.id);\n this._modelIdToGuid.set(change.id, change.guid);\n }\n }));\n\n // Buffer deletions of models.\n this._removals.push(briefcase.txns.onModelsChanged.addListener((changes) => {\n if (changes.deleted) {\n for (const id of CompressedId64Set.iterable(changes.deleted)) {\n this._modelIdToGuid.delete(id);\n this._deletedModels.add(id);\n }\n }\n }));\n\n // Outside of an editing scope, we want to update viewport contents after commit, undo/redo, or merging changes.\n const maybeProcess = async () => {\n if (this.editingScope)\n return;\n\n const modelIds = Array.from(this._modelIdToGuid.keys());\n if (modelIds.length > 0)\n await IModelApp.tileAdmin.purgeTileTrees(this._briefcase, modelIds);\n\n this.processBuffered();\n };\n\n this._removals.push(briefcase.txns.onCommitted.addListener(maybeProcess));\n this._removals.push(briefcase.txns.onReplayedExternalTxns.addListener(maybeProcess));\n this._removals.push(briefcase.txns.onAfterUndoRedo.addListener(maybeProcess));\n this._removals.push(briefcase.txns.onChangesPulled.addListener(maybeProcess));\n }\n\n public async close(): Promise<void> {\n for (const removal of this._removals)\n removal();\n\n this._removals.length = 0;\n\n if (this._editingScope) {\n await this._editingScope.exit();\n this._editingScope = undefined;\n }\n }\n\n public get editingScope(): GraphicalEditingScope | undefined {\n return this._editingScope;\n }\n\n public async enterEditingScope(): Promise<GraphicalEditingScope> {\n if (this._editingScope)\n throw new Error(\"Cannot create an editing scope for an iModel that already has one\");\n\n this._editingScope = await GraphicalEditingScope.enter(this._briefcase);\n\n const removeGeomListener = this._editingScope.onGeometryChanges.addListener((changes) => {\n const modelIds = [];\n for (const change of changes)\n modelIds.push(change.id);\n\n this.invalidateScenes(modelIds);\n });\n\n this._editingScope.onExited.addOnce((scope) => {\n assert(scope === this._editingScope);\n this._editingScope = undefined;\n removeGeomListener();\n this.processBuffered();\n });\n\n return this._editingScope;\n }\n\n private processBuffered(): void {\n const models = this._briefcase.models;\n for (const [id, guid] of this._modelIdToGuid) {\n const model = models.getLoaded(id)?.asGeometricModel;\n if (model)\n model.geometryGuid = guid;\n }\n\n const modelIds = new Set<string>(this._modelIdToGuid.keys());\n for (const deleted of this._deletedModels) {\n modelIds.add(deleted);\n models.unload(deleted);\n }\n\n this.invalidateScenes(modelIds);\n disposeTileTreesForGeometricModels(modelIds, this._briefcase);\n\n this._briefcase.onBufferedModelChanges.raiseEvent(modelIds);\n\n this._modelIdToGuid.clear();\n this._deletedModels.clear();\n }\n\n private invalidateScenes(changedModels: Iterable<Id64String>): void {\n for (const user of IModelApp.tileAdmin.tileUsers) {\n if (user instanceof Viewport && user.iModel === this._briefcase) {\n for (const modelId of changedModels) {\n if (user.view.viewsModel(modelId)) {\n user.invalidateScene();\n user.setFeatureOverrideProviderChanged();\n break;\n }\n }\n }\n }\n }\n}\n\n/**\n * Provides access to lock information in the iModel.\n * @see [[BriefcaseConnection.locks]]\n * @alpha\n */\nexport interface LockService {\n /** Get all elements with exclusive locks owned by other briefcases. */\n getExclusiveForeignLocks(): Promise<Id64Set>;\n /** Get all elements with shared locks owned by other briefcases. */\n getSharedForeignLocks(): Promise<Id64Set>;\n /** Check whether it's possible to acquire a lock for the element. */\n checkElementLockAvailability(elementId: Id64String, lock: LockState): Promise<boolean>;\n}\n\n/** Function for creating a [[LockService]] for a [[BriefcaseConnection]].\n * @alpha\n */\nexport type LockServiceFactory = (iModel: BriefcaseConnection) => Promise<LockService>;\n\n/** Settings that can be used to control the behavior of [[Tool]]s that modify a [[BriefcaseConnection]].\n * For example, tools that want to create new elements can consult the briefcase's editor tool settings to\n * determine into which model and category to insert the elements.\n * Specialized tools are free to ignore these settings.\n * @see [[BriefcaseConnection.editorToolSettings]] to query or modify the current settings for a briefcase.\n * @see [CreateElementTool]($editor-frontend) for an example of a tool that uses these settings.\n * @beta\n */\nexport class BriefcaseEditorToolSettings {\n private _category?: Id64String;\n private _model?: Id64String;\n\n /** An event raised just after the default [[category]] is changed. */\n public readonly onCategoryChanged = new BeEvent<(previousCategory: Id64String | undefined) => void>();\n\n /** An event raised just after the default [[model]] is changed. */\n public readonly onModelChanged = new BeEvent<(previousModel: Id64String | undefined) => void>();\n\n /** The [Category]($backend) into which new elements should be inserted by default.\n * Specialized tools are free to ignore this setting and instead use their own logic to select an appropriate category.\n * @see [[onCategoryChanged]] to be notified when this property is modified.\n * @see [CreateElementTool.targetCategory]($editor-frontend) for an example of a tool that uses this setting.\n */\n public get category(): Id64String | undefined {\n return this._category;\n }\n public set category(category: Id64String | undefined) {\n const previousCategory = this.category;\n if (category !== this.category) {\n this._category = category;\n this.onCategoryChanged.raiseEvent(previousCategory);\n }\n }\n\n /** The [Model]($backend) into which new elements should be inserted by default.\n * Specialized tools are free to ignore this setting and instead use their own logic to select an appropriate model.\n * @see [[onModelChanged]] to be notified when this property is modified.\n * @see [CreateElementTool.targetModelId]($editor-frontend) for an example of a tool that uses this setting.\n */\n public get model(): Id64String | undefined {\n return this._model;\n }\n public set model(model: Id64String | undefined) {\n const previousModel = this.model;\n if (model !== this.model) {\n this._model = model;\n this.onModelChanged.raiseEvent(previousModel);\n }\n }\n}\n\n/** A connection to an editable briefcase on the backend. This class uses [Ipc]($docs/learning/IpcInterface.md) to communicate\n * to the backend and may only be used by [[IpcApp]]s.\n * @public\n */\nexport class BriefcaseConnection extends IModelConnection {\n protected _isClosed?: boolean;\n private readonly _modelsMonitor: ModelChangeMonitor;\n private _locks?: LockService;\n\n /** The ID of the briefcase.\n * @beta\n */\n public readonly briefcaseId?: number;\n\n /** Default settings that can be used to control the behavior of [[Tool]]s that modify this briefcase.\n * @beta\n */\n public readonly editorToolSettings = new BriefcaseEditorToolSettings();\n\n /** Manages local changes to the briefcase via [Txns]($docs/learning/InteractiveEditing.md). */\n public readonly txns: BriefcaseTxns;\n\n /** Information about locks held on this iModel.\n * @note This is intended to be used by tools and other UI elements, to provide information about the current lock state. Implementations are expected to cache lock information and so may not reflect changes to locks immediately.\n * @alpha\n */\n public get locks(): LockService | undefined { return this._locks; }\n\n public override isBriefcaseConnection(): this is BriefcaseConnection { return true; }\n\n /** The Guid that identifies the iTwin that owns this iModel. */\n public override get iTwinId(): GuidString { return super.iTwinId ?? Guid.empty; } // GuidString | undefined for IModelConnection, but required for BriefcaseConnection\n\n /** The Guid that identifies this iModel. */\n public override get iModelId(): GuidString { return super.iModelId ?? Guid.empty; } // GuidString | undefined for IModelConnection, but required for BriefcaseConnection\n\n protected constructor(props: BriefcaseConnectionProps, openMode: OpenMode) {\n super(props);\n this._openMode = openMode;\n this.briefcaseId = props.briefcaseId;\n this.txns = new BriefcaseTxns(this);\n this._modelsMonitor = new ModelChangeMonitor(this);\n if (OpenMode.ReadWrite === this._openMode)\n this.txns.onAfterUndoRedo.addListener(async () => { await IModelApp.toolAdmin.restartPrimitiveTool(); });\n\n this.categories.cache.attachToBriefcase(this);\n }\n\n /** Open a BriefcaseConnection to a [BriefcaseDb]($backend). */\n public static async openFile(briefcaseProps: OpenBriefcaseProps): Promise<BriefcaseConnection>;\n\n /** Open a BriefcaseConnection to a [BriefcaseDb]($backend).\n * @alpha\n */\n public static async openFile(briefcaseProps: OpenBriefcaseProps, lockServiceFactory?: LockServiceFactory): Promise<BriefcaseConnection>\n\n public static async openFile(briefcaseProps: OpenBriefcaseProps, lockServiceFactory?: LockServiceFactory): Promise<BriefcaseConnection> {\n const iModelProps = await IpcApp.appFunctionIpc.openBriefcase(briefcaseProps);\n const connection = new this({ ...briefcaseProps, ...iModelProps }, briefcaseProps.readonly ? OpenMode.Readonly : OpenMode.ReadWrite);\n if (lockServiceFactory)\n connection._locks = await lockServiceFactory(connection);\n\n IModelConnection.onOpen.raiseEvent(connection);\n return connection;\n }\n\n /** Open a BriefcaseConnection to a [StandaloneDb]($backend)\n * @note StandaloneDbs, by definition, may not push or pull changes. Attempting to do so will throw exceptions.\n */\n public static async openStandalone(filePath: string, openMode: OpenMode = OpenMode.ReadWrite, opts?: StandaloneOpenOptions): Promise<BriefcaseConnection> {\n const openResponse = await IpcApp.appFunctionIpc.openStandalone(filePath, openMode, opts);\n const connection = new this(openResponse, openMode);\n IModelConnection.onOpen.raiseEvent(connection);\n return connection;\n }\n\n /** Returns `true` if [[close]] has already been called. */\n public get isClosed(): boolean { return this._isClosed === true; }\n\n /**\n * Close this BriefcaseConnection.\n * @note make sure to call [[saveChanges]] before calling this method. Unsaved local changes are abandoned.\n */\n public async close(): Promise<void> {\n if (this.isClosed)\n return;\n\n await this._modelsMonitor.close();\n\n this.beforeClose();\n this.txns[Symbol.dispose]();\n\n this._isClosed = true;\n await IpcApp.appFunctionIpc.closeIModel(this._fileKey);\n }\n\n protected requireTimeline() {\n if (this.iTwinId === Guid.empty)\n throw new IModelError(IModelStatus.WrongIModel, \"iModel has no timeline\");\n }\n\n /** Query if there are any pending Txns in this briefcase that are waiting to be pushed. */\n public async hasPendingTxns(): Promise<boolean> { // eslint-disable-line @itwin/prefer-get\n return this.txns.hasPendingTxns();\n }\n\n /** Commit pending changes to this briefcase.\n * @param description Optional description of the changes.\n * @deprecated in 5.9.0 - will not be removed until after 2027-05-04. Use methods on EditCommand instead.\n */\n public async saveChanges(description?: string): Promise<void> {\n await IpcApp.appFunctionIpc.saveChanges(this.key, description); // eslint-disable-line @typescript-eslint/no-deprecated\n }\n\n /** Abandon pending changes to this briefcase.\n * @deprecated in 5.9.0 - will not be removed until after 2027-05-04. Use methods on EditCommand instead.\n */\n public async abandonChanges(): Promise<void> {\n await IpcApp.appFunctionIpc.abandonChanges(this.key); // eslint-disable-line @typescript-eslint/no-deprecated\n }\n\n /** Pull (and potentially merge if there are local changes) up to a specified changeset from iModelHub into this briefcase\n * @param toIndex The changeset index to pull changes to. If `undefined`, pull all changes.\n * @param options Options for pulling changes.\n * @see [[BriefcaseTxns.onChangesPulled]] for the event dispatched after changes are pulled.\n */\n public async pullChanges(toIndex?: ChangesetIndex, options?: PullChangesOptions): Promise<void> {\n const removeListeners: VoidFunction[] = [];\n const shouldReportProgress = !!options?.downloadProgressCallback;\n\n if (shouldReportProgress) {\n const handleProgress = (_evt: Event, data: { loaded: number, total: number }) => {\n options?.downloadProgressCallback?.(data);\n };\n\n const removeProgressListener = IpcApp.addListener(\n getPullChangesIpcChannel(this.iModelId),\n handleProgress,\n );\n removeListeners.push(removeProgressListener);\n }\n\n if (options?.abortSignal) {\n const abort = () => void IpcApp.appFunctionIpc.cancelPullChangesRequest(this.key);\n options?.abortSignal.addEventListener(\"abort\", abort);\n removeListeners.push(() => options?.abortSignal?.removeEventListener(\"abort\", abort));\n }\n\n this.requireTimeline();\n const ipcAppOptions: IpcAppPullChangesOptions = {\n reportProgress: shouldReportProgress,\n progressInterval: options?.progressInterval,\n enableCancellation: !!options?.abortSignal,\n };\n try {\n this.changeset = await IpcApp.appFunctionIpc.pullChanges(this.key, toIndex, ipcAppOptions);\n } finally {\n removeListeners.forEach((remove) => remove());\n }\n await this.invalidateSchemaViewIfChanged();\n }\n\n /** Create a changeset from local Txns and push to iModelHub. On success, clear Txn table.\n * @param description The description for the changeset\n * @returns the changesetId of the pushed changes\n * @see [[BriefcaseTxns.onChangesPushed]] for the event dispatched after changes are pushed.\n */\n public async pushChanges(description: string): Promise<ChangesetIndexAndId> {\n this.requireTimeline();\n return IpcApp.appFunctionIpc.pushChanges(this.key, description);\n }\n\n /** The current graphical editing scope, if one is in progress.\n * @see [[enterEditingScope]] to begin graphical editing.\n */\n public get editingScope(): GraphicalEditingScope | undefined {\n return this._modelsMonitor.editingScope;\n }\n\n /** Return whether graphical editing is supported for this briefcase. It is not supported if the briefcase is read-only, or the briefcase contains a version of\n * the BisCore ECSchema older than v0.1.11.\n * @see [[enterEditingScope]] to enable graphical editing.\n */\n public async supportsGraphicalEditing(): Promise<boolean> {\n return IpcApp.appFunctionIpc.isGraphicalEditingSupported(this.key);\n }\n\n /** Begin a new graphical editing scope.\n * @throws Error if an editing scope already exists or one could not be created.\n * @see [[GraphicalEditingScope.exit]] to exit the scope.\n * @see [[supportsGraphicalEditing]] to determine whether this method should be expected to succeed.\n * @see [[editingScope]] to obtain the current editing scope, if one is in progress.\n */\n public async enterEditingScope(): Promise<GraphicalEditingScope> {\n return this._modelsMonitor.enterEditingScope();\n }\n\n /** Strictly for tests - dispatched from ModelChangeMonitor.processBuffered.\n * @internal\n */\n public readonly onBufferedModelChanges = new BeEvent<(changedModelIds: Set<string>) => void>();\n}\n"]}
|
|
@@ -15,7 +15,7 @@ import { SubCategoriesCache } from "./SubCategoriesCache";
|
|
|
15
15
|
import { Tiles } from "./Tiles";
|
|
16
16
|
import { ViewState } from "./ViewState";
|
|
17
17
|
import { _requestSnap } from "./common/internal/Symbols";
|
|
18
|
-
import { SchemaContext } from "@itwin/ecschema-metadata";
|
|
18
|
+
import { SchemaContext, SchemaView } from "@itwin/ecschema-metadata";
|
|
19
19
|
/** The properties for creating a [Blank IModelConnection]($docs/learning/frontend/BlankConnection)
|
|
20
20
|
* @public
|
|
21
21
|
*/
|
|
@@ -118,6 +118,7 @@ export declare abstract class IModelConnection extends IModel {
|
|
|
118
118
|
*/
|
|
119
119
|
fontMap?: FontMap;
|
|
120
120
|
private _schemaContext?;
|
|
121
|
+
private _schemasPromise?;
|
|
121
122
|
/** Load the FontMap for this IModelConnection.
|
|
122
123
|
* @returns Returns a Promise<FontMap> that is fulfilled when the FontMap member of this IModelConnection is valid.
|
|
123
124
|
* @deprecated in 5.0.0 - will not be removed until after 2026-06-13. If you need font Ids on the front-end for some reason, write an Ipc method that queries [IModelDb.fonts]($backend).
|
|
@@ -309,10 +310,47 @@ export declare abstract class IModelConnection extends IModel {
|
|
|
309
310
|
* This means to correctly access schema context, client-side applications must register `ECSchemaRpcInterface` following instructions for [RPC configuration]($docs/learning/rpcinterface/#client-side-configuration).
|
|
310
311
|
* Server-side applications would also [configure RPC]($docs/learning/rpcinterface/#server-side-configuration) as needed.
|
|
311
312
|
*
|
|
313
|
+
* For runtime read-only access - class/property iteration, IS-A checks, navigating relationships, KOQ lookups -
|
|
314
|
+
* prefer [[getSchemaView]]. `schemaContext` remains the right choice when you need custom-attribute deserialization
|
|
315
|
+
* or the full ecschema-metadata object graph.
|
|
316
|
+
*
|
|
312
317
|
* @note While a `BlankConnection` returns a valid `schemaContext`, it has an invalid locater registered by default, and will throw an error when trying to call it's methods.
|
|
313
318
|
* @beta
|
|
314
319
|
*/
|
|
315
320
|
get schemaContext(): SchemaContext;
|
|
321
|
+
/** Get the schema view for this iModel. The view is built lazily on
|
|
322
|
+
* first call by fetching compact binary schema data via `PRAGMA schema_view` through
|
|
323
|
+
* the existing queryRows RPC (ConcurrentQuery). Subsequent calls return the cached view.
|
|
324
|
+
* Multiple concurrent callers share a single in-flight fetch.
|
|
325
|
+
*
|
|
326
|
+
* The returned `SchemaView` is a lightweight, read-only, synchronous API for
|
|
327
|
+
* navigating schema metadata - classes, properties, relationships, enumerations, etc.
|
|
328
|
+
* It is the recommended default for runtime read-only metadata access and is significantly
|
|
329
|
+
* faster and lower-memory than [[schemaContext]]. Use [[schemaContext]] for custom-attribute
|
|
330
|
+
* deserialization or anywhere you need the full ecschema-metadata object graph.
|
|
331
|
+
* @beta
|
|
332
|
+
*/
|
|
333
|
+
getSchemaView(): Promise<SchemaView>;
|
|
334
|
+
/**
|
|
335
|
+
* Checks whether the iModel's schemas have changed since the current cached [[SchemaView]] was
|
|
336
|
+
* built, and discards the cache only if they have.
|
|
337
|
+
*
|
|
338
|
+
* Frontend code paths that may affect schemas - such as [[BriefcaseConnection.pullChanges]], or
|
|
339
|
+
* application-specific IPC calls that import or upgrade schemas - cannot reliably determine
|
|
340
|
+
* whether the operation actually modified any schemas. The IPC response for a pull, for example,
|
|
341
|
+
* returns only the new changeset id, not the list of applied changesets with their types.
|
|
342
|
+
* Unconditionally discarding the cached [[SchemaView]] after every such operation would cause
|
|
343
|
+
* unnecessary reloads in the common case where schemas are unchanged. This method avoids that
|
|
344
|
+
* cost by fetching a lightweight schema checksum via `PRAGMA checksum(ecdb_schema)` and
|
|
345
|
+
* comparing it against the token stored in the cached view. Only when the token differs is the
|
|
346
|
+
* cache discarded.
|
|
347
|
+
*
|
|
348
|
+
* Subclasses that expose operations which may modify schemas should await this method after the
|
|
349
|
+
* operation completes to ensure [[getSchemaView]] returns a fresh view if needed.
|
|
350
|
+
* @internal
|
|
351
|
+
*/
|
|
352
|
+
protected invalidateSchemaViewIfChanged(): Promise<void>;
|
|
353
|
+
private _fetchSchemas;
|
|
316
354
|
}
|
|
317
355
|
/** A connection that exists without an iModel. Useful for connecting to Reality Data services.
|
|
318
356
|
* @note This class exists because our display system requires an IModelConnection type even if only reality data is drawn.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IModelConnection.d.ts","sourceRoot":"","sources":["../../src/IModelConnection.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EACG,OAAO,EAAE,iBAAiB,EAAmC,UAAU,EAAQ,OAAO,EAAE,OAAO,EAAE,UAAU,EACnH,gBAAgB,EAAE,mBAAmB,EACtC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,YAAY,EAAE,SAAS,EAAiB,QAAQ,EAAoD,iBAAiB,EAAE,WAAW,EAAE,kBAAkB,EAAE,uBAAuB,EAC/K,YAAY,EAAE,iBAAiB,EAAE,OAAO,EAAkB,kBAAkB,EAAE,+BAA+B,EAAE,gCAAgC,EAAE,2BAA2B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AQ,CAAC,qBAAqB,CAAC,CAAC;SACtD;QAED,kIAAkI;QAClI,UAAiB,YAAY;YAC3B,iCAAiC;YACjC,QAAQ,CAAC,EAAE,EAAE,UAAU,CAAC;YACxB,8IAA8I;YAC9I,QAAQ,CAAC,aAAa,EAAE,GAAG,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC;SAC1D;KACF;IAED;;;OAGG;IACH,MAAa,UAAU;QACrB,gBAAgB;QAChB,SAAgB,KAAK,EAAE,kBAAkB,CAAC;QAE1C,gBAAgB;oBACG,MAAM,EAAE,gBAAgB;QAI3C,mEAAmE;QACtD,eAAe,CAAC,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC;QAIlH,sHAAsH;QACzG,kBAAkB,CAAC,IAAI,EAAE;YACpC,QAAQ,EAAE,UAAU,CAAC;YACrB,aAAa,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC;SACrC,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,UAAU,CAAC,eAAe,CAAC,CAAC;KAGzD;CACF"}
|
|
@@ -108,6 +108,7 @@ class IModelConnection extends core_common_1.IModel {
|
|
|
108
108
|
*/
|
|
109
109
|
fontMap; // eslint-disable-line @typescript-eslint/no-deprecated
|
|
110
110
|
_schemaContext;
|
|
111
|
+
_schemasPromise;
|
|
111
112
|
/** Load the FontMap for this IModelConnection.
|
|
112
113
|
* @returns Returns a Promise<FontMap> that is fulfilled when the FontMap member of this IModelConnection is valid.
|
|
113
114
|
* @deprecated in 5.0.0 - will not be removed until after 2026-06-13. If you need font Ids on the front-end for some reason, write an Ipc method that queries [IModelDb.fonts]($backend).
|
|
@@ -501,6 +502,10 @@ class IModelConnection extends core_common_1.IModel {
|
|
|
501
502
|
* This means to correctly access schema context, client-side applications must register `ECSchemaRpcInterface` following instructions for [RPC configuration]($docs/learning/rpcinterface/#client-side-configuration).
|
|
502
503
|
* Server-side applications would also [configure RPC]($docs/learning/rpcinterface/#server-side-configuration) as needed.
|
|
503
504
|
*
|
|
505
|
+
* For runtime read-only access - class/property iteration, IS-A checks, navigating relationships, KOQ lookups -
|
|
506
|
+
* prefer [[getSchemaView]]. `schemaContext` remains the right choice when you need custom-attribute deserialization
|
|
507
|
+
* or the full ecschema-metadata object graph.
|
|
508
|
+
*
|
|
504
509
|
* @note While a `BlankConnection` returns a valid `schemaContext`, it has an invalid locater registered by default, and will throw an error when trying to call it's methods.
|
|
505
510
|
* @beta
|
|
506
511
|
*/
|
|
@@ -517,6 +522,111 @@ class IModelConnection extends core_common_1.IModel {
|
|
|
517
522
|
}
|
|
518
523
|
return this._schemaContext;
|
|
519
524
|
}
|
|
525
|
+
/** Get the schema view for this iModel. The view is built lazily on
|
|
526
|
+
* first call by fetching compact binary schema data via `PRAGMA schema_view` through
|
|
527
|
+
* the existing queryRows RPC (ConcurrentQuery). Subsequent calls return the cached view.
|
|
528
|
+
* Multiple concurrent callers share a single in-flight fetch.
|
|
529
|
+
*
|
|
530
|
+
* The returned `SchemaView` is a lightweight, read-only, synchronous API for
|
|
531
|
+
* navigating schema metadata - classes, properties, relationships, enumerations, etc.
|
|
532
|
+
* It is the recommended default for runtime read-only metadata access and is significantly
|
|
533
|
+
* faster and lower-memory than [[schemaContext]]. Use [[schemaContext]] for custom-attribute
|
|
534
|
+
* deserialization or anywhere you need the full ecschema-metadata object graph.
|
|
535
|
+
* @beta
|
|
536
|
+
*/
|
|
537
|
+
async getSchemaView() {
|
|
538
|
+
if (this._schemasPromise) {
|
|
539
|
+
const ctx = await this._schemasPromise;
|
|
540
|
+
if (!ctx.isOutdated)
|
|
541
|
+
return ctx;
|
|
542
|
+
}
|
|
543
|
+
// Capture the in-flight promise locally so the rejection handler only clears
|
|
544
|
+
// `_schemasPromise` if it still points at this build. A concurrent invalidation +
|
|
545
|
+
// re-fetch could otherwise replace the field before our fetch fails, and a naive
|
|
546
|
+
// `_schemasPromise = undefined` would clobber that newer reference.
|
|
547
|
+
const inflight = this._fetchSchemas();
|
|
548
|
+
this._schemasPromise = inflight;
|
|
549
|
+
inflight.catch(() => {
|
|
550
|
+
if (this._schemasPromise === inflight)
|
|
551
|
+
this._schemasPromise = undefined;
|
|
552
|
+
});
|
|
553
|
+
return inflight;
|
|
554
|
+
}
|
|
555
|
+
/**
|
|
556
|
+
* Checks whether the iModel's schemas have changed since the current cached [[SchemaView]] was
|
|
557
|
+
* built, and discards the cache only if they have.
|
|
558
|
+
*
|
|
559
|
+
* Frontend code paths that may affect schemas - such as [[BriefcaseConnection.pullChanges]], or
|
|
560
|
+
* application-specific IPC calls that import or upgrade schemas - cannot reliably determine
|
|
561
|
+
* whether the operation actually modified any schemas. The IPC response for a pull, for example,
|
|
562
|
+
* returns only the new changeset id, not the list of applied changesets with their types.
|
|
563
|
+
* Unconditionally discarding the cached [[SchemaView]] after every such operation would cause
|
|
564
|
+
* unnecessary reloads in the common case where schemas are unchanged. This method avoids that
|
|
565
|
+
* cost by fetching a lightweight schema checksum via `PRAGMA checksum(ecdb_schema)` and
|
|
566
|
+
* comparing it against the token stored in the cached view. Only when the token differs is the
|
|
567
|
+
* cache discarded.
|
|
568
|
+
*
|
|
569
|
+
* Subclasses that expose operations which may modify schemas should await this method after the
|
|
570
|
+
* operation completes to ensure [[getSchemaView]] returns a fresh view if needed.
|
|
571
|
+
* @internal
|
|
572
|
+
*/
|
|
573
|
+
async invalidateSchemaViewIfChanged() {
|
|
574
|
+
if (!this._schemasPromise)
|
|
575
|
+
return;
|
|
576
|
+
const existingPromise = this._schemasPromise;
|
|
577
|
+
let existing;
|
|
578
|
+
try {
|
|
579
|
+
existing = await existingPromise;
|
|
580
|
+
}
|
|
581
|
+
catch {
|
|
582
|
+
// The cached promise itself failed; drop it so the next getSchemaView() retries.
|
|
583
|
+
if (this._schemasPromise === existingPromise)
|
|
584
|
+
this._schemasPromise = undefined;
|
|
585
|
+
return;
|
|
586
|
+
}
|
|
587
|
+
if (!existing.schemaToken)
|
|
588
|
+
return;
|
|
589
|
+
try {
|
|
590
|
+
const reader = this.createQueryReader("PRAGMA checksum(ecdb_schema)");
|
|
591
|
+
const result = await reader.next();
|
|
592
|
+
if (result.done)
|
|
593
|
+
throw new Error("PRAGMA checksum(ecdb_schema) returned no rows");
|
|
594
|
+
const liveToken = result.value.sha3_256;
|
|
595
|
+
if (liveToken !== existing.schemaToken) {
|
|
596
|
+
if (this._schemasPromise === existingPromise)
|
|
597
|
+
this._schemasPromise = undefined;
|
|
598
|
+
existing.markOutdated();
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
catch {
|
|
602
|
+
// The checksum check is called right after operations that may have changed schemas
|
|
603
|
+
// (e.g., pullChanges). If we cannot verify the cached view is still current, drop it
|
|
604
|
+
// rather than risk returning stale metadata indefinitely. The next getSchemaView() call
|
|
605
|
+
// will reload. We also mark the existing view outdated so any retained references can
|
|
606
|
+
// observe the invalidation.
|
|
607
|
+
if (this._schemasPromise === existingPromise) {
|
|
608
|
+
this._schemasPromise = undefined;
|
|
609
|
+
existing.markOutdated();
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
async _fetchSchemas() {
|
|
614
|
+
// PRAGMA returns exactly one row with format, formatVersion, data (binary), schemaToken.
|
|
615
|
+
// Important: only call reader.next() once - do NOT use `for await` on PRAGMA results.
|
|
616
|
+
// ConcurrentQuery wraps regular ECSQL in LIMIT/OFFSET for pagination but skips this for
|
|
617
|
+
// PRAGMAs. If the serialized result exceeds the memory threshold, the response is marked
|
|
618
|
+
// "Partial", and a `for await` loop would re-issue the same PRAGMA forever since PRAGMAs
|
|
619
|
+
// don't support OFFSET-based pagination.
|
|
620
|
+
const reader = this.createQueryReader(`PRAGMA schema_view(${ecschema_metadata_1.schemaViewFormatVersion})`);
|
|
621
|
+
const result = await reader.next();
|
|
622
|
+
if (result.done)
|
|
623
|
+
throw new core_common_1.IModelError(core_bentley_1.IModelStatus.BadRequest, "PRAGMA schema_view returned no rows");
|
|
624
|
+
const data = result.value.data;
|
|
625
|
+
const token = result.value.schemaToken;
|
|
626
|
+
if (data === undefined || data === null)
|
|
627
|
+
throw new core_common_1.IModelError(core_bentley_1.IModelStatus.BadRequest, "PRAGMA schema_view returned null data column");
|
|
628
|
+
return ecschema_metadata_1.SchemaView.fromBinary(data, token ?? "");
|
|
629
|
+
}
|
|
520
630
|
}
|
|
521
631
|
exports.IModelConnection = IModelConnection;
|
|
522
632
|
/** A connection that exists without an iModel. Useful for connecting to Reality Data services.
|