@itwin/ecschema-metadata 5.12.0-dev.8 → 5.13.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -1
- package/lib/cjs/Localization/SchemaLocalization.d.ts +1 -1
- package/lib/cjs/Localization/SchemaLocalization.d.ts.map +1 -1
- package/lib/cjs/Localization/SchemaLocalization.js.map +1 -1
- package/lib/cjs/SchemaView/SchemaManifest.d.ts +81 -0
- package/lib/cjs/SchemaView/SchemaManifest.d.ts.map +1 -0
- package/lib/cjs/SchemaView/SchemaManifest.js +131 -0
- package/lib/cjs/SchemaView/SchemaManifest.js.map +1 -0
- package/lib/cjs/{SchemaView.d.ts → SchemaView/SchemaView.d.ts} +23 -90
- package/lib/cjs/SchemaView/SchemaView.d.ts.map +1 -0
- package/lib/cjs/{SchemaView.js → SchemaView/SchemaView.js} +32 -198
- package/lib/cjs/SchemaView/SchemaView.js.map +1 -0
- package/lib/cjs/SchemaView/SchemaViewBinaryReader.d.ts +37 -0
- package/lib/cjs/SchemaView/SchemaViewBinaryReader.d.ts.map +1 -0
- package/lib/cjs/{SchemaViewBinaryReader.js → SchemaView/SchemaViewBinaryReader.js} +84 -43
- package/lib/cjs/SchemaView/SchemaViewBinaryReader.js.map +1 -0
- package/lib/cjs/SchemaView/SchemaViewBuilder.d.ts +116 -0
- package/lib/cjs/SchemaView/SchemaViewBuilder.d.ts.map +1 -0
- package/lib/cjs/SchemaView/SchemaViewBuilder.js +230 -0
- package/lib/cjs/SchemaView/SchemaViewBuilder.js.map +1 -0
- package/lib/cjs/{SchemaViewInterfaces.d.ts → SchemaView/SchemaViewInterfaces.d.ts} +1 -1
- package/lib/cjs/SchemaView/SchemaViewInterfaces.d.ts.map +1 -0
- package/lib/cjs/SchemaView/SchemaViewInterfaces.js.map +1 -0
- package/lib/cjs/SchemaView/SchemaViewManager.d.ts +114 -0
- package/lib/cjs/SchemaView/SchemaViewManager.d.ts.map +1 -0
- package/lib/cjs/SchemaView/SchemaViewManager.js +184 -0
- package/lib/cjs/SchemaView/SchemaViewManager.js.map +1 -0
- package/lib/cjs/ecschema-metadata.d.ts +6 -3
- package/lib/cjs/ecschema-metadata.d.ts.map +1 -1
- package/lib/cjs/ecschema-metadata.js +6 -3
- package/lib/cjs/ecschema-metadata.js.map +1 -1
- package/lib/esm/Localization/SchemaLocalization.d.ts +1 -1
- package/lib/esm/Localization/SchemaLocalization.d.ts.map +1 -1
- package/lib/esm/Localization/SchemaLocalization.js.map +1 -1
- package/lib/esm/SchemaView/SchemaManifest.d.ts +81 -0
- package/lib/esm/SchemaView/SchemaManifest.d.ts.map +1 -0
- package/lib/esm/SchemaView/SchemaManifest.js +127 -0
- package/lib/esm/SchemaView/SchemaManifest.js.map +1 -0
- package/lib/esm/{SchemaView.d.ts → SchemaView/SchemaView.d.ts} +23 -90
- package/lib/esm/SchemaView/SchemaView.d.ts.map +1 -0
- package/lib/esm/{SchemaView.js → SchemaView/SchemaView.js} +32 -197
- package/lib/esm/SchemaView/SchemaView.js.map +1 -0
- package/lib/esm/SchemaView/SchemaViewBinaryReader.d.ts +37 -0
- package/lib/esm/SchemaView/SchemaViewBinaryReader.d.ts.map +1 -0
- package/lib/esm/{SchemaViewBinaryReader.js → SchemaView/SchemaViewBinaryReader.js} +82 -43
- package/lib/esm/SchemaView/SchemaViewBinaryReader.js.map +1 -0
- package/lib/esm/SchemaView/SchemaViewBuilder.d.ts +116 -0
- package/lib/esm/SchemaView/SchemaViewBuilder.d.ts.map +1 -0
- package/lib/esm/SchemaView/SchemaViewBuilder.js +226 -0
- package/lib/esm/SchemaView/SchemaViewBuilder.js.map +1 -0
- package/lib/esm/{SchemaViewInterfaces.d.ts → SchemaView/SchemaViewInterfaces.d.ts} +1 -1
- package/lib/esm/SchemaView/SchemaViewInterfaces.d.ts.map +1 -0
- package/lib/esm/SchemaView/SchemaViewInterfaces.js.map +1 -0
- package/lib/esm/SchemaView/SchemaViewManager.d.ts +114 -0
- package/lib/esm/SchemaView/SchemaViewManager.d.ts.map +1 -0
- package/lib/esm/SchemaView/SchemaViewManager.js +180 -0
- package/lib/esm/SchemaView/SchemaViewManager.js.map +1 -0
- package/lib/esm/ecschema-metadata.d.ts +6 -3
- package/lib/esm/ecschema-metadata.d.ts.map +1 -1
- package/lib/esm/ecschema-metadata.js +6 -3
- package/lib/esm/ecschema-metadata.js.map +1 -1
- package/package.json +8 -8
- package/lib/cjs/SchemaView.d.ts.map +0 -1
- package/lib/cjs/SchemaView.js.map +0 -1
- package/lib/cjs/SchemaViewBinaryReader.d.ts +0 -16
- package/lib/cjs/SchemaViewBinaryReader.d.ts.map +0 -1
- package/lib/cjs/SchemaViewBinaryReader.js.map +0 -1
- package/lib/cjs/SchemaViewInterfaces.d.ts.map +0 -1
- package/lib/cjs/SchemaViewInterfaces.js.map +0 -1
- package/lib/esm/SchemaView.d.ts.map +0 -1
- package/lib/esm/SchemaView.js.map +0 -1
- package/lib/esm/SchemaViewBinaryReader.d.ts +0 -16
- package/lib/esm/SchemaViewBinaryReader.d.ts.map +0 -1
- package/lib/esm/SchemaViewBinaryReader.js.map +0 -1
- package/lib/esm/SchemaViewInterfaces.d.ts.map +0 -1
- package/lib/esm/SchemaViewInterfaces.js.map +0 -1
- /package/lib/cjs/{SchemaViewInterfaces.js → SchemaView/SchemaViewInterfaces.js} +0 -0
- /package/lib/esm/{SchemaViewInterfaces.js → SchemaView/SchemaViewInterfaces.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaViewManager.js","sourceRoot":"","sources":["../../../src/SchemaView/SchemaViewManager.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AA8D1C;;;;;GAKG;AACH,MAAM,OAAO,iBAAiB;IACX,aAAa,CAAyB;IAEvD;wEACoE;IAC5D,YAAY,CAAmC;IAEvD,qGAAqG;IAC7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,IAAI,QAAQ,CAAC,WAAW,IAAI,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;YAC7K,IAAI,CAAC,sBAAsB,EAAE,CAAC;QAChC,OAAO,IAAI,CAAC;IACd,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Schema\n */\n\nimport { SchemaManifest } from \"./SchemaManifest\";\nimport { SchemaView } from \"./SchemaView\";\n\n/** One schema-view blob with its cache-invalidation token, as fetched by a\n * {@link SchemaViewDataProvider}. Full and fragment blobs share this shape.\n * @internal\n */\nexport interface SchemaViewBlob {\n /** The binary schema metadata (the `data` column of `PRAGMA schema_view` / `schema_view_fragment`). */\n readonly data: Uint8Array;\n /** Schema-identity hash of the iModel's whole schema set (the `schemaToken` column). Empty string when unavailable. */\n readonly schemaToken: string;\n}\n\n/** The data source a {@link SchemaViewManager} loads schema-view data from, implemented by the hosts\n * that own the query APIs: `IModelDb` on the backend and `IModelConnection` on the frontend. The\n * manager deals only in schema names, blobs and the manifest; everything transport-specific - pragma\n * strings, format-version pinning - belongs to the provider.\n * @internal\n */\nexport interface SchemaViewDataProvider {\n /** Fetch the blob containing every schema in the iModel (`PRAGMA schema_view`). */\n fetchFullBlob(): Promise<SchemaViewBlob>;\n\n /** Fetch one blob containing exactly the given schemas (`PRAGMA schema_view_fragment`). The\n * requested set is always dependency-closed - the manager computes the reference closure from the\n * manifest before calling. */\n fetchFragmentBlob(schemaNames: readonly string[]): Promise<SchemaViewBlob>;\n\n /** Fetch the reference graph of every schema in the iModel, built from ECDbMeta\n * (`meta.ECSchemaDef` + `meta.SchemaHasSchemaReferences`; see {@link SchemaManifest.fromRows}). */\n fetchManifest(): Promise<SchemaManifest>;\n\n /** Fetch the current schema-identity token (`PRAGMA checksum(schema_token)`). */\n fetchSchemaToken(): Promise<string>;\n}\n\n/** Options for `getSchemaView` (see `IModelDb.getSchemaView` / `IModelConnection.getSchemaView`,\n * which delegate to {@link SchemaViewManager.getSchemaView}).\n * @beta\n */\nexport interface GetSchemaViewArgs {\n /** When provided, return a view loaded with at least these schemas plus their references, instead\n * of every schema in the iModel.\n *\n * The view accumulates: one instance is reused across calls, so a later request - with different\n * schemas or with no filter at all - merges the still-missing schemas into the same view and\n * everything requested earlier stays available. It resets when the iModel's schemas change.\n *\n * Names the iModel does not contain are ignored. Omitting this option loads all schemas, identical\n * to calling `getSchemaView()` with no arguments.\n */\n readonly schemas?: readonly string[];\n\n /** When `true`, discard whatever is currently loaded and rebuild the view from scratch before\n * returning it. The previously returned view instance (if any) is marked outdated. Like every other\n * request this is serialized behind any in-flight load, so it never leaves the view in an invalid\n * intermediate state.\n * @internal\n */\n readonly forceReload?: boolean;\n}\n\n/** Owns the lifetime of one iModel's {@link (SchemaView:class)}: lazy loading, incremental (filtered)\n * hydration, serialization of concurrent requests, and invalidation. Hosts (`IModelDb`,\n * `IModelConnection`) hold one instance and delegate to it; all data access goes through the\n * host-implemented {@link SchemaViewDataProvider}.\n * @internal\n */\nexport class SchemaViewManager {\n private readonly _dataProvider: SchemaViewDataProvider;\n\n /** The single accumulating view, held as a promise so all requests chain onto it and never overlap.\n * Undefined (or resolving to undefined) means nothing is loaded. */\n private _viewPromise?: Promise<SchemaView | undefined>;\n\n /** Reference graph for incremental loading; undefined when the view is (or will be) fully loaded. */\n private _manifest?: SchemaManifest;\n\n /** Schema-identity token the manifest - and thus every fragment merged under it - belongs to. */\n private _manifestToken?: string;\n\n /** Lower-cased names already merged into the view (incremental mode only). */\n private readonly _loadedSchemaNames = new Set<string>();\n\n public constructor(dataProvider: SchemaViewDataProvider) {\n this._dataProvider = dataProvider;\n }\n\n /** Get the schema view, loading whatever the request needs that is not present yet. See\n * {@link GetSchemaViewArgs} for filtering and reload semantics; hosts document the full\n * user-facing contract on their `getSchemaView` methods.\n */\n public async getSchemaView(args?: GetSchemaViewArgs): Promise<SchemaView> {\n const previous = this._viewPromise;\n const next = this._loadSchemaView(previous, args?.schemas, args?.forceReload === true);\n this._viewPromise = next;\n return next;\n }\n\n /** Throw away the current schema view. Called by the host when schemas may have changed (e.g.\n * `IModelDb.clearCaches` after a schema import). Chains behind any in-flight load and marks the\n * discarded view outdated; the next getSchemaView starts over.\n */\n public reset(): void {\n if (this._viewPromise) {\n this._viewPromise = this._viewPromise.then(\n (view) => { view?.markOutdated(); this._resetIncrementalState(); return undefined; },\n () => { this._resetIncrementalState(); return undefined; },\n );\n }\n }\n\n /** Check whether the iModel's schemas have changed since the current view was built, and discard\n * the view only if they have. For hosts that *cannot* determine whether an operation actually\n * modified schemas - e.g. `BriefcaseConnection.pullChanges` on the frontend, whose IPC response\n * carries only the new changeset id, not the applied changesets' types. Discarding after every\n * such operation would reload unnecessarily in the common case where schemas are unchanged, so\n * this compares the cheap schema-identity token instead.\n * @note If the token cannot be fetched, the view is discarded rather than risking stale metadata.\n */\n public async invalidateIfChanged(): Promise<void> {\n const previous = this._viewPromise;\n if (previous === undefined)\n return;\n // Queue the check on the same chain as loading, so a getSchemaView arriving while the token is\n // in flight cannot swap in a new promise for the same stale view and hide the schema change.\n const next = this._invalidateIfChanged(previous);\n this._viewPromise = next;\n await next;\n }\n\n /** Serialized body of {@link SchemaViewManager.invalidateIfChanged}. Resolves to the view to keep,\n * or to `undefined` when it was discarded and the next getSchemaView has to start over.\n */\n private async _invalidateIfChanged(previous: Promise<SchemaView | undefined>): Promise<SchemaView | undefined> {\n let existing: SchemaView | undefined;\n try {\n existing = await previous;\n } catch {\n return undefined;\n }\n if (existing === undefined)\n return undefined;\n // A view without a token (e.g. built directly from a SchemaViewBuilder) cannot be verified by\n // token; views loaded through this manager always carry one.\n if (existing.schemaToken === \"\")\n return existing;\n\n try {\n if (await this._dataProvider.fetchSchemaToken() === existing.schemaToken)\n return existing;\n } catch {\n // Cannot verify the cached view: drop it rather than risk stale metadata.\n }\n existing.markOutdated();\n this._resetIncrementalState();\n return undefined;\n }\n\n /** Serialized body of {@link SchemaViewManager.getSchemaView}. On failure it resets and rejects,\n * so the next call starts over.\n */\n private async _loadSchemaView(previous: Promise<SchemaView | undefined> | undefined, schemas: readonly string[] | undefined, forceReload: boolean): Promise<SchemaView> {\n let currentView: SchemaView | undefined;\n if (previous !== undefined) {\n try {\n currentView = await previous;\n } catch {\n currentView = undefined; // the failed load already reset; start over\n }\n }\n\n if (forceReload) {\n currentView?.markOutdated();\n currentView = undefined;\n this._resetIncrementalState();\n }\n\n try {\n return await this._ensureSchemasLoaded(currentView, schemas);\n } catch (err) {\n // A failed merge may have left the view partially extended - discard everything.\n currentView?.markOutdated();\n this._resetIncrementalState();\n throw err;\n }\n }\n\n /** Clear the incremental schema-view bookkeeping. */\n private _resetIncrementalState(): void {\n this._manifest = undefined;\n this._manifestToken = undefined;\n this._loadedSchemaNames.clear();\n }\n\n /** Ensures the requested schemas (or all schemas, when no filter is given) are present in\n * `currentView` (or a freshly created view) and returns it. The first load fixes the strategy:\n * no filter fetches everything as one full blob; a filter fetches fragments and keeps the\n * manifest and loaded-name set so later calls extend the same view. Once every schema is loaded\n * the incremental state is dropped, collapsing back to full mode.\n */\n private async _ensureSchemasLoaded(currentView: SchemaView | undefined, schemas: readonly string[] | undefined, isRetry = false): Promise<SchemaView> {\n const isFirstLoad = currentView === undefined;\n // No manifest means everything is loaded; in incremental mode a filtered request is satisfied as\n // soon as every requested name is present.\n if (!isFirstLoad &&\n (this._manifest === undefined ||\n (schemas !== undefined && schemas.every((name) => this._loadedSchemaNames.has(name.toLowerCase())))))\n return currentView;\n\n if (isFirstLoad && schemas === undefined) {\n const blob = await this._dataProvider.fetchFullBlob();\n const schemaView = SchemaView.fromBinary(blob.data, blob.schemaToken);\n this._resetIncrementalState();\n return schemaView;\n }\n\n if (this._manifest === undefined) {\n // Token first: any schema change after this point shows up as a token mismatch below.\n this._manifestToken = await this._dataProvider.fetchSchemaToken();\n this._manifest = await this._dataProvider.fetchManifest();\n }\n const manifest = this._manifest;\n\n const requested = schemas ?? manifest.getAvailableSchemaNames();\n const namesToLoad = manifest.getSchemaClosure(requested).filter((name) => !this._loadedSchemaNames.has(name.toLowerCase()));\n const husk = currentView ?? SchemaView.createMergeable(this._manifestToken);\n if (namesToLoad.length > 0) {\n const blob = await this._dataProvider.fetchFragmentBlob(namesToLoad);\n if (blob.schemaToken !== this._manifestToken) {\n // Schemas changed between the manifest and fragment fetches. Everything loaded so far\n // belongs to the old revision - discard it and start over, once.\n currentView?.markOutdated();\n this._resetIncrementalState();\n if (isRetry)\n throw new Error(\"The iModel's schemas changed while the schema view was loading.\");\n return this._ensureSchemasLoaded(undefined, schemas, true);\n }\n husk.mergeFragment(blob.data);\n // Record the whole closure as loaded, including *excluded* schemas (e.g. CoreCustomAttributes)\n // the writer emits no rows for, so later requests prune them instead of re-fetching.\n for (const name of namesToLoad)\n this._loadedSchemaNames.add(name.toLowerCase());\n }\n // Once every schema is loaded, collapse back to full mode (the size check is just a fast path).\n if (schemas === undefined || (this._loadedSchemaNames.size >= manifest.schemaCount && manifest.entries.every((entry) => this._loadedSchemaNames.has(entry.name.toLowerCase()))))\n this._resetIncrementalState();\n return husk;\n }\n}\n"]}
|
|
@@ -41,9 +41,12 @@ export * from "./IncrementalLoading/ECSqlSchemaLocater";
|
|
|
41
41
|
export * from "./IncrementalLoading/IncrementalSchemaLocater";
|
|
42
42
|
export { CustomAttribute, CustomAttributeContainerProps } from "./Metadata/CustomAttribute";
|
|
43
43
|
export { SchemaGraph } from "./utils/SchemaGraph";
|
|
44
|
-
export * from "./SchemaViewBinaryReader";
|
|
45
|
-
export * from "./SchemaView";
|
|
46
|
-
export * from "./
|
|
44
|
+
export * from "./SchemaView/SchemaViewBinaryReader";
|
|
45
|
+
export * from "./SchemaView/SchemaView";
|
|
46
|
+
export * from "./SchemaView/SchemaViewBuilder";
|
|
47
|
+
export * from "./SchemaView/SchemaViewInterfaces";
|
|
48
|
+
export * from "./SchemaView/SchemaManifest";
|
|
49
|
+
export * from "./SchemaView/SchemaViewManager";
|
|
47
50
|
export * from "./Localization/LocalizationTypes";
|
|
48
51
|
export * from "./Localization/LocalizationProvider";
|
|
49
52
|
export * from "./Localization/SchemaLocalization";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ecschema-metadata.d.ts","sourceRoot":"","sources":["../../src/ecschema-metadata.ts"],"names":[],"mappings":"AAKA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MA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,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mCAAmC,CAAC;AAClD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oCAAoC,CAAC;AACnD,cAAc,uCAAuC,CAAC;AACtD,cAAc,yCAAyC,CAAC;AACxD,cAAc,+CAA+C,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAC5F,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,yBAAyB,CAAC;AACxC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCAAkC,CAAC;AACjD,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAElD;;GAEG;AACH;;;GAGG;AACH;;;GAGG"}
|
|
@@ -44,9 +44,12 @@ export * from "./Formatting/FormatSetFormatsProvider";
|
|
|
44
44
|
export * from "./IncrementalLoading/ECSqlSchemaLocater";
|
|
45
45
|
export * from "./IncrementalLoading/IncrementalSchemaLocater";
|
|
46
46
|
export { SchemaGraph } from "./utils/SchemaGraph";
|
|
47
|
-
export * from "./SchemaViewBinaryReader";
|
|
48
|
-
export * from "./SchemaView";
|
|
49
|
-
export * from "./
|
|
47
|
+
export * from "./SchemaView/SchemaViewBinaryReader";
|
|
48
|
+
export * from "./SchemaView/SchemaView";
|
|
49
|
+
export * from "./SchemaView/SchemaViewBuilder";
|
|
50
|
+
export * from "./SchemaView/SchemaViewInterfaces";
|
|
51
|
+
export * from "./SchemaView/SchemaManifest";
|
|
52
|
+
export * from "./SchemaView/SchemaViewManager";
|
|
50
53
|
export * from "./Localization/LocalizationTypes";
|
|
51
54
|
export * from "./Localization/LocalizationProvider";
|
|
52
55
|
export * from "./Localization/SchemaLocalization";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ecschema-metadata.js","sourceRoot":"","sources":["../../src/ecschema-metadata.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAiB,WAAW,EAAc,MAAM,wBAAwB,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EACL,QAAQ,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,cAAc,EACxF,mB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;AACnD,cAAc,uCAAuC,CAAC;AACtD,cAAc,yCAAyC,CAAC;AACxD,cAAc,+CAA+C,CAAC;AAE9D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,yBAAyB,CAAC;AACxC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCAAkC,CAAC;AACjD,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAElD;;GAEG;AACH;;;GAGG;AACH;;;GAGG","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\nexport * from \"./Constants\";\nexport * from \"./Context\";\nexport * from \"./DelayedPromise\";\nexport * from \"./Deserialization/SchemaGraphUtil\";\nexport * from \"./Deserialization/JsonProps\";\nexport * from \"./Deserialization/Helper\";\nexport * from \"./Deserialization/XmlParser\";\nexport * from \"./ECName\";\nexport * from \"./ECObjects\";\nexport * from \"./Exception\";\nexport * from \"./Interfaces\";\nexport { ECClass, StructClass } from \"./Metadata/Class\";\nexport { Constant } from \"./Metadata/Constant\";\nexport { CustomAttributeClass } from \"./Metadata/CustomAttributeClass\";\nexport { EntityClass } from \"./Metadata/EntityClass\";\nexport { AnyEnumerator, Enumeration, Enumerator } from \"./Metadata/Enumeration\";\nexport { Format } from \"./Metadata/Format\";\nexport { InvertedUnit } from \"./Metadata/InvertedUnit\";\nexport { KindOfQuantity } from \"./Metadata/KindOfQuantity\";\nexport { Mixin } from \"./Metadata/Mixin\";\nexport * from \"./Metadata/OverrideFormat\";\nexport { Phenomenon } from \"./Metadata/Phenomenon\";\nexport {\n Property, PrimitiveProperty, PrimitiveArrayProperty, EnumerationProperty, StructProperty,\n StructArrayProperty, EnumerationArrayProperty, NavigationProperty, AnyArrayProperty, AnyEnumerationProperty,\n AnyPrimitiveProperty, AnyProperty, AnyStructProperty, ArrayProperty, PrimitiveOrEnumPropertyBase,\n} from \"./Metadata/Property\";\nexport { PropertyCategory } from \"./Metadata/PropertyCategory\";\nexport { RelationshipClass, RelationshipConstraint, RelationshipMultiplicity } from \"./Metadata/RelationshipClass\";\nexport { Schema } from \"./Metadata/Schema\";\nexport * from \"./Metadata/SchemaItem\";\nexport { Unit } from \"./Metadata/Unit\";\nexport { UnitSystem } from \"./Metadata/UnitSystem\";\nexport * from \"./PropertyTypes\";\nexport * from \"./SchemaJsonLocater\";\nexport * from \"./SchemaKey\";\nexport * from \"./SchemaLoader\";\nexport * from \"./UnitConversion/UnitConverter\";\nexport * from \"./UnitProvider/SchemaUnitProvider\";\nexport * from \"./Validation/SchemaWalker\";\nexport * from \"./SchemaPartVisitorDelegate\";\nexport * from \"./Formatting/SchemaFormatsProvider\";\nexport * from \"./Formatting/FormatSetFormatsProvider\";\nexport * from \"./IncrementalLoading/ECSqlSchemaLocater\";\nexport * from \"./IncrementalLoading/IncrementalSchemaLocater\";\nexport { CustomAttribute, CustomAttributeContainerProps } from \"./Metadata/CustomAttribute\";\nexport { SchemaGraph } from \"./utils/SchemaGraph\";\nexport * from \"./SchemaView/SchemaViewBinaryReader\";\nexport * from \"./SchemaView/SchemaView\";\nexport * from \"./SchemaView/SchemaViewBuilder\";\nexport * from \"./SchemaView/SchemaViewInterfaces\";\nexport * from \"./SchemaView/SchemaManifest\";\nexport * from \"./SchemaView/SchemaViewManager\";\nexport * from \"./Localization/LocalizationTypes\";\nexport * from \"./Localization/LocalizationProvider\";\nexport * from \"./Localization/SchemaLocalization\";\n\n/** @docs-package-description\n * The ecschema-metadata package contains classes for working with ECSchemas that can be used in both [frontend]($docs/learning/frontend/index.md) and [backend]($docs/learning/backend/index.md).\n */\n/**\n * @docs-group-description Metadata\n * Definitions of classes and interfaces that represent all [EC elements]($docs/bis/ec/index.md).\n */\n/**\n * @docs-group-description Utils\n * A set of utility classes used throughout the package.\n */\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itwin/ecschema-metadata",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.13.0-dev.1",
|
|
4
4
|
"description": "ECObjects core concepts in typescript",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "lib/cjs/ecschema-metadata.js",
|
|
@@ -33,21 +33,21 @@
|
|
|
33
33
|
"@itwin/eslint-plugin": "^6.0.0",
|
|
34
34
|
"@types/benchmark": "^2.1.0",
|
|
35
35
|
"@types/node": "~20.17.0",
|
|
36
|
-
"@vitest/coverage-v8": "^4.1.
|
|
36
|
+
"@vitest/coverage-v8": "^4.1.10",
|
|
37
37
|
"@xmldom/xmldom": "~0.8.13",
|
|
38
38
|
"benchmark": "^2.1.4",
|
|
39
39
|
"cpx2": "^8.0.0",
|
|
40
40
|
"eslint": "^9.31.0",
|
|
41
41
|
"rimraf": "^6.0.1",
|
|
42
42
|
"typescript": "~5.6.2",
|
|
43
|
-
"vitest": "^4.1.
|
|
44
|
-
"@itwin/build-tools": "5.
|
|
45
|
-
"@itwin/core-
|
|
46
|
-
"@itwin/core-
|
|
43
|
+
"vitest": "^4.1.10",
|
|
44
|
+
"@itwin/build-tools": "5.13.0-dev.1",
|
|
45
|
+
"@itwin/core-quantity": "5.13.0-dev.1",
|
|
46
|
+
"@itwin/core-bentley": "5.13.0-dev.1"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@itwin/core-bentley": "5.
|
|
50
|
-
"@itwin/core-quantity": "5.
|
|
49
|
+
"@itwin/core-bentley": "5.13.0-dev.1",
|
|
50
|
+
"@itwin/core-quantity": "5.13.0-dev.1"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
53
|
"build": "npm run -s build:cjs && npm run -s build:esm",
|
|
@@ -1 +0,0 @@
|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;IACnU,CAAC;CACF;AA5MD,8CA4MC","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 { type ClassData, ClassModifier, ClassType, type EnumerationData, type EnumeratorData, type KoqData, type PropCategoryData, type PropertyDef, PropertyKind, type PropertyRef, type RelConstraintData, type SchemaData, SchemaViewPrimitiveType } from \"./SchemaViewInterfaces\";\nimport { parseSchemaViewBlob } from \"./SchemaViewBinaryReader\";\nimport { StrengthDirection, StrengthType } from \"./ECObjects\";\n\n// Module-local symbol used as the storage key on SchemaView instances. Mirrors the pattern in\n// core-backend/src/internal/Symbols.ts (e.g. `_nativeDb` on IModelDb): the data is reachable\n// only by code in this module, since the symbol is not exported and not registered globally.\n// The flyweight view classes (SchemaView.Schema, SchemaView.Class, etc.) live in the same file\n// and access the storage through this symbol.\nconst _storage = Symbol(\"SchemaView.storage\");\n\n/** Internal runtime storage attached to a SchemaView instance. Carries the immutable data\n * tables built by SchemaViewBuilder plus two mutable caches populated lazily at runtime.\n * @internal\n */\ninterface SchemaViewStorage extends SchemaViewData {\n readonly transitiveBaseCache: Map<number, ReadonlySet<number>>;\n derivedClassMap: ReadonlyMap<number, readonly number[]> | undefined;\n}\n\n/** A property reference paired with the index of the class that declared it. Used for\n * property inheritance resolution - the classIdx tracks where each property originates\n * (base class, mixin, or own) so consumers can discover the declaring class.\n * @internal\n */\nexport interface ResolvedPropertyRef {\n readonly ref: PropertyRef;\n readonly classIdx: number;\n}\n\n/** Internal data bag passed from the builder to the context constructor.\n * @internal\n */\nexport interface SchemaViewData {\n readonly strings: readonly string[];\n readonly lowerStrings: readonly string[];\n readonly schemas: readonly SchemaData[];\n readonly classes: readonly ClassData[];\n readonly classMixins: readonly number[];\n readonly propDefs: readonly PropertyDef[];\n readonly propertyRefs: readonly PropertyRef[];\n readonly relConstraints: readonly RelConstraintData[];\n readonly constraintClassRefs: readonly number[];\n readonly enumerations: readonly EnumerationData[];\n readonly enumerators: readonly EnumeratorData[];\n readonly koqs: readonly KoqData[];\n readonly propCategories: readonly PropCategoryData[];\n readonly schemaByName: ReadonlyMap<string, number>;\n readonly schemaByAlias: ReadonlyMap<string, number>;\n readonly classByName: ReadonlyMap<number, ReadonlyMap<string, number>>;\n readonly enumByName: ReadonlyMap<number, ReadonlyMap<string, number>>;\n readonly koqByName: ReadonlyMap<number, ReadonlyMap<string, number>>;\n readonly catByName: ReadonlyMap<number, ReadonlyMap<string, number>>;\n}\n\n/** Read-only schema metadata view. Optimized for fast lookup and low memory usage.\n *\n * All data is stored in flat arrays. View objects (`SchemaView.Schema`, `SchemaView.Class`, etc.) are\n * stateless wrappers that hold a reference to this view plus an index. They allocate nothing\n * and cache nothing.\n *\n * The view is immutable after construction. Build it via `SchemaViewBuilder` or parse\n * from a binary blob via `fromBinary`.\n * @beta\n */\nexport class SchemaView {\n /** @internal */\n public readonly [_storage]: SchemaViewStorage;\n\n private _schemaToken: string;\n private _outdated = false;\n\n /** @internal */\n constructor(data: SchemaViewData, schemaToken?: string) {\n this[_storage] = {\n ...data,\n transitiveBaseCache: new Map<number, ReadonlySet<number>>(),\n derivedClassMap: undefined,\n };\n this._schemaToken = schemaToken ?? \"\";\n }\n\n /** SHA3-256 content hash of the ec_ schema tables at the time this view was built.\n * Empty string if not set (e.g., when built from a builder without a token).\n * @beta\n */\n public get schemaToken(): string { return this._schemaToken; }\n\n /** True if the host (`IModelDb` / `IModelConnection`) has replaced this view with a newer one.\n * The view remains fully functional - it returns stale data rather than throwing.\n * Consumers who stored a reference can check this flag for diagnostics.\n * @beta\n */\n public get isOutdated(): boolean { return this._outdated; }\n\n /** Mark this view as outdated. Called by the host when a newer view replaces it.\n * @internal\n */\n public markOutdated(): void { this._outdated = true; }\n\n /** Number of schemas in the view. */\n public get schemaCount(): number { return this[_storage].schemas.length; }\n\n /** Number of classes across all schemas. */\n public get classCount(): number { return this[_storage].classes.length; }\n\n /** Get a schema by name (case-insensitive). */\n public getSchema(name: string): SchemaView.Schema | undefined {\n const idx = this[_storage].schemaByName.get(name.toLowerCase());\n return idx !== undefined ? new SchemaView.Schema(this, idx) : undefined;\n }\n\n /** Get a schema by alias (case-insensitive). */\n public getSchemaByAlias(alias: string): SchemaView.Schema | undefined {\n const idx = this[_storage].schemaByAlias.get(alias.toLowerCase());\n return idx !== undefined ? new SchemaView.Schema(this, idx) : undefined;\n }\n\n /** Iterate all schemas. */\n public *getSchemas(): IterableIterator<SchemaView.Schema> {\n for (let i = 0; i < this[_storage].schemas.length; i++)\n yield new SchemaView.Schema(this, i);\n }\n\n /** Find a class by qualified name (\"SchemaName:ClassName\" or \"SchemaName.ClassName\").\n * The namespace part matches schema name first, then alias. Case-insensitive.\n */\n public findClass(qualifiedName: string): SchemaView.Class | undefined {\n const idx = this.resolveClassIdx(qualifiedName);\n return idx !== -1 ? SchemaView.createClass(this, idx) : undefined;\n }\n\n /** Find an enumeration by qualified name (\"SchemaName:EnumName\" or \"SchemaName.EnumName\").\n * The namespace part matches schema name first, then alias. Case-insensitive.\n */\n public findEnumeration(qualifiedName: string): SchemaView.Enumeration | undefined {\n const idx = this._resolveSchemaItemIdx(qualifiedName, this[_storage].enumByName);\n return idx !== undefined ? new SchemaView.Enumeration(this, idx) : undefined;\n }\n\n /** Find a KindOfQuantity by qualified name (\"SchemaName:KoqName\" or \"SchemaName.KoqName\").\n * The namespace part matches schema name first, then alias. Case-insensitive.\n */\n public findKindOfQuantity(qualifiedName: string): SchemaView.KindOfQuantity | undefined {\n const idx = this._resolveSchemaItemIdx(qualifiedName, this[_storage].koqByName);\n return idx !== undefined ? new SchemaView.KindOfQuantity(this, idx) : undefined;\n }\n\n /** Find a PropertyCategory by qualified name (\"SchemaName:CategoryName\" or \"SchemaName.CategoryName\").\n * The namespace part matches schema name first, then alias. Case-insensitive.\n */\n public findPropertyCategory(qualifiedName: string): SchemaView.PropertyCategory | undefined {\n const idx = this._resolveSchemaItemIdx(qualifiedName, this[_storage].catByName);\n return idx !== undefined ? new SchemaView.PropertyCategory(this, idx) : undefined;\n }\n\n /** Parse a binary blob into a SchemaView. Synchronous.\n * @param blob - The binary blob from `PRAGMA schema_view`.\n * @param schemaToken - Optional SHA3-256 content hash for cache invalidation.\n * @beta\n */\n public static fromBinary(blob: Uint8Array, schemaToken?: string): SchemaView {\n return parseSchemaViewBlob(blob, schemaToken);\n }\n\n /** Build from a pre-populated builder (used by the binary parser).\n * @internal\n */\n public static fromBuilder(builder: SchemaViewBuilder, schemaToken?: string): SchemaView {\n return builder.build(schemaToken);\n }\n\n // --- Internal helpers used by view objects ---\n\n /** Resolve a qualified \"SchemaName:ItemName\" (or dot-separated) to an index using the given\n * per-schema name map. Returns undefined if not found. @internal */\n private _resolveSchemaItemIdx(qualifiedName: string, itemByName: ReadonlyMap<number, ReadonlyMap<string, number>>): number | undefined {\n const sep = qualifiedName.indexOf(\":\");\n const dotSep = sep === -1 ? qualifiedName.indexOf(\".\") : -1;\n const splitAt = sep !== -1 ? sep : dotSep;\n if (splitAt === -1) return undefined;\n\n const ns = qualifiedName.substring(0, splitAt).toLowerCase();\n const itemName = qualifiedName.substring(splitAt + 1).toLowerCase();\n\n let schemaIdx = this[_storage].schemaByName.get(ns);\n if (schemaIdx === undefined)\n schemaIdx = this[_storage].schemaByAlias.get(ns);\n if (schemaIdx === undefined) return undefined;\n\n return itemByName.get(schemaIdx)?.get(itemName);\n }\n\n /** @internal */\n public resolveClassIdx(qualifiedName: string): number {\n const sep = qualifiedName.indexOf(\":\");\n const dotSep = sep === -1 ? qualifiedName.indexOf(\".\") : -1;\n const splitAt = sep !== -1 ? sep : dotSep;\n if (splitAt === -1) return -1;\n\n const ns = qualifiedName.substring(0, splitAt).toLowerCase();\n const cn = qualifiedName.substring(splitAt + 1).toLowerCase();\n\n let schemaIdx = this[_storage].schemaByName.get(ns);\n if (schemaIdx === undefined)\n schemaIdx = this[_storage].schemaByAlias.get(ns);\n if (schemaIdx === undefined) return -1;\n\n const classMap = this[_storage].classByName.get(schemaIdx);\n const classIdx = classMap?.get(cn);\n return classIdx ?? -1;\n }\n\n /** @internal */\n public getTransitiveBases(classIdx: number): ReadonlySet<number> {\n const cached = this[_storage].transitiveBaseCache.get(classIdx);\n if (cached !== undefined) return cached;\n\n const result = new Set<number>();\n this._buildTransitiveBases(classIdx, result);\n this[_storage].transitiveBaseCache.set(classIdx, result);\n return result;\n }\n\n private _buildTransitiveBases(classIdx: number, result: Set<number>): void {\n const cls = this[_storage].classes[classIdx];\n if (cls === undefined) return; // safety: dangling index from excluded schema\n\n if (cls.baseClassIdx !== -1 && !result.has(cls.baseClassIdx)) {\n result.add(cls.baseClassIdx);\n this._buildTransitiveBases(cls.baseClassIdx, result);\n }\n\n for (let i = 0; i < cls.mixinCount; i++) {\n const mixinIdx = this[_storage].classMixins[cls.mixinStartIdx + i];\n if (mixinIdx === -1 || mixinIdx === undefined) continue; // safety: dangling mixin ref\n if (!result.has(mixinIdx)) {\n result.add(mixinIdx);\n this._buildTransitiveBases(mixinIdx, result);\n }\n }\n }\n\n /** @internal */\n public resolveAllProperties(classIdx: number): readonly ResolvedPropertyRef[] {\n const cls = this[_storage].classes[classIdx];\n\n if (cls.type === ClassType.View) {\n // Views don't participate in property inheritance - own properties only\n const result: ResolvedPropertyRef[] = [];\n for (let i = 0; i < cls.ownPropCount; i++) {\n const ref = this[_storage].propertyRefs[cls.ownPropStart + i];\n result.push({ ref, classIdx: -1 });\n }\n return result;\n }\n\n const merged = new Map<string, ResolvedPropertyRef>();\n this._collectProperties(classIdx, merged);\n return Array.from(merged.values());\n }\n\n private _collectProperties(\n classIdx: number,\n merged: Map<string, ResolvedPropertyRef>,\n ): void {\n const cls = this[_storage].classes[classIdx];\n if (cls === undefined) return; // safety: dangling index from excluded schema\n\n // 1. Base class (recursive, depth-first)\n if (cls.baseClassIdx !== -1)\n this._collectProperties(cls.baseClassIdx, merged);\n\n // 2. Mixins in declaration order\n for (let i = 0; i < cls.mixinCount; i++) {\n const mixinIdx = this[_storage].classMixins[cls.mixinStartIdx + i];\n if (mixinIdx === -1 || mixinIdx === undefined) continue; // safety: dangling mixin ref\n this._collectMixinProperties(mixinIdx, merged);\n }\n\n // 3. Own properties - always override\n for (let i = 0; i < cls.ownPropCount; i++) {\n const ref = this[_storage].propertyRefs[cls.ownPropStart + i];\n const nameKey = this[_storage].lowerStrings[this[_storage].propDefs[ref.defIdx].nameStringIdx];\n merged.set(nameKey, { ref, classIdx });\n }\n }\n\n private _collectMixinProperties(\n mixinIdx: number,\n merged: Map<string, ResolvedPropertyRef>,\n ): void {\n const mixin = this[_storage].classes[mixinIdx];\n if (mixin === undefined) return; // safety: dangling index from excluded schema\n\n // Walk mixin's own base chain (mixins can extend other mixins)\n if (mixin.baseClassIdx !== -1)\n this._collectMixinProperties(mixin.baseClassIdx, merged);\n\n // Mixin's own mixins\n for (let i = 0; i < mixin.mixinCount; i++) {\n const subMixinIdx = this[_storage].classMixins[mixin.mixinStartIdx + i];\n if (subMixinIdx === -1 || subMixinIdx === undefined) continue; // safety: dangling mixin ref\n this._collectMixinProperties(subMixinIdx, merged);\n }\n\n // Mixin's own properties - only set if not already present (first mixin wins)\n for (let i = 0; i < mixin.ownPropCount; i++) {\n const ref = this[_storage].propertyRefs[mixin.ownPropStart + i];\n const nameKey = this[_storage].lowerStrings[this[_storage].propDefs[ref.defIdx].nameStringIdx];\n if (!merged.has(nameKey))\n merged.set(nameKey, { ref, classIdx: mixinIdx });\n }\n }\n\n /** @internal */\n public buildDerivedClassMap(): ReadonlyMap<number, readonly number[]> {\n if (this[_storage].derivedClassMap !== undefined) return this[_storage].derivedClassMap;\n\n const map = new Map<number, number[]>();\n for (let i = 0; i < this[_storage].classes.length; i++) {\n const baseIdx = this[_storage].classes[i].baseClassIdx;\n if (baseIdx !== -1) {\n let arr = map.get(baseIdx);\n if (arr === undefined) {\n arr = [];\n map.set(baseIdx, arr);\n }\n arr.push(i);\n }\n }\n this[_storage].derivedClassMap = map;\n return map;\n }\n}\n\n// =====================================================================================\n// SchemaView namespace - flyweight view types\n// =====================================================================================\n\n\n/** @beta */\nexport namespace SchemaView {\n\n /** Lightweight view over a schema in a `SchemaView`. Holds only a view reference and\n * an index - no data duplication, no mutable state.\n * @beta\n */\n export class Schema {\n /** @internal */\n constructor(\n private readonly _ctx: SchemaView,\n /** @internal */ public readonly idx: number,\n ) { }\n\n private get _data() { return this._ctx[_storage].schemas[this.idx]; }\n\n /** Row ID from ec_Schema. Matches `ECInstanceId` in ECDbMeta views, e.g.\n * `SELECT * FROM meta.ECSchemaDef WHERE ECInstanceId = ?`.\n *\n * This is not an array index or internal handle - it is the database row ID from the ec_Schema\n * table, carried through the binary blob so consumers can fall back to ECSQL meta-queries for\n * data not included in the schema view (custom attributes, schema references, etc.).\n */\n public get ecInstanceId(): number { return this._data.ecInstanceId; }\n public get name(): string { return this._ctx[_storage].strings[this._data.nameStringIdx]; }\n public get alias(): string { return this._ctx[_storage].strings[this._data.aliasStringIdx]; }\n public get label(): string {\n const sid = this._data.labelStringIdx;\n return sid !== 0 ? this._ctx[_storage].strings[sid] : this.name;\n }\n public get description(): string {\n const sid = this._data.descriptionStringIdx;\n return sid !== 0 ? this._ctx[_storage].strings[sid] : \"\";\n }\n public get readVersion(): number { return this._data.versionRead; }\n public get writeVersion(): number { return this._data.versionWrite; }\n public get minorVersion(): number { return this._data.versionMinor; }\n\n /** Reflects the `HiddenSchema` custom attribute from `CoreCustomAttributes`.\n * Schemas marked hidden are typically excluded from UI display but remain accessible programmatically. */\n public get isHidden(): boolean { return this._data.isHidden; }\n\n /** \"SchemaName.RR.WW.mm\" - dot-separated, matching the EC schema versioning convention. */\n public get fullName(): string {\n const d = this._data;\n return `${this._ctx[_storage].strings[d.nameStringIdx]}.${String(d.versionRead).padStart(2, \"0\")}.${String(d.versionWrite).padStart(2, \"0\")}.${String(d.versionMinor).padStart(2, \"0\")}`;\n }\n\n /** Find a class by name within this schema (case-insensitive). */\n public getClass(name: string): Class | undefined {\n const classMap = this._ctx[_storage].classByName.get(this.idx);\n const classIdx = classMap?.get(name.toLowerCase());\n return classIdx !== undefined ? createClass(this._ctx, classIdx) : undefined;\n }\n\n /** Iterate classes in this schema. Pass a `ClassType` to filter to a single kind\n * (e.g. `getClasses(ClassType.View)`). Omit the argument to iterate every class\n * regardless of type.\n */\n public *getClasses(filter?: ClassType): IterableIterator<Class> {\n const d = this._data;\n const classes = this._ctx[_storage].classes;\n for (let i = d.classRangeStart; i < d.classRangeStart + d.classCount; i++) {\n if (filter === undefined || classes[i].type === filter)\n yield createClass(this._ctx, i);\n }\n }\n\n /** Find an enumeration by name within this schema (case-insensitive). */\n public getEnumeration(name: string): Enumeration | undefined {\n const map = this._ctx[_storage].enumByName.get(this.idx);\n const idx = map?.get(name.toLowerCase());\n return idx !== undefined ? new Enumeration(this._ctx, idx) : undefined;\n }\n\n /** Find a KindOfQuantity by name within this schema (case-insensitive). */\n public getKindOfQuantity(name: string): KindOfQuantity | undefined {\n const map = this._ctx[_storage].koqByName.get(this.idx);\n const idx = map?.get(name.toLowerCase());\n return idx !== undefined ? new KindOfQuantity(this._ctx, idx) : undefined;\n }\n\n /** Find a PropertyCategory by name within this schema (case-insensitive). */\n public getPropertyCategory(name: string): PropertyCategory | undefined {\n const map = this._ctx[_storage].catByName.get(this.idx);\n const idx = map?.get(name.toLowerCase());\n return idx !== undefined ? new PropertyCategory(this._ctx, idx) : undefined;\n }\n\n /** Iterate all enumerations in this schema. */\n public *getEnumerations(): IterableIterator<Enumeration> {\n const d = this._data;\n for (let i = d.enumRangeStart; i < d.enumRangeStart + d.enumCount; i++)\n yield new Enumeration(this._ctx, i);\n }\n\n /** Iterate all KindOfQuantity items in this schema. */\n public *getKindOfQuantities(): IterableIterator<KindOfQuantity> {\n const d = this._data;\n for (let i = d.koqRangeStart; i < d.koqRangeStart + d.koqCount; i++)\n yield new KindOfQuantity(this._ctx, i);\n }\n\n /** Iterate all PropertyCategory items in this schema. */\n public *getPropertyCategories(): IterableIterator<PropertyCategory> {\n const d = this._data;\n for (let i = d.catRangeStart; i < d.catRangeStart + d.catCount; i++)\n yield new PropertyCategory(this._ctx, i);\n }\n }\n\n /** Lightweight view over a class in a `SchemaView`. For relationship-specific\n * fields (strength, direction, source/target constraints), narrow via `isRelationship()`\n * or `assertRelationship()` to get a `SchemaView.RelationshipClass`.\n * @beta\n */\n export class Class {\n /** @internal */\n constructor(\n protected readonly _ctx: SchemaView,\n /** @internal */ public readonly idx: number,\n ) { }\n\n /** @internal */\n protected get _data() { return this._ctx[_storage].classes[this.idx]; }\n\n /** Row ID from ec_Class. Matches `ECInstanceId` in ECDbMeta views, e.g.\n * `SELECT * FROM meta.ECClassDef WHERE ECInstanceId = ?`.\n */\n public get ecInstanceId(): number { return this._data.ecInstanceId; }\n public get name(): string { return this._ctx[_storage].strings[this._data.nameStringIdx]; }\n public get label(): string {\n const sid = this._data.labelStringIdx;\n return sid !== 0 ? this._ctx[_storage].strings[sid] : this.name;\n }\n public get description(): string {\n const sid = this._data.descriptionStringIdx;\n return sid !== 0 ? this._ctx[_storage].strings[sid] : \"\";\n }\n /** \"SchemaName:ClassName\" - colon-separated, matching the EC class full name convention.\n * Use either \":\" or \".\" as separator when passing to `findClass()`. */\n public get fullName(): string {\n const d = this._data;\n return `${this._ctx[_storage].strings[this._ctx[_storage].schemas[d.schemaIdx].nameStringIdx]}:${this._ctx[_storage].strings[d.nameStringIdx]}`;\n }\n public get schema(): Schema { return new Schema(this._ctx, this._data.schemaIdx); }\n public get type(): ClassType { return this._data.type; }\n public get modifier(): ClassModifier { return this._data.modifier; }\n\n // Type check methods\n\n // disabling lint rule for these because we explicitly want them to mirror same methods in ecschema-metadata, to make the APIs more compatible\n // eslint-disable-next-line @itwin/prefer-get\n public isEntity(): boolean { return this._data.type === ClassType.Entity; }\n /** Type predicate - narrows to `SchemaView.RelationshipClass` for access to strength, direction,\n * source, and target constraint fields. */\n public isRelationship(): this is RelationshipClass { return this._data.type === ClassType.Relationship; }\n // eslint-disable-next-line @itwin/prefer-get\n public isStruct(): boolean { return this._data.type === ClassType.Struct; }\n // eslint-disable-next-line @itwin/prefer-get\n public isMixin(): boolean { return this._data.type === ClassType.Mixin; }\n // eslint-disable-next-line @itwin/prefer-get\n public isCustomAttribute(): boolean { return this._data.type === ClassType.CustomAttribute; }\n // eslint-disable-next-line @itwin/prefer-get\n public isView(): boolean { return this._data.type === ClassType.View; }\n\n /** @see isRelationship */\n public assertRelationship(): asserts this is RelationshipClass {\n if (!this.isRelationship())\n throw new Error(`Expected a relationship class, got type ${this.type} for \"${this.fullName}\"`);\n }\n\n // Modifier checks\n public get isAbstract(): boolean { return this._data.modifier === ClassModifier.Abstract; }\n public get isSealed(): boolean { return this._data.modifier === ClassModifier.Sealed; }\n\n /** Reflects the `HiddenClass` custom attribute from `CoreCustomAttributes`.\n * Returns `true` when this class is directly hidden (via `HiddenClass(Show!=true)` or\n * schema-level `HiddenSchema(ShowClasses!=true)`). Does NOT consider base class inheritance -\n * use `isEffectivelyHidden` for that.\n *\n * Note: `false` means explicitly shown via `HiddenClass(Show=true)`. `undefined` means\n * no `HiddenClass` CA and the schema does not hide its classes. Both are \"not hidden\" for\n * this property, but `isEffectivelyHidden` distinguishes them when walking the hierarchy. */\n public get isHidden(): boolean | undefined { return this._data.isHidden; }\n\n /** Computed hidden status that walks the base class chain (not mixins).\n *\n * Returns `true` if this class is hidden or any ancestor in the base class chain is hidden,\n * unless this class or an intermediate class explicitly breaks the chain with\n * `HiddenClass(Show=true)` (i.e. `isHidden === false`).\n *\n * Mixins are intentionally excluded - a hidden mixin represents a hidden capability,\n * not a hidden identity. */\n public get isEffectivelyHidden(): boolean {\n let data: ClassData | undefined = this._data;\n while (data !== undefined) {\n if (data.isHidden === false) return false; // explicit Show=true breaks the chain\n if (data.isHidden === true) return true;\n // undefined: walk to base class via internal array (avoids allocating Class objects)\n data = data.baseClassIdx !== -1 ? this._ctx[_storage].classes[data.baseClassIdx] : undefined;\n }\n return false;\n }\n\n // Hierarchy\n\n /** Single base class. undefined for root classes. */\n public get baseClass(): Class | undefined {\n const idx = this._data.baseClassIdx;\n return idx !== -1 ? createClass(this._ctx, idx) : undefined;\n }\n\n /** Applied mixins in declaration order. Only meaningful for entity classes. */\n public get mixins(): readonly Class[] {\n const d = this._data;\n if (d.mixinCount === 0) return [];\n const result: Class[] = [];\n for (let i = 0; i < d.mixinCount; i++) {\n const mixinIdx = this._ctx[_storage].classMixins[d.mixinStartIdx + i];\n if (mixinIdx === -1 || mixinIdx === undefined) continue; // safety: dangling mixin ref from excluded schema\n result.push(createClass(this._ctx, mixinIdx));\n }\n return result;\n }\n\n /** IS-A check. Returns true if this class is, or derives from, `other` (transitively, including mixins).\n * Accepts a `SchemaView.Class` or a qualified name string (\"SchemaName:ClassName\").\n */\n public is(classOrName: Class | string): boolean {\n let targetIdx: number;\n if (typeof classOrName === \"string\") {\n targetIdx = this._ctx.resolveClassIdx(classOrName);\n } else if (classOrName._ctx === this._ctx) {\n targetIdx = classOrName.idx;\n } else {\n // Cross-view input: indices are not comparable across SchemaView instances.\n // Resolve by qualified name against this view.\n targetIdx = this._ctx.resolveClassIdx(classOrName.fullName);\n }\n if (targetIdx === -1) return false;\n if (this.idx === targetIdx) return true;\n return this._ctx.getTransitiveBases(this.idx).has(targetIdx);\n }\n\n /** Direct derived classes. Expensive on first call (builds reverse map across all classes). */\n public get derivedClasses(): readonly Class[] {\n const map = this._ctx.buildDerivedClassMap();\n const indices = map.get(this.idx);\n if (indices === undefined) return [];\n return indices.map((i) => createClass(this._ctx, i));\n }\n\n // Properties\n\n /** Find a property by name (case-insensitive). Searches own + inherited.\n *\n * Note: this resolves the full property list and linear-scans it on every call. For workloads\n * that hit `getProperty` repeatedly on the same class with different names, a per-class\n * resolved-property map cache could be added on the view. Not done now - measure before\n * optimizing. */\n public getProperty(name: string): Property | undefined {\n const allProps = this._ctx.resolveAllProperties(this.idx);\n const lowerName = name.toLowerCase();\n for (const rp of allProps) {\n if (this._ctx[_storage].lowerStrings[this._ctx[_storage].propDefs[rp.ref.defIdx].nameStringIdx] === lowerName)\n return createProperty(this._ctx, rp.ref, rp.classIdx);\n }\n return undefined;\n }\n\n /** All properties including inherited, in inheritance order (base first, then mixins, then own). */\n public getProperties(): readonly Property[] {\n const allRefs = this._ctx.resolveAllProperties(this.idx);\n return allRefs.map((rp) => createProperty(this._ctx, rp.ref, rp.classIdx));\n }\n\n /** Own properties only (not inherited), in ordinal order. */\n public getOwnProperties(): readonly Property[] {\n const d = this._data;\n const result: Property[] = [];\n for (let i = 0; i < d.ownPropCount; i++) {\n const ref = this._ctx[_storage].propertyRefs[d.ownPropStart + i];\n result.push(createProperty(this._ctx, ref, this.idx));\n }\n return result;\n }\n }\n\n /** A relationship class with constraint and strength metadata. Created by `createClass()`\n * when the underlying `ClassType` is `Relationship`. Use `cls.isRelationship()` to narrow a\n * `SchemaView.Class` to this type.\n * @beta\n */\n export class RelationshipClass extends Class {\n public get strength(): StrengthType { return this._data.strength; }\n public get strengthDirection(): StrengthDirection { return this._data.strengthDirection; }\n\n public get source(): RelConstraint | undefined {\n const idx = this._data.sourceConstraintIdx;\n return idx !== -1 ? new RelConstraint(this._ctx, idx) : undefined;\n }\n\n public get target(): RelConstraint | undefined {\n const idx = this._data.targetConstraintIdx;\n return idx !== -1 ? new RelConstraint(this._ctx, idx) : undefined;\n }\n }\n\n /** @internal */\n export function createClass(ctx: SchemaView, idx: number): Class {\n if (ctx[_storage].classes[idx].type === ClassType.Relationship)\n return new RelationshipClass(ctx, idx);\n return new Class(ctx, idx);\n }\n\n /** Lightweight view over a property in a `SchemaView`. Subclasses provide\n * type-safe access to kind-specific fields. Use `isPrimitive()`, `isStruct()`,\n * `isArray()`, or `isNavigation()` to narrow, or the corresponding `assert*()` methods.\n * @beta\n */\n export abstract class Property {\n /** @internal */\n constructor(\n protected readonly _ctx: SchemaView,\n private readonly _ref: PropertyRef,\n /** Index of the class that declared or contributed this property through inheritance.\n * For own properties, this is the class itself. For inherited properties, this is the\n * base class or mixin that introduced it. -1 for view properties. */\n private readonly _classIdx: number,\n ) { }\n\n /** @internal */\n protected get _def() { return this._ctx[_storage].propDefs[this._ref.defIdx]; }\n\n /** Row ID from ec_Property. Matches `ECInstanceId` in ECDbMeta views, e.g.\n * `SELECT * FROM meta.ECPropertyDef WHERE ECInstanceId = ?`.\n *\n * Stored per-reference (not per-definition) because each class-property pair has a unique\n * ec_Property row even when the structural definition is deduplicated.\n */\n public get ecInstanceId(): number { return this._ref.ecInstanceId; }\n public get name(): string { return this._ctx[_storage].strings[this._def.nameStringIdx]; }\n /** Display label. Falls back to the property name if no explicit label is set.\n * Labels are stored per-reference (not per-definition) because EC allows class overrides. */\n public get label(): string {\n const labelStringIdx = this._ref.labelStringIdx;\n return labelStringIdx !== 0 ? this._ctx[_storage].strings[labelStringIdx] : this.name;\n }\n public get description(): string {\n const sid = this._def.descriptionStringIdx;\n return sid !== 0 ? this._ctx[_storage].strings[sid] : \"\";\n }\n public get kind(): PropertyKind { return this._def.kind; }\n public get isReadOnly(): boolean { return this._def.isReadOnly; }\n /** Reflects the `HiddenProperty` custom attribute from `CoreCustomAttributes`.\n * Properties marked hidden are typically excluded from UI display but remain accessible programmatically. */\n public get isHidden(): boolean { return this._def.isHidden; }\n /** Display priority. Higher values should be displayed more prominently. 0 means default. */\n public get priority(): number { return this._ref.priority; }\n\n /** The class that declared or contributed this property through inheritance.\n * For own properties, returns the class itself. For inherited properties, returns the\n * base class or mixin that introduced it. Returns `undefined` for view properties.\n * This is the class array index, not the ec_Class.Id from the database.\n * @beta\n */\n public get declaringClass(): Class | undefined {\n return this._classIdx !== -1 ? createClass(this._ctx, this._classIdx) : undefined;\n }\n\n /** Property category, or undefined if none assigned. Available on all property kinds. */\n public get category(): PropertyCategory | undefined {\n const idx = this._def.categoryIdx;\n return idx !== -1 ? new PropertyCategory(this._ctx, idx) : undefined;\n }\n\n // Type guards - real type predicates that narrow `this`\n\n /** True for `SchemaView.PrimitiveProperty` and `SchemaView.PrimitiveArrayProperty`.\n * Matches ecschema-metadata behavior where `isPrimitive()` includes primitive arrays. */\n public isPrimitive(): this is AnyPrimitiveProperty {\n return this._def.kind === PropertyKind.Primitive || this._def.kind === PropertyKind.PrimitiveArray;\n }\n /** True for `SchemaView.StructProperty` and `SchemaView.StructArrayProperty`. */\n public isStruct(): this is AnyStructProperty {\n return this._def.kind === PropertyKind.Struct || this._def.kind === PropertyKind.StructArray;\n }\n /** True for `SchemaView.PrimitiveArrayProperty` and `SchemaView.StructArrayProperty`. */\n public isArray(): this is AnyArrayProperty {\n return this._def.kind === PropertyKind.PrimitiveArray || this._def.kind === PropertyKind.StructArray;\n }\n /** True for `SchemaView.NavigationProperty`. */\n public isNavigation(): this is NavigationProperty {\n return this._def.kind === PropertyKind.Navigation;\n }\n /** True if this property is backed by an enumeration. Enumerations are a facet of primitive\n * properties - an enum property IS a primitive property with an enum binding. Narrows to\n * `AnyPrimitiveProperty` so you can access `enumeration`, `primitiveType`, etc. */\n public isEnumeration(): this is AnyPrimitiveProperty {\n return this._def.enumIdx !== -1;\n }\n\n // Assert methods - throw on mismatch, narrow `this`\n\n /** @see isPrimitive */\n public assertPrimitive(): asserts this is AnyPrimitiveProperty {\n if (!this.isPrimitive())\n throw new Error(`Expected a primitive property, got ${PropertyKind[this.kind]}`);\n }\n /** @see isStruct */\n public assertStruct(): asserts this is AnyStructProperty {\n if (!this.isStruct())\n throw new Error(`Expected a struct property, got ${PropertyKind[this.kind]}`);\n }\n /** @see isArray */\n public assertArray(): asserts this is AnyArrayProperty {\n if (!this.isArray())\n throw new Error(`Expected an array property, got ${PropertyKind[this.kind]}`);\n }\n /** @see isNavigation */\n public assertNavigation(): asserts this is NavigationProperty {\n if (!this.isNavigation())\n throw new Error(`Expected a navigation property, got ${PropertyKind[this.kind]}`);\n }\n }\n\n /** A scalar primitive property. May optionally be backed by an enumeration -\n * check `isEnumeration()` or `enumeration`.\n * @beta\n */\n export class PrimitiveProperty extends Property {\n public get primitiveType(): SchemaViewPrimitiveType { return this._def.primitiveType; }\n public get extendedTypeName(): string | undefined {\n const sid = this._def.extTypeStringIdx;\n return sid !== 0 ? this._ctx[_storage].strings[sid] : undefined;\n }\n public get enumeration(): Enumeration | undefined {\n const idx = this._def.enumIdx;\n return idx !== -1 ? new Enumeration(this._ctx, idx) : undefined;\n }\n public get kindOfQuantity(): KindOfQuantity | undefined {\n const idx = this._def.koqIdx;\n return idx !== -1 ? new KindOfQuantity(this._ctx, idx) : undefined;\n }\n }\n\n /** An array of primitive values. Same primitive/enum fields as `PrimitiveProperty`,\n * plus array bounds.\n * @beta\n */\n export class PrimitiveArrayProperty extends Property {\n public get primitiveType(): SchemaViewPrimitiveType { return this._def.primitiveType; }\n public get extendedTypeName(): string | undefined {\n const sid = this._def.extTypeStringIdx;\n return sid !== 0 ? this._ctx[_storage].strings[sid] : undefined;\n }\n public get enumeration(): Enumeration | undefined {\n const idx = this._def.enumIdx;\n return idx !== -1 ? new Enumeration(this._ctx, idx) : undefined;\n }\n public get kindOfQuantity(): KindOfQuantity | undefined {\n const idx = this._def.koqIdx;\n return idx !== -1 ? new KindOfQuantity(this._ctx, idx) : undefined;\n }\n public get arrayMinOccurs(): number | undefined { return this._def.arrayMinOccurs; }\n public get arrayMaxOccurs(): number | undefined { return this._def.arrayMaxOccurs; }\n }\n\n /** A scalar struct property. `structClass` is non-nullable - the binary parser drops\n * properties whose struct class can't be resolved (e.g. from excluded schemas).\n * @beta\n */\n export class StructProperty extends Property {\n public get structClass(): Class {\n return createClass(this._ctx, this._def.structClassIdx);\n }\n }\n\n /** An array of struct values. Same struct field as `StructProperty`, plus array bounds.\n * @beta\n */\n export class StructArrayProperty extends Property {\n public get structClass(): Class {\n return createClass(this._ctx, this._def.structClassIdx);\n }\n public get arrayMinOccurs(): number | undefined { return this._def.arrayMinOccurs; }\n public get arrayMaxOccurs(): number | undefined { return this._def.arrayMaxOccurs; }\n }\n\n /** A navigation property. `relationshipClass` is non-nullable - the binary parser drops\n * properties whose relationship class can't be resolved.\n * @beta\n */\n export class NavigationProperty extends Property {\n public get direction(): StrengthDirection { return this._def.navDirection; }\n public get relationshipClass(): RelationshipClass {\n return createClass(this._ctx, this._def.navRelClassIdx) as RelationshipClass;\n }\n }\n\n /** Any primitive property (scalar or array). Useful for accessing `primitiveType`,\n * `extendedTypeName`, `enumeration`, `kindOfQuantity` after an `isPrimitive()` check.\n * @beta\n */\n export type AnyPrimitiveProperty = PrimitiveProperty | PrimitiveArrayProperty;\n\n /** Any struct property (scalar or array). Useful for accessing `structClass` after an `isStruct()` check.\n * @beta\n */\n export type AnyStructProperty = StructProperty | StructArrayProperty;\n\n /** Any array property (primitive or struct). Useful for accessing `arrayMinOccurs`/`arrayMaxOccurs`\n * after an `isArray()` check.\n * @beta\n */\n export type AnyArrayProperty = PrimitiveArrayProperty | StructArrayProperty;\n\n /** Union of all concrete property types.\n * @beta\n */\n export type AnyProperty = PrimitiveProperty | PrimitiveArrayProperty\n | StructProperty | StructArrayProperty | NavigationProperty;\n\n /** @internal */\n export function createProperty(ctx: SchemaView, ref: PropertyRef, classIdx: number): Property {\n const kind = ctx[_storage].propDefs[ref.defIdx].kind;\n switch (kind) {\n case PropertyKind.Primitive: return new PrimitiveProperty(ctx, ref, classIdx);\n case PropertyKind.PrimitiveArray: return new PrimitiveArrayProperty(ctx, ref, classIdx);\n case PropertyKind.Struct: return new StructProperty(ctx, ref, classIdx);\n case PropertyKind.StructArray: return new StructArrayProperty(ctx, ref, classIdx);\n case PropertyKind.Navigation: return new NavigationProperty(ctx, ref, classIdx);\n default: throw new Error(`Unknown PropertyKind ${kind as number} for property \"${ctx[_storage].strings[ctx[_storage].propDefs[ref.defIdx].nameStringIdx]}\"`);\n }\n }\n\n /** Lightweight view over an enumeration in a `SchemaView`.\n * @beta\n */\n export class Enumeration {\n /** @internal */\n constructor(\n private readonly _ctx: SchemaView,\n /** @internal */ public readonly idx: number,\n ) { }\n\n private get _data() { return this._ctx[_storage].enumerations[this.idx]; }\n\n /** Row ID from ec_Enumeration. Matches `ECInstanceId` in ECDbMeta views, e.g.\n * `SELECT * FROM meta.ECEnumerationDef WHERE ECInstanceId = ?`.\n */\n public get ecInstanceId(): number { return this._data.ecInstanceId; }\n public get name(): string { return this._ctx[_storage].strings[this._data.nameStringIdx]; }\n public get label(): string {\n const sid = this._data.labelStringIdx;\n return sid !== 0 ? this._ctx[_storage].strings[sid] : this.name;\n }\n public get description(): string {\n const sid = this._data.descriptionStringIdx;\n return sid !== 0 ? this._ctx[_storage].strings[sid] : \"\";\n }\n /** \"SchemaName:EnumName\" - colon-separated. */\n public get fullName(): string {\n const d = this._data;\n return `${this._ctx[_storage].strings[this._ctx[_storage].schemas[d.schemaIdx].nameStringIdx]}:${this._ctx[_storage].strings[d.nameStringIdx]}`;\n }\n public get schema(): Schema { return new Schema(this._ctx, this._data.schemaIdx); }\n public get primitiveType(): SchemaViewPrimitiveType { return this._data.primitiveType; }\n public get isStrict(): boolean { return this._data.isStrict; }\n\n /** Iterate enumerators in declaration order. */\n public *getEnumerators(): IterableIterator<Enumerator> {\n const d = this._data;\n for (let i = d.enumeratorStart; i < d.enumeratorStart + d.enumeratorCount; i++)\n yield new Enumerator(this._ctx, i);\n }\n\n /** Find enumerator by name (case-insensitive). */\n public getEnumeratorByName(name: string): Enumerator | undefined {\n const lower = name.toLowerCase();\n const d = this._data;\n for (let i = d.enumeratorStart; i < d.enumeratorStart + d.enumeratorCount; i++) {\n if (this._ctx[_storage].lowerStrings[this._ctx[_storage].enumerators[i].nameStringIdx] === lower)\n return new Enumerator(this._ctx, i);\n }\n return undefined;\n }\n\n /** Find enumerator by value. */\n public getEnumerator(value: number | string): Enumerator | undefined {\n const d = this._data;\n for (let i = d.enumeratorStart; i < d.enumeratorStart + d.enumeratorCount; i++) {\n if (this._ctx[_storage].enumerators[i].value === value)\n return new Enumerator(this._ctx, i);\n }\n return undefined;\n }\n }\n\n /** Thin view over an enumerator.\n * @beta\n */\n export class Enumerator {\n /** @internal */\n constructor(\n private readonly _ctx: SchemaView,\n /** @internal */ public readonly idx: number,\n ) { }\n\n private get _data() { return this._ctx[_storage].enumerators[this.idx]; }\n\n public get name(): string { return this._ctx[_storage].strings[this._data.nameStringIdx]; }\n public get label(): string {\n const sid = this._data.labelStringIdx;\n return sid !== 0 ? this._ctx[_storage].strings[sid] : this.name;\n }\n public get description(): string {\n const sid = this._data.descriptionStringIdx;\n return sid !== 0 ? this._ctx[_storage].strings[sid] : \"\";\n }\n public get value(): number | string { return this._data.value; }\n }\n\n /** A parsed presentation format override from a KindOfQuantity. Names are alias-qualified\n * as stored in ECDb (e.g. `\"f:DefaultRealU\"`, `\"u:M\"`). The alias can be resolved to a\n * full schema name via the schema's alias if needed.\n *\n * Format string syntax: `formatName(precision)[unitName|label][unitName|label]...`\n * @beta\n */\n export interface PresentationFormat {\n /** Format name (alias-qualified), e.g. `\"f:DefaultRealU\"`. */\n readonly name: string;\n /** Precision override. `undefined` if the format string does not override precision. */\n readonly precision?: number;\n /** Unit overrides as `[unitName, labelOverride]` tuples. `unitName` is alias-qualified\n * (e.g. `\"u:M\"`). `labelOverride` is `undefined` when no label was specified, or a\n * string (possibly empty) when a `|` separator was present.\n */\n readonly unitAndLabels?: ReadonlyArray<readonly [string, string | undefined]>;\n }\n\n /** Parse a single format override string into a `PresentationFormat`.\n * @internal\n */\n export function parseFormatString(formatString: string): PresentationFormat {\n const nameMatch = /^([\\w.:]+)/.exec(formatString);\n if (!nameMatch)\n return { name: formatString };\n\n const name = nameMatch[1];\n const precMatch = /\\((\\d+)\\)/.exec(formatString);\n const precision = precMatch ? parseInt(precMatch[1], 10) : undefined;\n\n const bracketRgx = /\\[([^\\]]+)\\]/g;\n const units: Array<readonly [string, string | undefined]> = [];\n let m;\n while ((m = bracketRgx.exec(formatString)) !== null) {\n const pipeIdx = m[1].indexOf(\"|\");\n units.push(pipeIdx < 0 ? [m[1], undefined] : [m[1].substring(0, pipeIdx), m[1].substring(pipeIdx + 1)]);\n }\n\n return { name, precision, unitAndLabels: units.length > 0 ? units : undefined };\n }\n\n /** Lightweight view over a KindOfQuantity in a `SchemaView`.\n * @beta\n */\n export class KindOfQuantity {\n /** @internal */\n constructor(\n private readonly _ctx: SchemaView,\n /** @internal */ public readonly idx: number,\n ) { }\n\n private get _data() { return this._ctx[_storage].koqs[this.idx]; }\n\n /** Row ID from ec_KindOfQuantity. Matches `ECInstanceId` in ECDbMeta views, e.g.\n * `SELECT * FROM meta.ECKindOfQuantityDef WHERE ECInstanceId = ?`.\n */\n public get ecInstanceId(): number { return this._data.ecInstanceId; }\n public get name(): string { return this._ctx[_storage].strings[this._data.nameStringIdx]; }\n public get label(): string {\n const sid = this._data.labelStringIdx;\n return sid !== 0 ? this._ctx[_storage].strings[sid] : this.name;\n }\n public get description(): string {\n const sid = this._data.descriptionStringIdx;\n return sid !== 0 ? this._ctx[_storage].strings[sid] : \"\";\n }\n /** \"SchemaName:KoqName\" - colon-separated. */\n public get fullName(): string {\n const d = this._data;\n return `${this._ctx[_storage].strings[this._ctx[_storage].schemas[d.schemaIdx].nameStringIdx]}:${this._ctx[_storage].strings[d.nameStringIdx]}`;\n }\n public get schema(): Schema { return new Schema(this._ctx, this._data.schemaIdx); }\n public get relativeError(): number { return this._data.relativeError; }\n /** Persistence unit as a full name string, e.g. \"Units:M\".\n *\n * On iModels still on ECDb profile `4.0.0.1` (predates the 2018 EC3.2 Units/Formats migration)\n * this string is in legacy FUS format rather than the EC3.2 alias-qualified form.\n * Upgrade the iModel's ECDb profile to get EC3.2 strings.\n */\n public get persistenceUnit(): string {\n const sid = this._data.persistenceUnitStringIdx;\n return sid !== 0 ? this._ctx[_storage].strings[sid] : \"\";\n }\n // EC XML serializes this as \"presentationUnits\"; we use \"presentationFormats\" to align with KindOfQuantity.presentationFormats in ecschema-metadata.\n /** Raw presentation format string as stored in ECDb (`ec_KindOfQuantity.PresentationUnits`).\n * This is a JSON array of format override strings. Empty string if none are defined.\n * Prefer `presentationFormats` for structured access.\n *\n * On iModels still on ECDb profile `4.0.0.1` (predates the 2018 EC3.2 Units/Formats migration)\n * the strings are in legacy FUS format and will not parse via `presentationFormats`.\n * Upgrade the iModel's ECDb profile to get EC3.2 strings.\n */\n public get presentationFormatsRaw(): string {\n const sid = this._data.presentationFormatsStringIdx;\n return sid !== 0 ? this._ctx[_storage].strings[sid] : \"\";\n }\n\n /** Presentation formats parsed into structured overrides. Each entry has the format name\n * (alias-qualified, e.g. `\"f:DefaultRealU\"`), optional precision override, and optional\n * unit-and-label overrides. Returns an empty array if no presentation formats are defined.\n *\n * Example - given a raw string of `[\"f:DefaultRealU(4)[u:M_PER_SEC_SQ]\",\"f:DefaultRealU(4)[u:CM_PER_SEC_SQ]\"]`:\n * ```ts\n * // [\n * // { name: \"f:DefaultRealU\", precision: 4, unitAndLabels: [[\"u:M_PER_SEC_SQ\", undefined]] },\n * // { name: \"f:DefaultRealU\", precision: 4, unitAndLabels: [[\"u:CM_PER_SEC_SQ\", undefined]] },\n * // ]\n * ```\n */\n public get presentationFormats(): readonly PresentationFormat[] {\n const raw = this.presentationFormatsRaw;\n if (raw === \"\")\n return [];\n const formats: string[] = JSON.parse(raw);\n return formats.map((f) => parseFormatString(f));\n }\n }\n\n /** Lightweight view over a PropertyCategory in a `SchemaView`.\n * @beta\n */\n export class PropertyCategory {\n /** @internal */\n constructor(\n private readonly _ctx: SchemaView,\n /** @internal */ public readonly idx: number,\n ) { }\n\n private get _data() { return this._ctx[_storage].propCategories[this.idx]; }\n\n /** Row ID from ec_PropertyCategory. Matches `ECInstanceId` in ECDbMeta views, e.g.\n * `SELECT * FROM meta.ECPropertyCategoryDef WHERE ECInstanceId = ?`.\n */\n public get ecInstanceId(): number { return this._data.ecInstanceId; }\n public get name(): string { return this._ctx[_storage].strings[this._data.nameStringIdx]; }\n public get label(): string {\n const sid = this._data.labelStringIdx;\n return sid !== 0 ? this._ctx[_storage].strings[sid] : this.name;\n }\n public get description(): string {\n const sid = this._data.descriptionStringIdx;\n return sid !== 0 ? this._ctx[_storage].strings[sid] : \"\";\n }\n /** \"SchemaName:CategoryName\" - colon-separated. */\n public get fullName(): string {\n const d = this._data;\n return `${this._ctx[_storage].strings[this._ctx[_storage].schemas[d.schemaIdx].nameStringIdx]}:${this._ctx[_storage].strings[d.nameStringIdx]}`;\n }\n public get schema(): Schema { return new Schema(this._ctx, this._data.schemaIdx); }\n public get priority(): number { return this._data.priority; }\n }\n\n /** Lightweight view over a relationship constraint in a `SchemaView`.\n * @beta\n */\n export class RelConstraint {\n /** @internal */\n constructor(\n private readonly _ctx: SchemaView,\n private readonly _idx: number,\n ) { }\n\n private get _data() { return this._ctx[_storage].relConstraints[this._idx]; }\n\n public get abstractConstraint(): Class | undefined {\n const idx = this._data.abstractConstraintIdx;\n return idx !== -1 ? createClass(this._ctx, idx) : undefined;\n }\n public get polymorphic(): boolean { return this._data.polymorphic; }\n /** Multiplicity lower bound (0 = unbounded). */\n public get multiplicityLower(): number { return this._data.multiplicityLower; }\n /** Multiplicity upper bound (0 = unbounded). */\n public get multiplicityUpper(): number { return this._data.multiplicityUpper; }\n /** Role label string, or empty if not set. */\n public get roleLabel(): string {\n const sid = this._data.roleLabelStringIdx;\n return sid !== 0 ? this._ctx[_storage].strings[sid] : \"\";\n }\n public get constraintClasses(): readonly Class[] {\n const d = this._data;\n const result: Class[] = [];\n for (let i = 0; i < d.classRefCount; i++)\n result.push(createClass(this._ctx, this._ctx[_storage].constraintClassRefs[d.classRefStart + i]));\n return result;\n }\n }\n}\n\n// =====================================================================================\n// SchemaViewBuilder\n// =====================================================================================\n\n/** Builder for constructing an immutable `SchemaView`.\n *\n * Collects data during binary blob parsing, then freezes it into a view.\n * Handles string interning and property definition deduplication.\n *\n * Consumers should not use this directly - read views via `IModelDb.getSchemaView`\n * / `IModelConnection.getSchemaView` (or `SchemaView.fromBinary` if you have a raw blob).\n * @internal\n */\nexport class SchemaViewBuilder {\n private readonly _strings: string[] = [\"\"]; // SID 0 = empty string\n private readonly _lowerStrings: string[] = [\"\"];\n private readonly _stringMap = new Map<string, number>(); // original value -> SID\n\n private readonly _schemas: SchemaData[] = [];\n private readonly _classes: ClassData[] = [];\n private readonly _classMixins: number[] = [];\n private readonly _propDefs: PropertyDef[] = [];\n private readonly _propertyRefs: PropertyRef[] = [];\n private readonly _relConstraints: RelConstraintData[] = [];\n private readonly _constraintClassRefs: number[] = [];\n private readonly _enumerations: EnumerationData[] = [];\n private readonly _enumerators: EnumeratorData[] = [];\n private readonly _koqs: KoqData[] = [];\n private readonly _propCategories: PropCategoryData[] = [];\n\n // For PropertyDef dedup\n private readonly _propDefMap = new Map<string, number>(); // signature string -> defIdx\n\n /** Intern a string, returning its SID. Empty/undefined strings return 0.\n * Interning is case-sensitive - \"MyLabel\" and \"MYLABEL\" get distinct SIDs.\n * The `lowerStrings` array provides case-insensitive lookup without mutating display values.\n */\n public internString(value: string | undefined): number {\n if (value === undefined || value === \"\") return 0;\n const existing = this._stringMap.get(value);\n if (existing !== undefined) return existing;\n const sid = this._strings.length;\n this._strings.push(value);\n this._lowerStrings.push(value.toLowerCase());\n this._stringMap.set(value, sid);\n return sid;\n }\n\n /** Add a schema. Returns its index. */\n public addSchema(data: SchemaData): number {\n const idx = this._schemas.length;\n this._schemas.push(data);\n return idx;\n }\n\n /** Add a class. Returns its index. Must be called after the owning schema. */\n public addClass(data: ClassData): number {\n const idx = this._classes.length;\n this._classes.push(data);\n return idx;\n }\n\n /** Add a property definition with deduplication. Returns the def index (possibly existing). */\n public addPropertyDef(data: PropertyDef): number {\n const sig = this._propDefSignature(data);\n const existing = this._propDefMap.get(sig);\n if (existing !== undefined) return existing;\n\n const idx = this._propDefs.length;\n this._propDefs.push(data);\n this._propDefMap.set(sig, idx);\n return idx;\n }\n\n /** Append a property reference to the flat refs array. */\n public addPropertyRef(ref: PropertyRef): void {\n this._propertyRefs.push(ref);\n }\n\n /** Add an enumeration. Returns its index. */\n public addEnumeration(data: EnumerationData): number {\n const idx = this._enumerations.length;\n this._enumerations.push(data);\n return idx;\n }\n\n /** Append an enumerator to the flat enumerators array. */\n public addEnumerator(data: EnumeratorData): void {\n this._enumerators.push(data);\n }\n\n /** Add a KindOfQuantity. Returns its index. */\n public addKoq(data: KoqData): number {\n const idx = this._koqs.length;\n this._koqs.push(data);\n return idx;\n }\n\n /** Add a PropertyCategory. Returns its index. */\n public addPropertyCategory(data: PropCategoryData): number {\n const idx = this._propCategories.length;\n this._propCategories.push(data);\n return idx;\n }\n\n /** Add a relationship constraint. Returns its index. */\n public addRelConstraint(data: RelConstraintData): number {\n const idx = this._relConstraints.length;\n this._relConstraints.push(data);\n return idx;\n }\n\n /** Append a constraint class reference to the flat array. */\n public addConstraintClassRef(classIdx: number): void {\n this._constraintClassRefs.push(classIdx);\n }\n\n /** Append a mixin class reference to the flat array. */\n public addClassMixin(classIdx: number): void {\n this._classMixins.push(classIdx);\n }\n\n /** The current count of property refs (used to set ownPropStart on ClassData). */\n public get propertyRefCount(): number { return this._propertyRefs.length; }\n\n /** The current count of enumerators (used to set enumeratorStart on EnumerationData). */\n public get enumeratorCount(): number { return this._enumerators.length; }\n\n /** The current count of constraint class refs (used to set classRefStart). */\n public get constraintClassRefCount(): number { return this._constraintClassRefs.length; }\n\n /** The current count of class mixins (used to set mixinStartIdx). */\n public get classMixinCount(): number { return this._classMixins.length; }\n\n /** Get a string by SID. @internal */\n public getString(sid: number): string { return this._strings[sid]; }\n\n /** Replace class data at the given index (used during deferred cross-ref resolution). @internal */\n public updateClass(classIdx: number, data: ClassData): void { this._classes[classIdx] = data; }\n\n /** Update range fields on a schema (used after all items for a schema are collected). @internal */\n public updateSchemaRanges(schemaIdx: number, ranges: { classRangeStart: number; classCount: number; enumRangeStart: number; enumCount: number; koqRangeStart: number; koqCount: number; catRangeStart: number; catCount: number }): void {\n const s = this._schemas[schemaIdx];\n this._schemas[schemaIdx] = { ...s, ...ranges };\n }\n\n /** Freeze all data and produce an immutable SchemaView. */\n public build(schemaToken?: string): SchemaView {\n const schemaByName = new Map<string, number>();\n const schemaByAlias = new Map<string, number>();\n const classByName = new Map<number, Map<string, number>>();\n const enumByName = new Map<number, Map<string, number>>();\n const koqByName = new Map<number, Map<string, number>>();\n const catByName = new Map<number, Map<string, number>>();\n\n // Build schema lookup maps\n for (let i = 0; i < this._schemas.length; i++) {\n const s = this._schemas[i];\n schemaByName.set(this._lowerStrings[s.nameStringIdx], i);\n if (s.aliasStringIdx !== 0)\n schemaByAlias.set(this._lowerStrings[s.aliasStringIdx], i);\n\n // Build class-by-name map for this schema\n const classMap = new Map<string, number>();\n for (let c = s.classRangeStart; c < s.classRangeStart + s.classCount; c++)\n classMap.set(this._lowerStrings[this._classes[c].nameStringIdx], c);\n classByName.set(i, classMap);\n\n // Build enum-by-name map for this schema\n const eMap = new Map<string, number>();\n for (let e = s.enumRangeStart; e < s.enumRangeStart + s.enumCount; e++)\n eMap.set(this._lowerStrings[this._enumerations[e].nameStringIdx], e);\n enumByName.set(i, eMap);\n\n // Build koq-by-name map for this schema\n const kMap = new Map<string, number>();\n for (let k = s.koqRangeStart; k < s.koqRangeStart + s.koqCount; k++)\n kMap.set(this._lowerStrings[this._koqs[k].nameStringIdx], k);\n koqByName.set(i, kMap);\n\n // Build category-by-name map for this schema\n const cMap = new Map<string, number>();\n for (let p = s.catRangeStart; p < s.catRangeStart + s.catCount; p++)\n cMap.set(this._lowerStrings[this._propCategories[p].nameStringIdx], p);\n catByName.set(i, cMap);\n }\n\n return new SchemaView({\n strings: this._strings,\n lowerStrings: this._lowerStrings,\n schemas: this._schemas,\n classes: this._classes,\n classMixins: this._classMixins,\n propDefs: this._propDefs,\n propertyRefs: this._propertyRefs,\n relConstraints: this._relConstraints,\n constraintClassRefs: this._constraintClassRefs,\n enumerations: this._enumerations,\n enumerators: this._enumerators,\n koqs: this._koqs,\n propCategories: this._propCategories,\n schemaByName,\n schemaByAlias,\n classByName,\n enumByName,\n koqByName,\n catByName,\n }, schemaToken);\n }\n\n /** Produce a dedup signature for a PropertyDef. Label and priority are excluded because\n * they are per-PropertyRef overrides, not part of the structural definition.\n * Uses SIDs (not lowercase strings) for name/description so that case-preserving names\n * stay distinct - matching the C++ writer's dedup behavior. */\n private _propDefSignature(def: PropertyDef): string {\n return `${def.nameStringIdx}|${def.kind}|${def.primitiveType}|${def.extTypeStringIdx}|${def.enumIdx}|${def.koqIdx}|${def.structClassIdx}|${def.navRelClassIdx}|${def.navDirection}|${def.categoryIdx}|${def.isReadOnly ? 1 : 0}|${def.isHidden ? 1 : 0}|${def.arrayMinOccurs}|${def.arrayMaxOccurs}|${def.descriptionStringIdx}`;\n }\n}\n"]}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/** @packageDocumentation
|
|
2
|
-
* @module Schema
|
|
3
|
-
*/
|
|
4
|
-
import { SchemaView } from "./SchemaView";
|
|
5
|
-
/** Parse a schema view blob (binary format) into a `SchemaView`.
|
|
6
|
-
*
|
|
7
|
-
* Layout: Header, PropertyDefTable, SchemaTable, EnumTable, KoQTable, PropCatTable, ClassTable, StringTable.
|
|
8
|
-
* Each table is count-prefixed. Schema items carry their schema's ecInstanceId for ownership resolution.
|
|
9
|
-
* Classes have count-prefixed inline sub-items (base classes, property refs, constraints).
|
|
10
|
-
*
|
|
11
|
-
* Consumers should call `SchemaView.fromBinary` instead - this function is the low-level
|
|
12
|
-
* implementation behind it.
|
|
13
|
-
* @internal
|
|
14
|
-
*/
|
|
15
|
-
export declare function parseSchemaViewBlob(data: Uint8Array, schemaToken?: string): SchemaView;
|
|
16
|
-
//# sourceMappingURL=SchemaViewBinaryReader.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaViewBinaryReader.d.ts","sourceRoot":"","sources":["../../src/SchemaViewBinaryReader.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,UAAU,EAAqB,MAAM,cAAc,CAAC;AA+J7D;;;;;;;;;GASG;AACH,wBAAgB,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AC;IAED,OAAO,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;AACpC,CAAC","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 { BentleyError, Logger } from \"@itwin/core-bentley\";\nimport { SchemaView, SchemaViewBuilder } from \"./SchemaView\";\nimport { StrengthDirection, StrengthType } from \"./ECObjects\";\nimport { ClassData, ClassModifier, ClassType, PropertyDef, PropertyKind, schemaViewFormatVersion, SchemaViewPrimitiveType } from \"./SchemaViewInterfaces\";\n\n/** Binary record tags for the SchemaView blob format.\n * Each tag marks a flat, count-prefixed table. Must stay in sync with the C++ writer. */\nenum Tag {\n PropertyDefTable = 0x0A,\n SchemaTable = 0x10,\n EnumTable = 0x20,\n KoQTable = 0x30,\n PropCatTable = 0x31,\n ClassTable = 0x40,\n}\n\nconst MAGIC = 0x43534348; // \"CSCH\"\n\n/** Low-level binary reader for the SchemaView blob. */\nclass BinaryReader {\n private _view: DataView;\n private _bytes: Uint8Array;\n private _pos: number;\n private _strings: string[];\n\n constructor(data: Uint8Array) {\n this._bytes = data;\n this._view = new DataView(data.buffer, data.byteOffset, data.byteLength);\n this._pos = 0;\n this._strings = [];\n }\n\n public readU8(): number {\n if (this._pos >= this._bytes.length)\n throw new Error(`SchemaView blob truncated: cannot read u8 at offset ${this._pos} (length ${this._bytes.length})`);\n return this._bytes[this._pos++];\n }\n public readU16(): number { const v = this._view.getUint16(this._pos, true); this._pos += 2; return v; }\n public readU32(): number { const v = this._view.getUint32(this._pos, true); this._pos += 4; return v; }\n public readI32(): number { const v = this._view.getInt32(this._pos, true); this._pos += 4; return v; }\n public readF64(): number { const v = this._view.getFloat64(this._pos, true); this._pos += 8; return v; }\n public get pos(): number { return this._pos; }\n public set pos(v: number) { this._pos = v; }\n\n /** Read a string-table reference (U32 index) and return the original string. */\n public readSRef(): string {\n const idx = this.readU32();\n if (idx >= this._strings.length)\n throw new Error(`SchemaView blob: string reference ${idx} out of range (string table size ${this._strings.length})`);\n return this._strings[idx];\n }\n\n /** Validate a count-prefixed table header: the declared count cannot exceed what the remaining\n * buffer could plausibly hold. Each entry consumes at least `minBytesPerEntry` bytes. */\n public validateCount(count: number, minBytesPerEntry: number, tableName: string): void {\n const remaining = this._bytes.length - this._pos;\n if (count > remaining / Math.max(1, minBytesPerEntry))\n throw new Error(`SchemaView blob: ${tableName} count ${count} exceeds remaining buffer (${remaining} bytes)`);\n }\n\n /** Parse the string table at the given offset. */\n public parseStringTable(offset: number): void {\n if (offset > this._bytes.length)\n throw new Error(`SchemaView blob: stringTable offset ${offset} is past end of blob (length ${this._bytes.length})`);\n const saved = this._pos;\n this._pos = offset;\n const count = this.readU32();\n // Each entry is at minimum a 4-byte length prefix - a count larger than the remaining bytes\n // cannot possibly be valid and would cause a huge `new Array` allocation on a malformed blob.\n const remaining = this._bytes.length - this._pos;\n if (count > remaining / 4)\n throw new Error(`SchemaView blob: stringTable count ${count} exceeds remaining buffer (${remaining} bytes)`);\n this._strings = new Array(count);\n const decoder = new TextDecoder();\n for (let i = 0; i < count; i++) {\n const len = this.readU32();\n if (len === 0) {\n this._strings[i] = \"\";\n } else {\n if (len > this._bytes.length - this._pos)\n throw new Error(`SchemaView blob: string entry ${i} has length ${len} but only ${this._bytes.length - this._pos} bytes remain`);\n this._strings[i] = decoder.decode(this._bytes.subarray(this._pos, this._pos + len));\n this._pos += len;\n }\n }\n this._pos = saved;\n }\n}\n\n/** Read a U32 that uses 0xFFFFFFFF as a sentinel for \"not set\". */\nfunction readOptionalU32(reader: BinaryReader): number | undefined {\n const v = reader.readU32();\n return v === 0xFFFFFFFF ? undefined : v;\n}\n\n/** Temporary per-class data collected during parsing, before cross-references are resolved. */\ninterface PendingClass {\n schemaIdx: number;\n classIdx: number;\n ecInstanceId: number;\n nameStringIdx: number;\n labelStringIdx: number;\n descriptionStringIdx: number;\n type: ClassType;\n modifier: ClassModifier;\n relStrength: StrengthType;\n relStrengthDir: StrengthDirection;\n baseClasses: Array<{ schemaName: string; className: string; ordinal: number }>;\n propRefs: PendingPropRef[];\n constraints: PendingConstraint[];\n schemaName: string;\n isHidden: boolean | undefined;\n}\n\n/** A property reference from the binary PropertyDefTable. During parsing, `preDefIdx` stores the\n * index into the pre-parsed def array; during resolution it's mapped to the builder's deduped defIdx. */\ninterface PendingPropRef {\n preDefIdx: number; // index into preParsedDefs (mapped to builder defIdx during resolution)\n ecInstanceId: number;\n labelStringIdx: number;\n priority: number;\n}\n\n/** Pre-parsed property definition from the binary PropertyDefTable, with row ID cross-refs. */\ninterface PreParsedDef {\n name: string;\n description: string;\n kind: PropertyKind;\n primitiveType: SchemaViewPrimitiveType;\n extType: string;\n enumRowId: number; // ec_Enumeration.Id (0 = none)\n structClassRowId: number; // ec_Class.Id for struct type (0 = none)\n koqRowId: number; // ec_KindOfQuantity.Id (0 = none)\n catRowId: number; // ec_PropertyCategory.Id (0 = none)\n arrayMinOccurs: number | undefined;\n arrayMaxOccurs: number | undefined;\n navRelClassRowId: number; // ec_Class.Id for nav relationship (0 = none)\n navDirection: StrengthDirection;\n isReadonly: boolean;\n isHidden: boolean;\n}\n\ninterface PendingConstraint {\n relEnd: number; // 0=source, 1=target\n isPolymorphic: boolean;\n multiplicityLower: number;\n multiplicityUpper: number;\n roleLabel: string;\n abstractSchemaName: string;\n abstractClassName: string;\n constraintClasses: Array<{ schemaName: string; className: string }>;\n}\n\n/** Helper: read a tag byte and validate it matches the expected tag. */\nfunction expectTag(reader: BinaryReader, expected: Tag): void {\n const tag = reader.readU8();\n if (tag !== expected)\n throw new Error(`Expected tag 0x${expected.toString(16)} but found 0x${tag.toString(16)} at offset ${reader.pos - 1}`);\n}\n\n/** Parse a schema view blob (binary format) into a `SchemaView`.\n *\n * Layout: Header, PropertyDefTable, SchemaTable, EnumTable, KoQTable, PropCatTable, ClassTable, StringTable.\n * Each table is count-prefixed. Schema items carry their schema's ecInstanceId for ownership resolution.\n * Classes have count-prefixed inline sub-items (base classes, property refs, constraints).\n *\n * Consumers should call `SchemaView.fromBinary` instead - this function is the low-level\n * implementation behind it.\n * @internal\n */\nexport function parseSchemaViewBlob(data: Uint8Array, schemaToken?: string): SchemaView {\n const reader = new BinaryReader(data);\n\n // Header: magic(4) + version(1) + stringTableOffset(4)\n const magic = reader.readU32();\n if (magic !== MAGIC)\n throw new Error(`Invalid SchemaView blob magic: 0x${magic.toString(16)}, expected 0x${MAGIC.toString(16)}`);\n const version = reader.readU8();\n if (version !== schemaViewFormatVersion)\n throw new Error(`Unsupported schema view format version: ${version}, expected ${schemaViewFormatVersion}`);\n const stOffset = reader.readU32();\n reader.parseStringTable(stOffset);\n\n const builder = new SchemaViewBuilder();\n\n // Cross-reference maps (ecInstanceId -> builder array index)\n const schemaEcIdToIdx = new Map<number, number>();\n const enumRowIdToIdx = new Map<number, number>();\n const koqRowIdToIdx = new Map<number, number>();\n const catRowIdToIdx = new Map<number, number>();\n const classRowIdToIdx = new Map<number, number>();\n\n // Per-schema metadata for name-based class resolution\n const schemaInfos: Array<{ name: string; schemaIdx: number; classNameToIdx: Map<string, number> }> = [];\n\n // Per-schema item range tracking (indexed by schemaIdx)\n const schemaEnumStarts: number[] = [];\n const schemaEnumCounts: number[] = [];\n const schemaKoqStarts: number[] = [];\n const schemaKoqCounts: number[] = [];\n const schemaCatStarts: number[] = [];\n const schemaCatCounts: number[] = [];\n const schemaClassStarts: number[] = [];\n const schemaClassCounts: number[] = [];\n\n // Deferred class data for cross-reference resolution\n const pendingClasses: PendingClass[] = [];\n\n // ---- PropertyDefTable ----\n expectTag(reader, Tag.PropertyDefTable);\n const defCount = reader.readU32();\n // Each PreParsedDef consumes at least ~30 bytes (mix of u8/u16/u32 fields + string refs).\n // Use a conservative lower bound of 8 bytes to catch wildly oversized counts on malformed blobs.\n reader.validateCount(defCount, 8, \"PropertyDefTable\");\n const preParsedDefs: PreParsedDef[] = new Array(defCount);\n for (let i = 0; i < defCount; i++) {\n preParsedDefs[i] = {\n name: reader.readSRef(),\n kind: reader.readU8(),\n primitiveType: reader.readU16(),\n extType: reader.readSRef(),\n enumRowId: reader.readU32(),\n structClassRowId: reader.readU32(),\n koqRowId: reader.readU32(),\n catRowId: reader.readU32(),\n arrayMinOccurs: readOptionalU32(reader),\n arrayMaxOccurs: readOptionalU32(reader),\n navRelClassRowId: reader.readU32(),\n navDirection: reader.readU8(),\n isReadonly: reader.readU8() !== 0,\n isHidden: reader.readU8() !== 0,\n description: reader.readSRef(),\n };\n }\n\n // ---- SchemaTable ----\n expectTag(reader, Tag.SchemaTable);\n const schemaCount = reader.readU32();\n reader.validateCount(schemaCount, 8, \"SchemaTable\");\n for (let i = 0; i < schemaCount; i++) {\n const name = reader.readSRef();\n const vRead = reader.readU16();\n const vWrite = reader.readU16();\n const vMinor = reader.readU16();\n const alias = reader.readSRef();\n const label = reader.readSRef();\n const description = reader.readSRef();\n const ecInstanceId = reader.readU32();\n const isHidden = reader.readU8() !== 0;\n\n const schemaIdx = builder.addSchema({\n ecInstanceId,\n nameStringIdx: builder.internString(name),\n aliasStringIdx: builder.internString(alias),\n labelStringIdx: builder.internString(label),\n descriptionStringIdx: builder.internString(description),\n versionRead: vRead,\n versionWrite: vWrite,\n versionMinor: vMinor,\n classRangeStart: 0, classCount: 0,\n enumRangeStart: 0, enumCount: 0,\n koqRangeStart: 0, koqCount: 0,\n catRangeStart: 0, catCount: 0,\n isHidden,\n });\n schemaEcIdToIdx.set(ecInstanceId, schemaIdx);\n schemaInfos.push({ name, schemaIdx, classNameToIdx: new Map() });\n schemaEnumStarts.push(0); schemaEnumCounts.push(0);\n schemaKoqStarts.push(0); schemaKoqCounts.push(0);\n schemaCatStarts.push(0); schemaCatCounts.push(0);\n schemaClassStarts.push(0); schemaClassCounts.push(0);\n }\n\n /** Track an item's schema ownership and update range counters. */\n function trackItem(schemaEcId: number, globalIdx: number, starts: number[], counts: number[]): number {\n const schemaIdx = schemaEcIdToIdx.get(schemaEcId);\n if (schemaIdx === undefined)\n throw new Error(`SchemaView blob: unknown schema ecInstanceId ${schemaEcId}`);\n if (counts[schemaIdx] === 0)\n starts[schemaIdx] = globalIdx;\n counts[schemaIdx]++;\n return schemaIdx;\n }\n\n // ---- EnumTable ----\n expectTag(reader, Tag.EnumTable);\n const enumTotalCount = reader.readU32();\n reader.validateCount(enumTotalCount, 8, \"EnumTable\");\n for (let i = 0; i < enumTotalCount; i++) {\n const schemaEcId = reader.readU32();\n const schemaIdx = trackItem(schemaEcId, i, schemaEnumStarts, schemaEnumCounts);\n\n const eName = reader.readSRef();\n const ePrimType = reader.readU8();\n const eIsStrict = reader.readU8() !== 0;\n const eLabel = reader.readSRef();\n const eDesc = reader.readSRef();\n const eValuesJson = reader.readSRef();\n const eEcInstanceId = reader.readU32();\n\n const enumeratorStart = builder.enumeratorCount;\n let enumeratorCount = 0;\n if (eValuesJson) {\n try {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n const values = JSON.parse(eValuesJson) as Array<{ Name?: string; IntValue?: number; StringValue?: string; DisplayLabel?: string; Description?: string }>;\n for (const v of values) {\n const value = v.IntValue !== undefined ? v.IntValue : (v.StringValue ?? \"\");\n const name = v.Name ?? (typeof value === \"string\" ? value : `${eName}${value}`);\n builder.addEnumerator({\n nameStringIdx: builder.internString(name),\n labelStringIdx: builder.internString(v.DisplayLabel),\n descriptionStringIdx: builder.internString(v.Description),\n value,\n });\n enumeratorCount++;\n }\n } catch (e) {\n Logger.logWarning(\"ecschema-metadata.SchemaView\", `Malformed EnumValues JSON for enumeration \"${eName}\": ${BentleyError.getErrorMessage(e)}`);\n }\n }\n\n const eIdx = builder.addEnumeration({\n ecInstanceId: eEcInstanceId,\n schemaIdx,\n nameStringIdx: builder.internString(eName),\n labelStringIdx: builder.internString(eLabel),\n descriptionStringIdx: builder.internString(eDesc),\n primitiveType: ePrimType,\n isStrict: eIsStrict,\n enumeratorStart,\n enumeratorCount,\n });\n enumRowIdToIdx.set(eEcInstanceId, eIdx);\n }\n\n // ---- KoQTable ----\n expectTag(reader, Tag.KoQTable);\n const koqTotalCount = reader.readU32();\n reader.validateCount(koqTotalCount, 8, \"KoQTable\");\n for (let i = 0; i < koqTotalCount; i++) {\n const schemaEcId = reader.readU32();\n const schemaIdx = trackItem(schemaEcId, i, schemaKoqStarts, schemaKoqCounts);\n\n const kName = reader.readSRef();\n const kLabel = reader.readSRef();\n const kDesc = reader.readSRef();\n const kPersUnit = reader.readSRef();\n const kRelError = reader.readF64();\n const kPresUnits = reader.readSRef();\n const kEcInstanceId = reader.readU32();\n\n const kIdx = builder.addKoq({\n ecInstanceId: kEcInstanceId,\n schemaIdx,\n nameStringIdx: builder.internString(kName),\n labelStringIdx: builder.internString(kLabel),\n descriptionStringIdx: builder.internString(kDesc),\n persistenceUnitStringIdx: builder.internString(kPersUnit),\n presentationFormatsStringIdx: builder.internString(kPresUnits),\n relativeError: kRelError,\n });\n koqRowIdToIdx.set(kEcInstanceId, kIdx);\n }\n\n // ---- PropCatTable ----\n expectTag(reader, Tag.PropCatTable);\n const catTotalCount = reader.readU32();\n reader.validateCount(catTotalCount, 8, \"PropCatTable\");\n for (let i = 0; i < catTotalCount; i++) {\n const schemaEcId = reader.readU32();\n const schemaIdx = trackItem(schemaEcId, i, schemaCatStarts, schemaCatCounts);\n\n const pcName = reader.readSRef();\n const pcLabel = reader.readSRef();\n const pcDesc = reader.readSRef();\n const pcPriority = reader.readI32();\n const pcEcInstanceId = reader.readU32();\n\n const pcIdx = builder.addPropertyCategory({\n ecInstanceId: pcEcInstanceId,\n schemaIdx,\n nameStringIdx: builder.internString(pcName),\n labelStringIdx: builder.internString(pcLabel),\n descriptionStringIdx: builder.internString(pcDesc),\n priority: pcPriority,\n });\n catRowIdToIdx.set(pcEcInstanceId, pcIdx);\n }\n\n // ---- ClassTable ----\n expectTag(reader, Tag.ClassTable);\n const classTotalCount = reader.readU32();\n reader.validateCount(classTotalCount, 8, \"ClassTable\");\n for (let i = 0; i < classTotalCount; i++) {\n const schemaEcId = reader.readU32();\n const schemaIdx = trackItem(schemaEcId, i, schemaClassStarts, schemaClassCounts);\n const schemaInfo = schemaInfos[schemaIdx];\n\n const cName = reader.readSRef();\n const cType = reader.readU8();\n const cModifier = reader.readU8();\n const cLabel = reader.readSRef();\n const cDesc = reader.readSRef();\n let relStrength: StrengthType = StrengthType.Referencing;\n let relStrengthDir: StrengthDirection = StrengthDirection.Forward;\n if (cType === ClassType.Relationship) {\n relStrength = reader.readU8();\n relStrengthDir = reader.readU8();\n }\n const cEcInstanceId = reader.readU32();\n // Tri-state hidden: 0=undefined (no CA, schema doesn't hide), 1=true (hidden), 2=false (explicitly shown)\n const cHiddenByte = reader.readU8();\n const cIsHidden: boolean | undefined = cHiddenByte === 1 ? true : cHiddenByte === 2 ? false : undefined;\n\n // Base classes (count-prefixed)\n const baseCount = reader.readU16();\n const baseClasses: Array<{ schemaName: string; className: string; ordinal: number }> = [];\n for (let b = 0; b < baseCount; b++) {\n baseClasses.push({\n schemaName: reader.readSRef(),\n className: reader.readSRef(),\n ordinal: reader.readU8(),\n });\n }\n\n // Property refs (count-prefixed)\n const propRefCount = reader.readU16();\n const propRefs: PendingPropRef[] = [];\n for (let p = 0; p < propRefCount; p++) {\n propRefs.push({\n preDefIdx: reader.readU32(),\n labelStringIdx: builder.internString(reader.readSRef()),\n priority: reader.readI32(),\n ecInstanceId: reader.readU32(),\n });\n }\n\n // Constraints (count-prefixed, only for relationships)\n const constraints: PendingConstraint[] = [];\n if (cType === ClassType.Relationship) {\n const constrCount = reader.readU8();\n for (let c = 0; c < constrCount; c++) {\n const rcEnd = reader.readU8();\n const rcMultLower = reader.readU32();\n const rcMultUpper = reader.readU32();\n const rcIsPoly = reader.readU8() !== 0;\n const rcRoleLabel = reader.readSRef();\n const rcAbsSchema = reader.readSRef();\n const rcAbsClass = reader.readSRef();\n\n // Constraint classes (count-prefixed)\n const ccCount = reader.readU8();\n const constraintClasses: Array<{ schemaName: string; className: string }> = [];\n for (let cc = 0; cc < ccCount; cc++) {\n constraintClasses.push({\n schemaName: reader.readSRef(),\n className: reader.readSRef(),\n });\n }\n\n constraints.push({\n relEnd: rcEnd,\n isPolymorphic: rcIsPoly,\n multiplicityLower: rcMultLower,\n multiplicityUpper: rcMultUpper,\n roleLabel: rcRoleLabel,\n abstractSchemaName: rcAbsSchema,\n abstractClassName: rcAbsClass,\n constraintClasses,\n });\n }\n }\n\n const nameStringIdx = builder.internString(cName);\n const classIdx = builder.addClass({\n ecInstanceId: cEcInstanceId,\n schemaIdx,\n nameStringIdx,\n labelStringIdx: builder.internString(cLabel),\n descriptionStringIdx: builder.internString(cDesc),\n type: cType,\n modifier: cModifier,\n baseClassIdx: -1,\n mixinStartIdx: -1,\n mixinCount: 0,\n ownPropStart: 0,\n ownPropCount: 0,\n strength: relStrength,\n strengthDirection: relStrengthDir,\n sourceConstraintIdx: -1,\n targetConstraintIdx: -1,\n isHidden: cIsHidden,\n });\n schemaInfo.classNameToIdx.set(cName.toLowerCase(), classIdx);\n classRowIdToIdx.set(cEcInstanceId, classIdx);\n\n pendingClasses.push({\n schemaIdx,\n classIdx,\n ecInstanceId: cEcInstanceId,\n nameStringIdx,\n labelStringIdx: builder.internString(cLabel),\n descriptionStringIdx: builder.internString(cDesc),\n type: cType,\n modifier: cModifier,\n relStrength,\n relStrengthDir,\n baseClasses,\n propRefs,\n constraints,\n schemaName: schemaInfo.name,\n isHidden: cIsHidden,\n });\n }\n\n // ---- Finalize per-schema item ranges ----\n for (let i = 0; i < schemaCount; i++) {\n builder.updateSchemaRanges(i, {\n classRangeStart: schemaClassStarts[i] ?? 0,\n classCount: schemaClassCounts[i] ?? 0,\n enumRangeStart: schemaEnumStarts[i] ?? 0,\n enumCount: schemaEnumCounts[i] ?? 0,\n koqRangeStart: schemaKoqStarts[i] ?? 0,\n koqCount: schemaKoqCounts[i] ?? 0,\n catRangeStart: schemaCatStarts[i] ?? 0,\n catCount: schemaCatCounts[i] ?? 0,\n });\n }\n\n // Build a global name resolver: \"SchemaName:ClassName\" -> classIdx\n const classResolver = new Map<string, number>();\n for (const s of schemaInfos) {\n for (const [lowerName, idx] of s.classNameToIdx)\n classResolver.set(`${s.name.toLowerCase()}:${lowerName}`, idx);\n }\n\n // Resolve pre-parsed defs to PropertyDef objects. Maps preParsedDef index -> builder defIdx.\n const danglingRefs: string[] = [];\n const resolvedDefMap = new Map<number, number>();\n const brokenDefs = new Set<number>();\n\n for (let i = 0; i < preParsedDefs.length; i++) {\n const prDef = preParsedDefs[i];\n\n let structClassIdx = -1;\n if (prDef.structClassRowId !== 0) {\n structClassIdx = classRowIdToIdx.get(prDef.structClassRowId) ?? -1;\n if (structClassIdx === -1) {\n brokenDefs.add(i);\n danglingRefs.push(`Dropped properties with struct class rowId ${prDef.structClassRowId}`);\n continue;\n }\n }\n\n let navRelClassIdx = -1;\n if (prDef.navRelClassRowId !== 0) {\n navRelClassIdx = classRowIdToIdx.get(prDef.navRelClassRowId) ?? -1;\n if (navRelClassIdx === -1) {\n brokenDefs.add(i);\n danglingRefs.push(`Dropped properties with nav relationship rowId ${prDef.navRelClassRowId}`);\n continue;\n }\n }\n\n let enumIdx = -1;\n if (prDef.enumRowId !== 0) {\n enumIdx = enumRowIdToIdx.get(prDef.enumRowId) ?? -1;\n if (enumIdx === -1)\n danglingRefs.push(`Unresolved enum rowId ${prDef.enumRowId}`);\n }\n\n let koqIdx = -1;\n if (prDef.koqRowId !== 0)\n koqIdx = koqRowIdToIdx.get(prDef.koqRowId) ?? -1;\n\n let categoryIdx = -1;\n if (prDef.catRowId !== 0)\n categoryIdx = catRowIdToIdx.get(prDef.catRowId) ?? -1;\n\n const def: PropertyDef = {\n nameStringIdx: builder.internString(prDef.name),\n descriptionStringIdx: builder.internString(prDef.description),\n kind: prDef.kind,\n primitiveType: prDef.primitiveType,\n extTypeStringIdx: builder.internString(prDef.extType),\n enumIdx,\n koqIdx,\n structClassIdx,\n navRelClassIdx,\n navDirection: prDef.navDirection,\n categoryIdx,\n isReadOnly: prDef.isReadonly,\n isHidden: prDef.isHidden,\n arrayMinOccurs: prDef.arrayMinOccurs,\n arrayMaxOccurs: prDef.arrayMaxOccurs,\n };\n\n resolvedDefMap.set(i, builder.addPropertyDef(def));\n }\n\n // Resolve cross-references and finalize classes\n for (const pc of pendingClasses) {\n pc.baseClasses.sort((a, b) => a.ordinal - b.ordinal);\n const classFullName = `${pc.schemaName}:${builder.getString(pc.nameStringIdx)}`;\n\n let baseClassIdx = -1;\n const mixinStartIdx = pc.baseClasses.length > 1 ? builder.classMixinCount : -1;\n let mixinCount = 0;\n\n for (const bc of pc.baseClasses) {\n const bcKey = `${bc.schemaName.toLowerCase()}:${bc.className.toLowerCase()}`;\n const bcIdx = classResolver.get(bcKey) ?? -1;\n if (bc.ordinal === 0) {\n if (bcIdx === -1 && bc.schemaName)\n danglingRefs.push(`${classFullName} -> base class ${bc.schemaName}:${bc.className}`);\n baseClassIdx = bcIdx;\n } else {\n if (bcIdx === -1) {\n danglingRefs.push(`${classFullName} -> mixin ${bc.schemaName}:${bc.className}`);\n continue;\n }\n builder.addClassMixin(bcIdx);\n mixinCount++;\n }\n }\n\n const ownPropStart = builder.propertyRefCount;\n for (const pr of pc.propRefs) {\n if (brokenDefs.has(pr.preDefIdx))\n continue;\n const defIdx = resolvedDefMap.get(pr.preDefIdx);\n if (defIdx === undefined)\n continue;\n builder.addPropertyRef({\n ecInstanceId: pr.ecInstanceId,\n defIdx,\n labelStringIdx: pr.labelStringIdx,\n priority: pr.priority,\n });\n }\n\n let sourceConstraintIdx = -1;\n let targetConstraintIdx = -1;\n for (const con of pc.constraints) {\n const absKey = con.abstractSchemaName && con.abstractClassName\n ? `${con.abstractSchemaName.toLowerCase()}:${con.abstractClassName.toLowerCase()}`\n : \"\";\n const absClassIdx = absKey ? (classResolver.get(absKey) ?? -1) : -1;\n if (absClassIdx === -1 && absKey)\n danglingRefs.push(`${classFullName} constraint -> abstract ${con.abstractSchemaName}:${con.abstractClassName}`);\n\n const classRefStart = builder.constraintClassRefCount;\n let classRefCount = 0;\n for (const cc of con.constraintClasses) {\n const ccKey = `${cc.schemaName.toLowerCase()}:${cc.className.toLowerCase()}`;\n const ccIdx = classResolver.get(ccKey) ?? -1;\n if (ccIdx === -1) {\n danglingRefs.push(`${classFullName} constraint -> class ${cc.schemaName}:${cc.className}`);\n continue;\n }\n builder.addConstraintClassRef(ccIdx);\n classRefCount++;\n }\n\n const constraintIdx = builder.addRelConstraint({\n abstractConstraintIdx: absClassIdx,\n polymorphic: con.isPolymorphic,\n multiplicityLower: con.multiplicityLower,\n multiplicityUpper: con.multiplicityUpper,\n roleLabelStringIdx: builder.internString(con.roleLabel),\n classRefStart,\n classRefCount,\n });\n\n if (con.relEnd === 0)\n sourceConstraintIdx = constraintIdx;\n else\n targetConstraintIdx = constraintIdx;\n }\n\n const updatedClass: ClassData = {\n ecInstanceId: pc.ecInstanceId,\n schemaIdx: pc.schemaIdx,\n nameStringIdx: pc.nameStringIdx,\n labelStringIdx: pc.labelStringIdx,\n descriptionStringIdx: pc.descriptionStringIdx,\n type: pc.type,\n modifier: pc.modifier,\n baseClassIdx,\n mixinStartIdx,\n mixinCount,\n ownPropStart,\n ownPropCount: builder.propertyRefCount - ownPropStart,\n strength: pc.relStrength,\n strengthDirection: pc.relStrengthDir,\n sourceConstraintIdx,\n targetConstraintIdx,\n isHidden: pc.isHidden,\n };\n builder.updateClass(pc.classIdx, updatedClass);\n }\n\n if (danglingRefs.length > 0) {\n const cap = 20;\n const lines = danglingRefs.length <= cap ? danglingRefs : [...danglingRefs.slice(0, cap), `... and ${danglingRefs.length - cap} more`];\n Logger.logWarning(\"ecschema-metadata.SchemaView\", `${danglingRefs.length} unresolved cross-reference(s) in schema view blob (likely from excluded schemas):\\n ${lines.join(\"\\n \")}`);\n }\n\n return builder.build(schemaToken);\n}\n\n"]}
|