@itwin/core-backend 5.0.0-dev.87 → 5.0.0-dev.89

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.
@@ -1 +1 @@
1
- {"version":3,"file":"ElementAspect.js","sourceRoot":"","sources":["../../src/ElementAspect.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,oDAA+I;AAC/I,qCAAkC;AAGlC,sDAA2D;AAC3D,gDAAoD;AA0BpD;;;;GAIG;AACH,MAAa,aAAc,SAAQ,eAAM;IAChC,MAAM,KAAc,SAAS,KAAa,OAAO,eAAe,CAAC,CAAC,CAAC;IACnE,OAAO,CAAiB;IAE/B,kFAAkF;IAClF,YAAY,KAAyB,EAAE,MAAgB;QACrD,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,4BAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAE,CAAC,CAAC,+DAA+D;IACzH,CAAC;IAEe,MAAM;QACpB,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,EAAwB,CAAC;QACjD,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC3B,OAAO,GAAG,CAAC;IACb,CAAC;IAED;;;;OAIG;IACO,MAAM,CAAC,QAAQ,CAAC,GAAqB;QAC7C,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC;QAC9B,MAAM,CAAC,QAAQ,CAAC,wBAAc,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC3C,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,SAAS,EAAE,eAAe,CAAC,CAAC;IAChF,CAAC;IAED;;;OAGG;IACO,MAAM,CAAC,UAAU,CAAC,IAAsB,IAAU,CAAC;IAE7D;;;;OAIG;IACO,MAAM,CAAC,QAAQ,CAAC,GAA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ACH,IAAY,IASX;IATD,WAAY,IAAI;QACd,oFAAoF;QACpF,2BAAmB,CAAA;QACnB,yFAAyF;QACzF,qCAA6B,CAAA;QAC7B;;WAEG;QACH,uBAAe,CAAA;IACjB,CAAC,EATW,IAAI,GAAJ,yBAAI,KAAJ,yBAAI,QASf;AACH,CAAC,EAdgB,oBAAoB,oCAApB,oBAAoB,QAcpC","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 ElementAspects\n */\n\nimport { ChannelRootAspectProps, ElementAspectProps, EntityReferenceSet, ExternalSourceAspectProps, RelatedElement } from \"@itwin/core-common\";\nimport { Entity } from \"./Entity\";\nimport { IModelDb } from \"./IModelDb\";\nimport { ECSqlStatement } from \"./ECSqlStatement\";\nimport { DbResult, Id64String } from \"@itwin/core-bentley\";\nimport { _verifyChannel } from \"./internal/Symbols\";\n\n/** Argument for the `ElementAspect.onXxx` static methods\n * @beta\n */\nexport interface OnAspectArg {\n /** The iModel for the aspect affected by this event. */\n iModel: IModelDb;\n /** The model for the aspect affected by this event */\n model: Id64String;\n}\n/** Argument for the `ElementAspect.onXxx` static methods that supply the properties of an aspect to be inserted or updated.\n * @beta\n */\nexport interface OnAspectPropsArg extends OnAspectArg {\n /** The new properties of the aspect affected by this event. */\n props: Readonly<ElementAspectProps>;\n}\n/** Argument for the `ElementAspect.onXxx` static methods that only supply the Id of the affected aspect.\n * @beta\n */\nexport interface OnAspectIdArg extends OnAspectArg {\n /** The Id of the aspect affected by this event */\n aspectId: Id64String;\n}\n\n/** An Element Aspect is a class that defines a set of properties that are related to (and owned by) a single element.\n * Semantically, an ElementAspect can be considered part of the Element. Thus, an ElementAspect is deleted if its owning Element is deleted.\n * BIS Guideline: Subclass ElementUniqueAspect or ElementMultiAspect rather than subclassing ElementAspect directly.\n * @public\n */\nexport class ElementAspect extends Entity {\n public static override get className(): string { return \"ElementAspect\"; }\n public element: RelatedElement;\n\n /** Construct an aspect from its JSON representation and its containing iModel. */\n constructor(props: ElementAspectProps, iModel: IModelDb) {\n super(props, iModel);\n this.element = RelatedElement.fromJSON(props.element)!; // eslint-disable-line @typescript-eslint/no-non-null-assertion\n }\n\n public override toJSON(): ElementAspectProps {\n const val = super.toJSON() as ElementAspectProps;\n val.element = this.element;\n return val;\n }\n\n /** Called before a new ElementAspect is inserted.\n * @note throw an exception to disallow the insert\n * @note If you override this method, you must call super.\n * @beta\n */\n protected static onInsert(arg: OnAspectPropsArg): void {\n const { props, iModel } = arg;\n iModel.channels[_verifyChannel](arg.model);\n iModel.locks.checkExclusiveLock(props.element.id, \"element\", \"insert aspect\");\n }\n\n /** Called after a new ElementAspect was inserted.\n * @note If you override this method, you must call super.\n * @beta\n */\n protected static onInserted(_arg: OnAspectPropsArg): void { }\n\n /** Called before an ElementAspect is updated.\n * @note throw an exception to disallow the update\n * @note If you override this method, you must call super.\n * @beta\n */\n protected static onUpdate(arg: OnAspectPropsArg): void {\n const { props, iModel } = arg;\n iModel.channels[_verifyChannel](arg.model);\n iModel.locks.checkExclusiveLock(props.element.id, \"element\", \"update aspect\");\n }\n\n /** Called after an ElementAspect was updated.\n * @note If you override this method, you must call super.\n * @beta\n */\n protected static onUpdated(_arg: OnAspectPropsArg): void { }\n\n /** Called before an ElementAspect is deleted.\n * @note throw an exception to disallow the delete\n * @note If you override this method, you must call super.\n * @beta\n */\n protected static onDelete(arg: OnAspectIdArg): void {\n const { aspectId, iModel } = arg;\n iModel.channels[_verifyChannel](arg.model);\n const { element } = iModel.elements.getAspect(aspectId);\n iModel.locks.checkExclusiveLock(element.id, \"element\", \"delete aspect\");\n }\n\n /** Called after an ElementAspect was deleted.\n * @note If you override this method, you must call super.\n * @beta\n */\n protected static onDeleted(_arg: OnAspectIdArg): void { }\n}\n/** An Element Unique Aspect is an ElementAspect where there can be only zero or one instance of the Element Aspect class per Element.\n * @public\n */\nexport class ElementUniqueAspect extends ElementAspect {\n public static override get className(): string { return \"ElementUniqueAspect\"; }\n}\n\n/** An Element Multi-Aspect is an ElementAspect where there can be **n** instances of the Element Aspect class per Element.\n * @public\n */\nexport class ElementMultiAspect extends ElementAspect {\n public static override get className(): string { return \"ElementMultiAspect\"; }\n}\n\n/**\n * @public\n */\nexport class ChannelRootAspect extends ElementUniqueAspect {\n public static override get className(): string { return \"ChannelRootAspect\"; }\n /** Insert a ChannelRootAspect on the specified element.\n * @deprecated in 4.0 use [[ChannelControl.makeChannelRoot]]. This method does not enforce the rule that channels may not nest and is therefore dangerous.\n */\n public static insert(iModel: IModelDb, ownerId: Id64String, channelName: string) {\n const props: ChannelRootAspectProps = { classFullName: this.classFullName, element: { id: ownerId }, owner: channelName };\n iModel.elements.insertAspect(props);\n }\n}\n\n/** An ElementMultiAspect that stores synchronization information for an Element originating from an external source.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.2\n * @public\n */\nexport class ExternalSourceAspect extends ElementMultiAspect {\n public static override get className(): string { return \"ExternalSourceAspect\"; }\n\n /** An element that scopes the combination of `kind` and `identifier` to uniquely identify the object from the external source.\n * @note Warning: in a future major release the `scope` property will be optional, since the scope is intended to be potentially invalid.\n * all references should treat it as potentially undefined, but we cannot change the type yet since that is a breaking change.\n */\n public scope: RelatedElement;\n /** The identifier of the object in the source repository. */\n public identifier: string;\n /** The kind of object within the source repository. */\n public kind: string;\n /** The cryptographic hash (any algorithm) of the source object's content. If defined, it must be guaranteed to change when the source object's content changes. */\n public checksum?: string;\n /** An optional value that is typically a version number or a pseudo version number like last modified time.\n * It will be used by the synchronization process to detect that a source object is unchanged so that computing a cryptographic hash can be avoided.\n * If present, this value must be guaranteed to change when any of the source object's content changes.\n */\n public version?: string;\n /** A place where additional JSON properties can be stored. For example, provenance information or properties relating to the synchronization process.\n * @note Warning: in a future major release, the type of `jsonProperties` will be changed to object, and itwin.js will automatically stringify it when writing to the iModel.\n * This will be a breaking change, since application code will have to change from supplying a string to supplying an object.\n */\n public jsonProperties?: string;\n /** The source of the imported/synchronized object. Should point to an instance of [ExternalSource]($backend). */\n public source?: RelatedElement;\n\n /** Construct an aspect from its JSON representation and its containing iModel. */\n constructor(props: ExternalSourceAspectProps, iModel: IModelDb) {\n super(props, iModel);\n this.scope = RelatedElement.fromJSON(props.scope)!; // eslint-disable-line @typescript-eslint/no-non-null-assertion\n this.source = RelatedElement.fromJSON(props.source);\n this.identifier = props.identifier;\n this.kind = props.kind;\n this.checksum = props.checksum;\n this.version = props.version;\n this.jsonProperties = props.jsonProperties;\n }\n\n /** @deprecated in 3.x. findAllBySource */\n public static findBySource(iModelDb: IModelDb, scope: Id64String, kind: string, identifier: string): { elementId?: Id64String, aspectId?: Id64String } {\n const sql = `SELECT Element.Id, ECInstanceId FROM ${ExternalSourceAspect.classFullName} WHERE (Scope.Id=:scope AND Kind=:kind AND Identifier=:identifier)`;\n let elementId: Id64String | undefined;\n let aspectId: Id64String | undefined;\n iModelDb.withPreparedStatement(sql, (statement: ECSqlStatement) => {\n statement.bindId(\"scope\", scope);\n statement.bindString(\"kind\", kind);\n statement.bindString(\"identifier\", identifier);\n if (DbResult.BE_SQLITE_ROW === statement.step()) {\n elementId = statement.getValue(0).getId();\n aspectId = statement.getValue(1).getId();\n }\n });\n return { elementId, aspectId };\n }\n\n /** Look up the elements that contain one or more ExternalSourceAspect with the specified Scope, Kind, and Identifier.\n * The result of this function is an array of all of the ExternalSourceAspects that were found, each associated with the owning element.\n * A given element could have more than one ExternalSourceAspect with the given scope, kind, and identifier.\n * Also, many elements could have ExternalSourceAspect with the same scope, kind, and identifier.\n * Therefore, the result array could have more than one entry with the same elementId.\n * Aspects are never shared. Each aspect has its own unique ECInstanceId.\n * @param iModelDb The iModel to query\n * @param scope The scope of the ExternalSourceAspects to find\n * @param kind The kind of the ExternalSourceAspects to find\n * @param identifier The identifier of the ExternalSourceAspects to find\n * @returns the query results\n */\n public static findAllBySource(iModelDb: IModelDb, scope: Id64String, kind: string, identifier: string): Array<{ elementId: Id64String, aspectId: Id64String }> {\n const sql = `SELECT Element.Id, ECInstanceId FROM ${ExternalSourceAspect.classFullName} WHERE (Scope.Id=:scope AND Kind=:kind AND Identifier=:identifier)`;\n const found: Array<{ elementId: Id64String, aspectId: Id64String }> = [];\n iModelDb.withPreparedStatement(sql, (statement: ECSqlStatement) => {\n statement.bindId(\"scope\", scope);\n statement.bindString(\"kind\", kind);\n statement.bindString(\"identifier\", identifier);\n while (DbResult.BE_SQLITE_ROW === statement.step()) {\n found.push({ elementId: statement.getValue(0).getId(), aspectId: statement.getValue(1).getId() });\n }\n });\n return found;\n }\n\n public override toJSON(): ExternalSourceAspectProps {\n const val = super.toJSON() as ExternalSourceAspectProps;\n val.scope = this.scope;\n val.source = this.source;\n val.identifier = this.identifier;\n val.kind = this.kind;\n val.checksum = this.checksum;\n val.version = this.version;\n val.jsonProperties = this.jsonProperties;\n return val;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n if (this.scope)\n referenceIds.addElement(this.scope.id);\n referenceIds.addElement(this.element.id);\n if (this.source)\n referenceIds.addElement(this.source.id);\n }\n}\n\n/** @public */\nexport namespace ExternalSourceAspect {\n /** Standard values for the `Kind` property of `ExternalSourceAspect`.\n * @public\n */\n export enum Kind {\n /** Indicates that the [[ExternalSourceAspect]] is storing [[Element]] provenance */\n Element = \"Element\",\n /** Indicates that the [[ExternalSourceAspect]] is storing [[Relationship]] provenance */\n Relationship = \"Relationship\",\n /** Indicates that the [[ExternalSourceAspect]] is storing *scope* provenance\n * @see [[ExternalSourceAspect.scope]]\n */\n Scope = \"Scope\",\n }\n}\n"]}
1
+ {"version":3,"file":"ElementAspect.js","sourceRoot":"","sources":["../../src/ElementAspect.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,oDAA+I;AAC/I,qCAAkC;AAGlC,sDAA2D;AAC3D,gDAAoD;AA0BpD;;;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AI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAC5C,CAAC;CACF;AArFD,oDAqFC;AAED,cAAc;AACd,WAAiB,oBAAoB;IACnC;;OAEG;IACH,IAAY,IASX;IATD,WAAY,IAAI;QACd,oFAAoF;QACpF,2BAAmB,CAAA;QACnB,yFAAyF;QACzF,qCAA6B,CAAA;QAC7B;;WAEG;QACH,uBAAe,CAAA;IACjB,CAAC,EATW,IAAI,GAAJ,yBAAI,KAAJ,yBAAI,QASf;AACH,CAAC,EAdgB,oBAAoB,oCAApB,oBAAoB,QAcpC","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 ElementAspects\n */\n\nimport { ChannelRootAspectProps, ElementAspectProps, EntityReferenceSet, ExternalSourceAspectProps, RelatedElement } from \"@itwin/core-common\";\nimport { Entity } from \"./Entity\";\nimport { IModelDb } from \"./IModelDb\";\nimport { ECSqlStatement } from \"./ECSqlStatement\";\nimport { DbResult, Id64String } from \"@itwin/core-bentley\";\nimport { _verifyChannel } from \"./internal/Symbols\";\n\n/** Argument for the `ElementAspect.onXxx` static methods\n * @beta\n */\nexport interface OnAspectArg {\n /** The iModel for the aspect affected by this event. */\n iModel: IModelDb;\n /** The model for the aspect affected by this event */\n model: Id64String;\n}\n/** Argument for the `ElementAspect.onXxx` static methods that supply the properties of an aspect to be inserted or updated.\n * @beta\n */\nexport interface OnAspectPropsArg extends OnAspectArg {\n /** The new properties of the aspect affected by this event. */\n props: Readonly<ElementAspectProps>;\n}\n/** Argument for the `ElementAspect.onXxx` static methods that only supply the Id of the affected aspect.\n * @beta\n */\nexport interface OnAspectIdArg extends OnAspectArg {\n /** The Id of the aspect affected by this event */\n aspectId: Id64String;\n}\n\n/** An Element Aspect is a class that defines a set of properties that are related to (and owned by) a single element.\n * Semantically, an ElementAspect can be considered part of the Element. Thus, an ElementAspect is deleted if its owning Element is deleted.\n * BIS Guideline: Subclass ElementUniqueAspect or ElementMultiAspect rather than subclassing ElementAspect directly.\n * @public\n */\nexport class ElementAspect extends Entity {\n public static override get className(): string { return \"ElementAspect\"; }\n public element: RelatedElement;\n\n /** Construct an aspect from its JSON representation and its containing iModel. */\n constructor(props: ElementAspectProps, iModel: IModelDb) {\n super(props, iModel);\n this.element = RelatedElement.fromJSON(props.element)!; // eslint-disable-line @typescript-eslint/no-non-null-assertion\n }\n\n public override toJSON(): ElementAspectProps {\n const val = super.toJSON() as ElementAspectProps;\n val.element = this.element;\n return val;\n }\n\n /** Called before a new ElementAspect is inserted.\n * @note throw an exception to disallow the insert\n * @note If you override this method, you must call super.\n * @beta\n */\n protected static onInsert(arg: OnAspectPropsArg): void {\n const { props, iModel } = arg;\n iModel.channels[_verifyChannel](arg.model);\n iModel.locks.checkExclusiveLock(props.element.id, \"element\", \"insert aspect\");\n }\n\n /** Called after a new ElementAspect was inserted.\n * @note If you override this method, you must call super.\n * @beta\n */\n protected static onInserted(_arg: OnAspectPropsArg): void { }\n\n /** Called before an ElementAspect is updated.\n * @note throw an exception to disallow the update\n * @note If you override this method, you must call super.\n * @beta\n */\n protected static onUpdate(arg: OnAspectPropsArg): void {\n const { props, iModel } = arg;\n iModel.channels[_verifyChannel](arg.model);\n iModel.locks.checkExclusiveLock(props.element.id, \"element\", \"update aspect\");\n }\n\n /** Called after an ElementAspect was updated.\n * @note If you override this method, you must call super.\n * @beta\n */\n protected static onUpdated(_arg: OnAspectPropsArg): void { }\n\n /** Called before an ElementAspect is deleted.\n * @note throw an exception to disallow the delete\n * @note If you override this method, you must call super.\n * @beta\n */\n protected static onDelete(arg: OnAspectIdArg): void {\n const { aspectId, iModel } = arg;\n iModel.channels[_verifyChannel](arg.model);\n const { element } = iModel.elements.getAspect(aspectId);\n iModel.locks.checkExclusiveLock(element.id, \"element\", \"delete aspect\");\n }\n\n /** Called after an ElementAspect was deleted.\n * @note If you override this method, you must call super.\n * @beta\n */\n protected static onDeleted(_arg: OnAspectIdArg): void { }\n}\n/** An Element Unique Aspect is an ElementAspect where there can be only zero or one instance of the Element Aspect class per Element.\n * @public\n */\nexport class ElementUniqueAspect extends ElementAspect {\n public static override get className(): string { return \"ElementUniqueAspect\"; }\n}\n\n/** An Element Multi-Aspect is an ElementAspect where there can be **n** instances of the Element Aspect class per Element.\n * @public\n */\nexport class ElementMultiAspect extends ElementAspect {\n public static override get className(): string { return \"ElementMultiAspect\"; }\n}\n\n/**\n * @public\n */\nexport class ChannelRootAspect extends ElementUniqueAspect {\n public static override get className(): string { return \"ChannelRootAspect\"; }\n /** Insert a ChannelRootAspect on the specified element.\n * @deprecated in 4.0 use [[ChannelControl.makeChannelRoot]]. This method does not enforce the rule that channels may not nest and is therefore dangerous.\n */\n public static insert(iModel: IModelDb, ownerId: Id64String, channelName: string) {\n const props: ChannelRootAspectProps = { classFullName: this.classFullName, element: { id: ownerId }, owner: channelName };\n iModel.elements.insertAspect(props);\n }\n}\n\n/** An ElementMultiAspect that stores synchronization information for an Element originating from an external source.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.2\n * @public\n */\nexport class ExternalSourceAspect extends ElementMultiAspect {\n public static override get className(): string { return \"ExternalSourceAspect\"; }\n\n /** An element that scopes the combination of `kind` and `identifier` to uniquely identify the object from the external source.\n * @note Warning: in a future major release the `scope` property will be optional, since the scope is intended to be potentially invalid.\n * all references should treat it as potentially undefined, but we cannot change the type yet since that is a breaking change.\n */\n public scope: RelatedElement;\n /** The identifier of the object in the source repository. */\n public identifier: string;\n /** The kind of object within the source repository. */\n public kind: string;\n /** The cryptographic hash (any algorithm) of the source object's content. If defined, it must be guaranteed to change when the source object's content changes. */\n public checksum?: string;\n /** An optional value that is typically a version number or a pseudo version number like last modified time.\n * It will be used by the synchronization process to detect that a source object is unchanged so that computing a cryptographic hash can be avoided.\n * If present, this value must be guaranteed to change when any of the source object's content changes.\n */\n public version?: string;\n /** A place where additional JSON properties can be stored. For example, provenance information or properties relating to the synchronization process.\n * @note Warning: in a future major release, the type of `jsonProperties` will be changed to object, and itwin.js will automatically stringify it when writing to the iModel.\n * This will be a breaking change, since application code will have to change from supplying a string to supplying an object.\n */\n public jsonProperties?: string;\n /** The source of the imported/synchronized object. Should point to an instance of [ExternalSource]($backend). */\n public source?: RelatedElement;\n\n /** Construct an aspect from its JSON representation and its containing iModel. */\n constructor(props: ExternalSourceAspectProps, iModel: IModelDb) {\n super(props, iModel);\n this.scope = RelatedElement.fromJSON(props.scope)!; // eslint-disable-line @typescript-eslint/no-non-null-assertion\n this.source = RelatedElement.fromJSON(props.source);\n this.identifier = props.identifier;\n this.kind = props.kind;\n this.checksum = props.checksum;\n this.version = props.version;\n this.jsonProperties = props.jsonProperties;\n }\n\n /** Look up the elements that contain one or more ExternalSourceAspect with the specified Scope, Kind, and Identifier.\n * The result of this function is an array of all of the ExternalSourceAspects that were found, each associated with the owning element.\n * A given element could have more than one ExternalSourceAspect with the given scope, kind, and identifier.\n * Also, many elements could have ExternalSourceAspect with the same scope, kind, and identifier.\n * Therefore, the result array could have more than one entry with the same elementId.\n * Aspects are never shared. Each aspect has its own unique ECInstanceId.\n * @param iModelDb The iModel to query\n * @param scope The scope of the ExternalSourceAspects to find\n * @param kind The kind of the ExternalSourceAspects to find\n * @param identifier The identifier of the ExternalSourceAspects to find\n * @returns the query results\n */\n public static findAllBySource(iModelDb: IModelDb, scope: Id64String, kind: string, identifier: string): Array<{ elementId: Id64String, aspectId: Id64String }> {\n const sql = `SELECT Element.Id, ECInstanceId FROM ${ExternalSourceAspect.classFullName} WHERE (Scope.Id=:scope AND Kind=:kind AND Identifier=:identifier)`;\n const found: Array<{ elementId: Id64String, aspectId: Id64String }> = [];\n iModelDb.withPreparedStatement(sql, (statement: ECSqlStatement) => {\n statement.bindId(\"scope\", scope);\n statement.bindString(\"kind\", kind);\n statement.bindString(\"identifier\", identifier);\n while (DbResult.BE_SQLITE_ROW === statement.step()) {\n found.push({ elementId: statement.getValue(0).getId(), aspectId: statement.getValue(1).getId() });\n }\n });\n return found;\n }\n\n public override toJSON(): ExternalSourceAspectProps {\n const val = super.toJSON() as ExternalSourceAspectProps;\n val.scope = this.scope;\n val.source = this.source;\n val.identifier = this.identifier;\n val.kind = this.kind;\n val.checksum = this.checksum;\n val.version = this.version;\n val.jsonProperties = this.jsonProperties;\n return val;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n if (this.scope)\n referenceIds.addElement(this.scope.id);\n referenceIds.addElement(this.element.id);\n if (this.source)\n referenceIds.addElement(this.source.id);\n }\n}\n\n/** @public */\nexport namespace ExternalSourceAspect {\n /** Standard values for the `Kind` property of `ExternalSourceAspect`.\n * @public\n */\n export enum Kind {\n /** Indicates that the [[ExternalSourceAspect]] is storing [[Element]] provenance */\n Element = \"Element\",\n /** Indicates that the [[ExternalSourceAspect]] is storing [[Relationship]] provenance */\n Relationship = \"Relationship\",\n /** Indicates that the [[ExternalSourceAspect]] is storing *scope* provenance\n * @see [[ExternalSourceAspect.scope]]\n */\n Scope = \"Scope\",\n }\n}\n"]}
@@ -95,11 +95,6 @@ export declare class Entity {
95
95
  * @beta
96
96
  */
97
97
  getReferenceIds(): EntityReferenceSet;
98
- /** kept rename for older transformer versions
99
- * @deprecated in 3.x . Use [[getReferenceIds]] instead
100
- * @internal
101
- */
102
- getReferenceConcreteIds: () => EntityReferenceSet;
103
98
  /** Collect the Ids of this entity's *references* at this level of the class hierarchy.
104
99
  * A *reference* is any entity referenced by this entity's EC Data, including json fields.
105
100
  * This is important for cloning operations but can be useful in other situations as well.
@@ -109,11 +104,6 @@ export declare class Entity {
109
104
  * @beta
110
105
  */
111
106
  protected collectReferenceIds(_referenceIds: EntityReferenceSet): void;
112
- /** kept rename for older transformer versions
113
- * @deprecated in 3.x . Use [[collectReferenceIds]] instead
114
- * @internal
115
- */
116
- protected collectReferenceConcreteIds: (_referenceIds: EntityReferenceSet) => void;
117
107
  }
118
108
  /** Parameter type that can accept both abstract constructor types and non-abstract constructor types for `instanceof` to test.
119
109
  * @public
@@ -1 +1 @@
1
- {"version":3,"file":"Entity.d.ts","sourceRoot":"","sources":["../../src/Entity.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAQ,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,gBAAgB,EAAoB,MAAM,oBAAoB,CAAC;AACzG,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEtE;;;;GAIG;AACH,qBAAa,MAAM;IACjB;;OAEG;IACH,SAAgB,kBAAkB,OAAiB;IACnD,0CAA0C;IAC1C,OAAc,MAAM,EAAE,OAAO,MAAM,CAAC;IAEpC,OAAO,KAAK,KAAK,GAA+D;IAEhF;;;;OAIG;IACH,WAAkB,SAAS,IAAI,MAAM,CAAqB;IAE1D,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAgB;IAE9C;;OAEG;IACH,WAAkB,aAAa,IAAI,aAAa,CAK/C;IAED,OAAO,CAAC,SAAS,CAAC,CAAc;IAEhC;;;OAGG;IACH,IAAW,KAAK,IAAI,GAAG,CAAiB;IAExC,yDAAyD;IACzD,IAAW,UAAU,IAAI,MAAM,CAAyC;IAExE,4DAA4D;IAC5D,IAAW,SAAS,IAAI,MAAM,CAAiC;IAE/D,iDAAiD;IAC1C,MAAM,EAAE,QAAQ,CAAC;IAExB,kGAAkG;IAC3F,EAAE,EAAE,UAAU,CAAC;IAGtB,SAAS,aAAa,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ;IAO1D;;OAEG;WACW,WAAW,CAAC,QAAQ,EAAE,OAAO,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,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Ae;IAEhE;;;;;OAKG;WACW,EAAE,CAAC,UAAU,EAAE,OAAO,MAAM,GAAG,OAAO;IAKpD;;;OAGG;IACH,WAAkB,gBAAgB,YAAoB;IAEtD;;;;;OAKG;IACI,eAAe,IAAI,kBAAkB;IAM5C;;;;;;;OAOG;IACH,SAAS,CAAC,mBAAmB,CAAC,aAAa,EAAE,kBAAkB,GAAG,IAAI;CAGvE;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,QAAQ,GAAG;IAAE,SAAS,EAAE,CAAC,CAAA;CAAE,CAAC"}
package/lib/cjs/Entity.js CHANGED
@@ -136,12 +136,6 @@ class Entity {
136
136
  this.collectReferenceIds(referenceIds);
137
137
  return referenceIds;
138
138
  }
139
- /** kept rename for older transformer versions
140
- * @deprecated in 3.x . Use [[getReferenceIds]] instead
141
- * @internal
142
- */
143
- // eslint-disable-next-line @typescript-eslint/unbound-method
144
- getReferenceConcreteIds = this.getReferenceIds;
145
139
  /** Collect the Ids of this entity's *references* at this level of the class hierarchy.
146
140
  * A *reference* is any entity referenced by this entity's EC Data, including json fields.
147
141
  * This is important for cloning operations but can be useful in other situations as well.
@@ -153,12 +147,6 @@ class Entity {
153
147
  collectReferenceIds(_referenceIds) {
154
148
  return; // no references by default
155
149
  }
156
- /** kept rename for older transformer versions
157
- * @deprecated in 3.x . Use [[collectReferenceIds]] instead
158
- * @internal
159
- */
160
- // eslint-disable-next-line @typescript-eslint/unbound-method
161
- collectReferenceConcreteIds = this.collectReferenceIds;
162
150
  }
163
151
  exports.Entity = Entity;
164
152
  //# sourceMappingURL=Entity.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Entity.js","sourceRoot":"","sources":["../../src/Entity.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAuD;AACvD,oDAAyG;AAGzG,gEAAsE;AAEtE;;;;GAIG;AACH,MAAa,MAAM;IACjB;;OAEG;IACa,kBAAkB,GAAG,IAAa,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C,IAAI,CAAC,aAAa,EAAE,+BAAW,CAAC,CAAC;QAClG,CAAC;QAED,IAAG,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;YACnB,MAAM,IAAI,KAAK,CAAC,2BAA2B,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC;QACnE,CAAC;QAED,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAGD,gBAAgB;IACT,MAAM,KAAK,mBAAmB,KAAe,OAAO,EAAE,CAAC,CAAC,CAAC;IAEhE;;;;;OAKG;IACI,MAAM,CAAC,EAAE,CAAC,UAAyB;QACxC,6EAA6E;QAC7E,OAAO,IAAI,KAAK,UAAU,IAAI,IAAI,CAAC,SAAS,YAAY,UAAU,CAAC;IACrE,CAAC;IAED;;;OAGG;IACI,MAAM,KAAK,gBAAgB,KAAK,OAAO,KAAK,CAAC,CAAC,CAAC;IAEtD;;;;;OAKG;IACI,eAAe;QACpB,MAAM,YAAY,GAAG,IAAI,gCAAkB,EAAE,CAAC;QAC9C,IAAI,CAAC,mBAAmB,CAAC,YAAY,CAAC,CAAC;QACvC,OAAO,YAAY,CAAC;IACtB,CAAC;IAED;;;OAGG;IACH,6DAA6D;IACtD,uBAAuB,GAAG,IAAI,CAAC,eAAe,CAAC;IAEtD;;;;;;;OAOG;IACO,mBAAmB,CAAC,aAAiC;QAC7D,OAAO,CAAC,2BAA2B;IACrC,CAAC;IAED;;;OAGG;IACH,6DAA6D;IACnD,2BAA2B,GAAG,IAAI,CAAC,mBAAmB,CAAC;CAClE;AA3KD,wBA2KC","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 { Id64, Id64String } from \"@itwin/core-bentley\";\nimport { EntityProps, EntityReferenceSet, PropertyCallback, PropertyMetaData } from \"@itwin/core-common\";\nimport type { IModelDb } from \"./IModelDb\";\nimport { Schema } from \"./Schema\";\nimport { EntityClass, SchemaItemKey } from \"@itwin/ecschema-metadata\";\n\n/** Represents one of the fundamental building block in an [[IModelDb]]: as an [[Element]], [[Model]], or [[Relationship]].\n * Every subclass of Entity represents one BIS [ECClass]($ecschema-metadata).\n * An Entity is typically instantiated from an [EntityProps]($common) and can be converted back to this representation via [[Entity.toJSON]].\n * @public\n */\nexport class Entity {\n /** An immutable property used to discriminate between [[Entity]] and [EntityProps]($common), used to inform the TypeScript compiler that these two types\n * are never substitutable for one another. To obtain an EntityProps from an Entity, use [[Entity.toJSON]].\n */\n public readonly isInstanceOfEntity = true as const;\n /** The Schema that defines this class. */\n public static schema: typeof Schema; // TODO: Schema key on the static level, but it requires a version which may differ between imodels\n\n private get _ctor(): typeof Entity { return this.constructor as typeof Entity; }\n\n /** The name of the BIS class associated with this class.\n * @note Every subclass of Entity **MUST** override this method to identify its BIS class.\n * Failure to do so will ordinarily result in an error when the class is registered, since there may only\n * be one JavaScript class for a given BIS class (usually the errant class will collide with its superclass.)\n */\n public static get className(): string { return \"Entity\"; }\n\n private static _schemaItemKey?: SchemaItemKey;\n\n /** Serves as a unique identifier for this class. Typed variant of [[classFullName]].\n * @beta\n */\n public static get schemaItemKey(): SchemaItemKey {\n if (!this._schemaItemKey) {\n this._schemaItemKey = new SchemaItemKey(this.className, this.schema.schemaKey);\n }\n return this._schemaItemKey;\n }\n\n private _metadata?: EntityClass;\n\n /** When working with an Entity it can be useful to set property values directly, bypassing the compiler's type checking.\n * This property makes such code slightly less tedious to read and write.\n * @internal\n */\n public get asAny(): any { return this; }\n\n /** The name of the BIS Schema that defines this class */\n public get schemaName(): string { return this._ctor.schema.schemaName; }\n\n /** The name of the BIS class associated with this class. */\n public get className(): string { return this._ctor.className; }\n\n /** The [[IModelDb]] that contains this Entity */\n public iModel: IModelDb;\n\n /** The Id of this Entity. May be invalid if the Entity has not yet been saved in the database. */\n public id: Id64String;\n\n\n protected constructor(props: EntityProps, iModel: IModelDb) {\n this.iModel = iModel;\n this.id = Id64.fromJSON(props.id);\n // copy all auto-handled properties from input to the object being constructed\n this.forEachProperty((propName: string, meta: PropertyMetaData) => (this as any)[propName] = meta.createProperty((props as any)[propName]), false);\n }\n\n /** Invoke the constructor of the specified `Entity` subclass.\n * @internal\n */\n public static instantiate(subclass: typeof Entity, props: EntityProps, iModel: IModelDb): Entity {\n return new subclass(props, iModel);\n }\n\n /** Obtain the JSON representation of this Entity. Subclasses of [[Entity]] typically override this method to return their corresponding sub-type of [EntityProps]($common) -\n * for example, [[GeometricElement.toJSON]] returns a [GeometricElementProps]($common).\n */\n public toJSON(): EntityProps {\n const val: any = {};\n val.classFullName = this.classFullName;\n if (Id64.isValid(this.id))\n val.id = this.id;\n this.forEachProperty((propName: string) => val[propName] = (this as any)[propName], false);\n return val;\n }\n\n /** Call a function for each property of this Entity.\n * @param func The callback to be invoked on each property\n * @param includeCustom If true (default), include custom-handled properties in the iteration. Otherwise, skip custom-handled properties.\n * @note Custom-handled properties are core properties that have behavior enforced by C++ handlers.\n */\n public forEachProperty(func: PropertyCallback, includeCustom: boolean = true) {\n this.iModel.forEachMetaData(this.classFullName, true, func, includeCustom);\n }\n\n /** Get the full BIS class name of this Entity in the form \"schema:class\" */\n public static get classFullName(): string { return `${this.schema.schemaName}:${this.className}`; }\n\n /** Get the full BIS class name of this Entity in the form \"schema:class\". */\n public get classFullName(): string { return this._ctor.classFullName; }\n /**\n * Get the item key used by the ecschema-metadata package to identify this entity class\n * @beta\n */\n public get schemaItemKey(): SchemaItemKey { return this._ctor.schemaItemKey; }\n\n /** query metadata for this entity class from the iModel's schema\n * @throws [[IModelError]] if there is a problem querying the schema\n * @returns The metadata for the current entity\n * @beta\n */\n public async getMetaData(): Promise<EntityClass> {\n if (!this._metadata) {\n this._metadata = await this.iModel.schemaContext.getSchemaItem(this.schemaItemKey, EntityClass);\n }\n\n if(!this._metadata) {\n throw new Error(`Cannot get metadata for ${this.classFullName}`);\n }\n\n return this._metadata;\n }\n\n\n /** @internal */\n public static get protectedOperations(): string[] { return []; }\n\n /** return whether this Entity class is a subclass of another Entity class\n * @note the subclass-ness is checked according to JavaScript inheritance, to check the underlying raw EC class's\n * inheritance, you can use [ECClass.is]($ecschema-metadata)\n * @note this should have a type of `is<T extends typeof Entity>(otherClass: T): this is T` but can't because of\n * typescript's restriction on the `this` type in static methods\n */\n public static is(otherClass: typeof Entity): boolean {\n // inline of @itwin/core-bentley's isSubclassOf due to protected constructor.\n return this === otherClass || this.prototype instanceof otherClass;\n }\n\n /** whether this JavaScript class was generated for this ECClass because there was no registered custom implementation\n * ClassRegistry overrides this when generating a class\n * @internal\n */\n public static get isGeneratedClass() { return false; }\n\n /** Get the set of this entity's *entity references*, [EntityReferenceSet]($backend). An *entity reference* is any id\n * stored on the entity, in its EC properties or json fields.\n * This is important for cloning operations but can be useful in other situations as well.\n * @see this.collectReferenceIds\n * @beta\n */\n public getReferenceIds(): EntityReferenceSet {\n const referenceIds = new EntityReferenceSet();\n this.collectReferenceIds(referenceIds);\n return referenceIds;\n }\n\n /** kept rename for older transformer versions\n * @deprecated in 3.x . Use [[getReferenceIds]] instead\n * @internal\n */\n // eslint-disable-next-line @typescript-eslint/unbound-method\n public getReferenceConcreteIds = this.getReferenceIds;\n\n /** Collect the Ids of this entity's *references* at this level of the class hierarchy.\n * A *reference* is any entity referenced by this entity's EC Data, including json fields.\n * This is important for cloning operations but can be useful in other situations as well.\n * @param _referenceIds The Id64Set to populate with reference Ids.\n * @note This should be overridden (with `super` called) at each level the class hierarchy that introduces references.\n * @see getReferenceIds\n * @beta\n */\n protected collectReferenceIds(_referenceIds: EntityReferenceSet): void {\n return; // no references by default\n }\n\n /** kept rename for older transformer versions\n * @deprecated in 3.x . Use [[collectReferenceIds]] instead\n * @internal\n */\n // eslint-disable-next-line @typescript-eslint/unbound-method\n protected collectReferenceConcreteIds = this.collectReferenceIds;\n}\n\n/** Parameter type that can accept both abstract constructor types and non-abstract constructor types for `instanceof` to test.\n * @public\n */\nexport type EntityClassType<T> = Function & { prototype: T }; // eslint-disable-line @typescript-eslint/no-unsafe-function-type\n"]}
1
+ {"version":3,"file":"Entity.js","sourceRoot":"","sources":["../../src/Entity.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAuD;AACvD,oDAAyG;AAGzG,gEAAsE;AAEtE;;;;GAIG;AACH,MAAa,MAAM;IACjB;;OAEG;IACa,kBAAkB,GAAG,IAAa,CAAC;IACnD,0CAA0C;IACnC,MAAM,CAAC,MAAM,CAAgB,CAAC,mGAAmG;IAExI,IAAY,KAAK,KAAoB,OAAO,IAAI,CAAC,WAA4B,CAAC,CAAC,CAAC;IAEhF;;;;OAIG;IACI,MAAM,KAAK,SAAS,KAAa,OAAO,QAAQ,CAAC,CAAC,CAAC;IAElD,MAAM,CAAC,cAAc,CAAiB;IAE9C;;OAEG;IACI,MAAM,KAAK,aAAa;QAC7B,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;YACzB,IAAI,CAAC,cAAc,GAAG,IAAI,iCAAa,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QACjF,CAAC;QACD,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAEO,SAAS,CAAe;IAEhC;;;OAGG;IACH,IAAW,KAAK,KAAU,OAAO,IAAI,CAAC,CAAC,CAAC;IAExC,yDAAyD;IACzD,IAAW,UAAU,KAAa,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;IAExE,4DAA4D;IAC5D,IAAW,SAAS,KAAa,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;IAE/D,iDAAiD;IAC1C,MAAM,CAAW;IAExB,kGAAkG;IAC3F,EAAE,CAAa;IAGtB,YAAsB,KAAkB,EAAE,MAAgB;QACxD,IAAI,CAAC,MAAM,GAAG,MAAM,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AC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC;IACvE;;;OAGG;IACH,IAAW,aAAa,KAAoB,OAAO,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC;IAE9E;;;;OAIG;IACI,KAAK,CAAC,WAAW;QACtB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;YACpB,IAAI,CAAC,SAAS,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,aAAa,EAAE,+BAAW,CAAC,CAAC;QAClG,CAAC;QAED,IAAG,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;YACnB,MAAM,IAAI,KAAK,CAAC,2BAA2B,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC;QACnE,CAAC;QAED,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAGD,gBAAgB;IACT,MAAM,KAAK,mBAAmB,KAAe,OAAO,EAAE,CAAC,CAAC,CAAC;IAEhE;;;;;OAKG;IACI,MAAM,CAAC,EAAE,CAAC,UAAyB;QACxC,6EAA6E;QAC7E,OAAO,IAAI,KAAK,UAAU,IAAI,IAAI,CAAC,SAAS,YAAY,UAAU,CAAC;IACrE,CAAC;IAED;;;OAGG;IACI,MAAM,KAAK,gBAAgB,KAAK,OAAO,KAAK,CAAC,CAAC,CAAC;IAEtD;;;;;OAKG;IACI,eAAe;QACpB,MAAM,YAAY,GAAG,IAAI,gCAAkB,EAAE,CAAC;QAC9C,IAAI,CAAC,mBAAmB,CAAC,YAAY,CAAC,CAAC;QACvC,OAAO,YAAY,CAAC;IACtB,CAAC;IAED;;;;;;;OAOG;IACO,mBAAmB,CAAC,aAAiC;QAC7D,OAAO,CAAC,2BAA2B;IACrC,CAAC;CACF;AA7JD,wBA6JC","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 { Id64, Id64String } from \"@itwin/core-bentley\";\nimport { EntityProps, EntityReferenceSet, PropertyCallback, PropertyMetaData } from \"@itwin/core-common\";\nimport type { IModelDb } from \"./IModelDb\";\nimport { Schema } from \"./Schema\";\nimport { EntityClass, SchemaItemKey } from \"@itwin/ecschema-metadata\";\n\n/** Represents one of the fundamental building block in an [[IModelDb]]: as an [[Element]], [[Model]], or [[Relationship]].\n * Every subclass of Entity represents one BIS [ECClass]($ecschema-metadata).\n * An Entity is typically instantiated from an [EntityProps]($common) and can be converted back to this representation via [[Entity.toJSON]].\n * @public\n */\nexport class Entity {\n /** An immutable property used to discriminate between [[Entity]] and [EntityProps]($common), used to inform the TypeScript compiler that these two types\n * are never substitutable for one another. To obtain an EntityProps from an Entity, use [[Entity.toJSON]].\n */\n public readonly isInstanceOfEntity = true as const;\n /** The Schema that defines this class. */\n public static schema: typeof Schema; // TODO: Schema key on the static level, but it requires a version which may differ between imodels\n\n private get _ctor(): typeof Entity { return this.constructor as typeof Entity; }\n\n /** The name of the BIS class associated with this class.\n * @note Every subclass of Entity **MUST** override this method to identify its BIS class.\n * Failure to do so will ordinarily result in an error when the class is registered, since there may only\n * be one JavaScript class for a given BIS class (usually the errant class will collide with its superclass.)\n */\n public static get className(): string { return \"Entity\"; }\n\n private static _schemaItemKey?: SchemaItemKey;\n\n /** Serves as a unique identifier for this class. Typed variant of [[classFullName]].\n * @beta\n */\n public static get schemaItemKey(): SchemaItemKey {\n if (!this._schemaItemKey) {\n this._schemaItemKey = new SchemaItemKey(this.className, this.schema.schemaKey);\n }\n return this._schemaItemKey;\n }\n\n private _metadata?: EntityClass;\n\n /** When working with an Entity it can be useful to set property values directly, bypassing the compiler's type checking.\n * This property makes such code slightly less tedious to read and write.\n * @internal\n */\n public get asAny(): any { return this; }\n\n /** The name of the BIS Schema that defines this class */\n public get schemaName(): string { return this._ctor.schema.schemaName; }\n\n /** The name of the BIS class associated with this class. */\n public get className(): string { return this._ctor.className; }\n\n /** The [[IModelDb]] that contains this Entity */\n public iModel: IModelDb;\n\n /** The Id of this Entity. May be invalid if the Entity has not yet been saved in the database. */\n public id: Id64String;\n\n\n protected constructor(props: EntityProps, iModel: IModelDb) {\n this.iModel = iModel;\n this.id = Id64.fromJSON(props.id);\n // copy all auto-handled properties from input to the object being constructed\n this.forEachProperty((propName: string, meta: PropertyMetaData) => (this as any)[propName] = meta.createProperty((props as any)[propName]), false);\n }\n\n /** Invoke the constructor of the specified `Entity` subclass.\n * @internal\n */\n public static instantiate(subclass: typeof Entity, props: EntityProps, iModel: IModelDb): Entity {\n return new subclass(props, iModel);\n }\n\n /** Obtain the JSON representation of this Entity. Subclasses of [[Entity]] typically override this method to return their corresponding sub-type of [EntityProps]($common) -\n * for example, [[GeometricElement.toJSON]] returns a [GeometricElementProps]($common).\n */\n public toJSON(): EntityProps {\n const val: any = {};\n val.classFullName = this.classFullName;\n if (Id64.isValid(this.id))\n val.id = this.id;\n this.forEachProperty((propName: string) => val[propName] = (this as any)[propName], false);\n return val;\n }\n\n /** Call a function for each property of this Entity.\n * @param func The callback to be invoked on each property\n * @param includeCustom If true (default), include custom-handled properties in the iteration. Otherwise, skip custom-handled properties.\n * @note Custom-handled properties are core properties that have behavior enforced by C++ handlers.\n */\n public forEachProperty(func: PropertyCallback, includeCustom: boolean = true) {\n this.iModel.forEachMetaData(this.classFullName, true, func, includeCustom);\n }\n\n /** Get the full BIS class name of this Entity in the form \"schema:class\" */\n public static get classFullName(): string { return `${this.schema.schemaName}:${this.className}`; }\n\n /** Get the full BIS class name of this Entity in the form \"schema:class\". */\n public get classFullName(): string { return this._ctor.classFullName; }\n /**\n * Get the item key used by the ecschema-metadata package to identify this entity class\n * @beta\n */\n public get schemaItemKey(): SchemaItemKey { return this._ctor.schemaItemKey; }\n\n /** query metadata for this entity class from the iModel's schema\n * @throws [[IModelError]] if there is a problem querying the schema\n * @returns The metadata for the current entity\n * @beta\n */\n public async getMetaData(): Promise<EntityClass> {\n if (!this._metadata) {\n this._metadata = await this.iModel.schemaContext.getSchemaItem(this.schemaItemKey, EntityClass);\n }\n\n if(!this._metadata) {\n throw new Error(`Cannot get metadata for ${this.classFullName}`);\n }\n\n return this._metadata;\n }\n\n\n /** @internal */\n public static get protectedOperations(): string[] { return []; }\n\n /** return whether this Entity class is a subclass of another Entity class\n * @note the subclass-ness is checked according to JavaScript inheritance, to check the underlying raw EC class's\n * inheritance, you can use [ECClass.is]($ecschema-metadata)\n * @note this should have a type of `is<T extends typeof Entity>(otherClass: T): this is T` but can't because of\n * typescript's restriction on the `this` type in static methods\n */\n public static is(otherClass: typeof Entity): boolean {\n // inline of @itwin/core-bentley's isSubclassOf due to protected constructor.\n return this === otherClass || this.prototype instanceof otherClass;\n }\n\n /** whether this JavaScript class was generated for this ECClass because there was no registered custom implementation\n * ClassRegistry overrides this when generating a class\n * @internal\n */\n public static get isGeneratedClass() { return false; }\n\n /** Get the set of this entity's *entity references*, [EntityReferenceSet]($backend). An *entity reference* is any id\n * stored on the entity, in its EC properties or json fields.\n * This is important for cloning operations but can be useful in other situations as well.\n * @see this.collectReferenceIds\n * @beta\n */\n public getReferenceIds(): EntityReferenceSet {\n const referenceIds = new EntityReferenceSet();\n this.collectReferenceIds(referenceIds);\n return referenceIds;\n }\n\n /** Collect the Ids of this entity's *references* at this level of the class hierarchy.\n * A *reference* is any entity referenced by this entity's EC Data, including json fields.\n * This is important for cloning operations but can be useful in other situations as well.\n * @param _referenceIds The Id64Set to populate with reference Ids.\n * @note This should be overridden (with `super` called) at each level the class hierarchy that introduces references.\n * @see getReferenceIds\n * @beta\n */\n protected collectReferenceIds(_referenceIds: EntityReferenceSet): void {\n return; // no references by default\n }\n}\n\n/** Parameter type that can accept both abstract constructor types and non-abstract constructor types for `instanceof` to test.\n * @public\n */\nexport type EntityClassType<T> = Function & { prototype: T }; // eslint-disable-line @typescript-eslint/no-unsafe-function-type\n"]}
@@ -1,7 +1,7 @@
1
1
  import { GuidString } from "@itwin/core-bentley";
2
2
  import { ChangesetFileProps, ChangesetIndex, ChangesetIndexAndId, ChangesetProps, ChangesetRange, IModelVersion, LocalDirName } from "@itwin/core-common";
3
- import { AcquireNewBriefcaseIdArg, BriefcaseDbArg, BriefcaseIdArg, ChangesetArg, CheckpointArg, CreateNewIModelProps, DownloadChangesetArg, DownloadChangesetRangeArg, IModelIdArg, IModelNameArg, LockMap, LockProps, V2CheckpointAccessProps } from "./BackendHubAccess";
4
- import { CheckpointProps } from "./CheckpointManager";
3
+ import { AcquireNewBriefcaseIdArg, BriefcaseDbArg, BriefcaseIdArg, ChangesetArg, CreateNewIModelProps, DownloadChangesetArg, DownloadChangesetRangeArg, IModelIdArg, IModelNameArg, LockMap, LockProps, V2CheckpointAccessProps } from "./BackendHubAccess";
4
+ import { CheckpointProps, DownloadRequest } from "./CheckpointManager";
5
5
  import { LocalHub } from "./LocalHub";
6
6
  /**
7
7
  * Mocks iModelHub for testing creating Briefcases, downloading checkpoints, and simulating multiple users pushing and pulling changesets, etc.
@@ -82,7 +82,7 @@ export declare class HubMock {
82
82
  changesetProps: ChangesetFileProps;
83
83
  }): Promise<ChangesetIndex>;
84
84
  static queryV2Checkpoint(_arg: CheckpointProps): Promise<V2CheckpointAccessProps | undefined>;
85
- static downloadV1Checkpoint(arg: CheckpointArg): Promise<ChangesetIndexAndId>;
85
+ static downloadV1Checkpoint(arg: DownloadRequest): Promise<ChangesetIndexAndId>;
86
86
  static releaseAllLocks(arg: BriefcaseDbArg): Promise<void>;
87
87
  static queryAllLocks(_arg: BriefcaseDbArg): Promise<LockProps[]>;
88
88
  static acquireLocks(arg: BriefcaseDbArg, locks: LockMap): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"HubMock.d.ts","sourceRoot":"","sources":["../../src/HubMock.ts"],"names":[],"mappings":"AAMA,OAAO,EAAQ,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EACL,kBAAkB,EAAE,cAAc,EAAE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KtF,oBAAoB,CAAC,GAAG,EAAE,eAAe,GAAG,OAAO,CAAC,mBAAmB,CAAC;WAIxE,eAAe,CAAC,GAAG,EAAE,cAAc;WAKnC,aAAa,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;WAIzD,YAAY,CAAC,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;WAIhE,iBAAiB,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC;WAStE,YAAY,CAAC,GAAG,EAAE,WAAW,GAAG;QAAE,OAAO,EAAE,UAAU,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;mBAItE,qBAAqB;CAqB3C"}
@@ -176,7 +176,6 @@ class HubMock {
176
176
  static async queryV2Checkpoint(_arg) {
177
177
  return undefined;
178
178
  }
179
- // eslint-disable-next-line @typescript-eslint/no-deprecated
180
179
  static async downloadV1Checkpoint(arg) {
181
180
  return this.findLocalHub(arg.checkpoint.iModelId).downloadCheckpoint({ changeset: arg.checkpoint.changeset, targetFile: arg.localFile });
182
181
  }
@@ -1 +1 @@
1
- {"version":3,"file":"HubMock.js","sourceRoot":"","sources":["../../src/HubMock.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,+BAA4B;AAC5B,sDAAuD;AASvD,2DAAwF;AACxF,6CAA0C;AAC1C,6CAA0C;AAC1C,yCAAsC;AAEtC,gDAAkE;AAElE,SAAS,UAAU,CAAC,GAAuB;IACzC,IAAI,SAAS,KAAK,GAAG;QACnB,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;AAClD,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAa,OAAO;IACV,MAAM,CAAC,QAAQ,CAA2B;IAC1C,MAAM,CAAC,IAAI,GAAG,IAAI,GAAG,EAAoB,CAAC;IAC1C,MAAM,CAAC,cA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IAEM,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,GAA0C;QACzE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACpC,CAAC;IAEO,MAAM,CAAC,KAAK,CAAC,qBAAqB,CAAC,gBAAkC,EAAE,SAAiB;QAC9F,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACpC,IAAI,QAAQ,GAAG,KAAK,CAAC;YAErB,MAAM,YAAY,GAAG,CAAC,KAAa,EAAE,EAAE;gBACrC,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC;gBAC5D,IAAI,CAAC,QAAQ,IAAI,gBAAgB,CAAC,eAAe,EAAE,SAAS,CAAC,KAAK,kCAAc,CAAC,KAAK,EAAC,CAAC;oBACtF,QAAQ,GAAG,IAAI,CAAC;oBAChB,MAAM,CAAC,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;gBAClC,CAAC;YACH,CAAC,CAAC;YAEF,YAAY,CAAC,CAAC,CAAC,CAAC;YAChB,UAAU,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YACtC,UAAU,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;YACvC,UAAU,CAAC,GAAG,EAAE;gBACd,YAAY,CAAC,CAAC,CAAC,CAAC;gBAChB,OAAO,CAAC,SAAS,CAAC,CAAC;YACrB,CAAC,EAAE,GAAG,CAAC,CAAC;QACV,CAAC,CAAC,CAAC;IACL,CAAC;;AApNH,0BAqNC","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\nimport { join } from \"path\";\nimport { Guid, GuidString } from \"@itwin/core-bentley\";\nimport {\n ChangesetFileProps, ChangesetIndex, ChangesetIndexAndId, ChangesetProps, ChangesetRange, IModelVersion, LocalDirName,\n} from \"@itwin/core-common\";\nimport {\n AcquireNewBriefcaseIdArg,\n BackendHubAccess, BriefcaseDbArg, BriefcaseIdArg, ChangesetArg, CheckpointArg, CreateNewIModelProps, DownloadChangesetArg, DownloadChangesetRangeArg, IModelIdArg, IModelNameArg,\n LockMap, LockProps, V2CheckpointAccessProps,\n} from \"./BackendHubAccess\";\nimport { CheckpointProps, ProgressFunction, ProgressStatus } from \"./CheckpointManager\";\nimport { IModelHost } from \"./IModelHost\";\nimport { IModelJsFs } from \"./IModelJsFs\";\nimport { LocalHub } from \"./LocalHub\";\nimport { TokenArg } from \"./IModelDb\";\nimport { _getHubAccess, _setHubAccess } from \"./internal/Symbols\";\n\nfunction wasStarted(val: string | undefined): asserts val is string {\n if (undefined === val)\n throw new Error(\"Call HubMock.startup first\");\n}\n\n/**\n * Mocks iModelHub for testing creating Briefcases, downloading checkpoints, and simulating multiple users pushing and pulling changesets, etc.\n *\n * Generally, tests for apis that *create or modify* iModels can and should be mocked. Otherwise they:\n * - create tremendous load on the test servers when they run on programmer's desktops and in CI jobs\n * - waste network and data center resources (i.e. $$$s),\n * - interfere with other tests running on the same or other systems, and\n * - (far worse) are the source of test flakiness outside of the api being tested.\n *\n * This class can be used to create tests that do not require authentication, are synchronous,\n * are guaranteed to be self-contained (i.e. do not interfere with other tests running at the same time or later), and do not fail for reasons outside\n * of the control of the test itself. As a bonus, in addition to making tests more reliable, mocking IModelHub generally makes tests run *much* faster.\n *\n * On the other hand, tests that expect to find an existing iModels, checkpoints, changesets, etc. in IModelHub cannot be mocked. In that case, those tests\n * should be careful to NOT modify the data, since doing so causes interference with other tests running simultaneously. These tests should be limited to\n * low level testing of the core apis only.\n *\n * To initialize HubMock, call [[startup]] at the beginning of your test, usually in `describe.before`. Thereafter, all access to iModelHub for an iModel will be\n * directed to a [[LocalHub]] - your test code does not change. After the test(s) complete, call [[shutdown]] (usually in `describe.after`) to stop mocking IModelHub and clean\n * up any resources used by the test(s). If you want to mock a single test, call [[startup]] as the first line and [[shutdown]] as the last. If you wish to run the\n * test against a \"real\" IModelHub, you can simply comment off the call [[startup]], though in that case you should make sure the name of your\n * iModel is unique so your test won't collide with other tests (iModel name uniqueness is not necessary for mocked tests.)\n *\n * Mocked tests must always start by creating a new iModel via [[IModelHost[_hubAccess].createNewIModel]] with a `version0` iModel.\n * They use mock (aka \"bogus\") credentials for `AccessTokens`, which is fine since [[HubMock]] never accesses resources outside the current\n * computer.\n *\n * @note Only one HubMock at a time, *running in a single process*, may be active. The comments above about multiple simultaneous tests refer to tests\n * running on different computers, or on a single computer in multiple processes. All of those scenarios are problematic without mocking.\n *\n * @internal\n */\nexport class HubMock {\n private static mockRoot: LocalDirName | undefined;\n private static hubs = new Map<string, LocalHub>();\n private static _saveHubAccess: BackendHubAccess | undefined;\n private static _iTwinId: GuidString | undefined;\n\n /** Determine whether a test us currently being run under HubMock */\n public static get isValid() { return undefined !== this.mockRoot; }\n public static get iTwinId() {\n wasStarted(this._iTwinId);\n return this._iTwinId;\n }\n\n /**\n * Begin mocking IModelHub access. After this call, all access to IModelHub will be directed to a [[LocalHub]].\n * @param mockName a unique name (e.g. \"MyTest\") for this HubMock to disambiguate tests when more than one is simultaneously active.\n * It is used to create a private directory used by the HubMock for a test. That directory is removed when [[shutdown]] is called.\n */\n public static startup(mockName: LocalDirName, outputDir: string) {\n if (this.isValid)\n throw new Error(\"Either a previous test did not call HubMock.shutdown() properly, or more than one test is simultaneously attempting to use HubMock, which is not allowed\");\n\n this.hubs.clear();\n this.mockRoot = join(outputDir, \"HubMock\", mockName);\n IModelJsFs.recursiveMkDirSync(this.mockRoot);\n IModelJsFs.purgeDirSync(this.mockRoot);\n this._saveHubAccess = IModelHost[_getHubAccess]();\n\n IModelHost[_setHubAccess](this);\n HubMock._iTwinId = Guid.createValue(); // all iModels for this test get the same \"iTwinId\"\n }\n\n /** Stop a HubMock that was previously started with [[startup]]\n * @note this function throws an exception if any of the iModels used during the tests are left open.\n */\n public static shutdown() {\n if (this.mockRoot === undefined)\n return;\n\n HubMock._iTwinId = undefined;\n for (const hub of this.hubs)\n hub[1].cleanup();\n\n this.hubs.clear();\n IModelJsFs.purgeDirSync(this.mockRoot);\n IModelJsFs.removeSync(this.mockRoot);\n IModelHost[_setHubAccess](this._saveHubAccess);\n this.mockRoot = undefined;\n }\n\n public static findLocalHub(iModelId: GuidString): LocalHub {\n const hub = this.hubs.get(iModelId);\n if (!hub)\n throw new Error(`local hub for iModel ${iModelId} not created`);\n return hub;\n }\n\n /** create a [[LocalHub]] for an iModel. */\n public static async createNewIModel(arg: CreateNewIModelProps): Promise<GuidString> {\n wasStarted(this.mockRoot);\n const props = { ...arg, iModelId: Guid.createValue() };\n const mock = new LocalHub(join(this.mockRoot, props.iModelId), props);\n this.hubs.set(props.iModelId, mock);\n return props.iModelId;\n }\n\n /** remove the [[LocalHub]] for an iModel */\n public static destroy(iModelId: GuidString) {\n this.findLocalHub(iModelId).cleanup();\n this.hubs.delete(iModelId);\n }\n\n /** All methods below are mocks of the [[BackendHubAccess]] interface */\n\n public static async getChangesetFromNamedVersion(arg: IModelIdArg & { versionName: string }): Promise<ChangesetProps> {\n return this.findLocalHub(arg.iModelId).findNamedVersion(arg.versionName);\n }\n\n private static changesetIndexFromArg(arg: ChangesetArg) {\n return (undefined !== arg.changeset.index) ? arg.changeset.index : this.findLocalHub(arg.iModelId).getChangesetIndex(arg.changeset.id);\n }\n\n public static async getChangesetFromVersion(arg: IModelIdArg & { version: IModelVersion }): Promise<ChangesetProps> {\n const hub = this.findLocalHub(arg.iModelId);\n const version = arg.version;\n if (version.isFirst)\n return hub.getChangesetByIndex(0);\n\n const asOf = version.getAsOfChangeSet();\n if (asOf)\n return hub.getChangesetById(asOf);\n\n const versionName = version.getName();\n if (versionName)\n return hub.findNamedVersion(versionName);\n\n return hub.getLatestChangeset();\n }\n\n public static async getLatestChangeset(arg: IModelIdArg): Promise<ChangesetProps> {\n return this.findLocalHub(arg.iModelId).getLatestChangeset();\n }\n\n private static async getAccessToken(arg: TokenArg) {\n return arg.accessToken ?? await IModelHost.getAccessToken();\n }\n\n public static async getMyBriefcaseIds(arg: IModelIdArg): Promise<number[]> {\n const accessToken = await this.getAccessToken(arg);\n return this.findLocalHub(arg.iModelId).getBriefcaseIds(accessToken);\n }\n\n public static async acquireNewBriefcaseId(arg: AcquireNewBriefcaseIdArg): Promise<number> {\n const accessToken = await this.getAccessToken(arg);\n return this.findLocalHub(arg.iModelId).acquireNewBriefcaseId(accessToken, arg.briefcaseAlias);\n }\n\n /** Release a briefcaseId. After this call it is illegal to generate changesets for the released briefcaseId. */\n public static async releaseBriefcase(arg: BriefcaseIdArg): Promise<void> {\n return this.findLocalHub(arg.iModelId).releaseBriefcaseId(arg.briefcaseId);\n }\n\n public static async downloadChangeset(arg: DownloadChangesetArg): Promise<ChangesetFileProps> {\n const changesetProps = this.findLocalHub(arg.iModelId).downloadChangeset({ index: this.changesetIndexFromArg(arg), targetDir: arg.targetDir });\n\n if (arg.progressCallback) {\n const totalSize = IModelJsFs.lstatSync(changesetProps.pathname)?.size;\n if (totalSize)\n await HubMock.mockProgressReporting(arg.progressCallback, totalSize);\n }\n\n return changesetProps;\n }\n\n public static async downloadChangesets(arg: DownloadChangesetRangeArg): Promise<ChangesetFileProps[]> {\n const changesetProps = this.findLocalHub(arg.iModelId).downloadChangesets({ range: arg.range, targetDir: arg.targetDir });\n\n if (arg.progressCallback) {\n const totalSize = changesetProps.reduce((sum, props) => sum + (IModelJsFs.lstatSync(props.pathname)?.size ?? 0), 0);\n await HubMock.mockProgressReporting(arg.progressCallback, totalSize);\n }\n\n return changesetProps;\n }\n\n public static async queryChangeset(arg: ChangesetArg): Promise<ChangesetProps> {\n return this.findLocalHub(arg.iModelId).getChangesetByIndex(this.changesetIndexFromArg(arg));\n }\n\n public static async queryChangesets(arg: IModelIdArg & { range?: ChangesetRange }): Promise<ChangesetProps[]> {\n return this.findLocalHub(arg.iModelId).queryChangesets(arg.range);\n }\n\n public static async pushChangeset(arg: IModelIdArg & { changesetProps: ChangesetFileProps }): Promise<ChangesetIndex> {\n return this.findLocalHub(arg.iModelId).addChangeset(arg.changesetProps);\n }\n\n public static async queryV2Checkpoint(_arg: CheckpointProps): Promise<V2CheckpointAccessProps | undefined> {\n return undefined;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public static async downloadV1Checkpoint(arg: CheckpointArg): Promise<ChangesetIndexAndId> {\n return this.findLocalHub(arg.checkpoint.iModelId).downloadCheckpoint({ changeset: arg.checkpoint.changeset, targetFile: arg.localFile });\n }\n\n public static async releaseAllLocks(arg: BriefcaseDbArg) {\n const hub = this.findLocalHub(arg.iModelId);\n hub.releaseAllLocks({ briefcaseId: arg.briefcaseId, changesetIndex: hub.getIndexFromChangeset(arg.changeset) });\n }\n\n public static async queryAllLocks(_arg: BriefcaseDbArg): Promise<LockProps[]> {\n return [];\n }\n\n public static async acquireLocks(arg: BriefcaseDbArg, locks: LockMap): Promise<void> {\n this.findLocalHub(arg.iModelId).acquireLocks(locks, arg);\n }\n\n public static async queryIModelByName(arg: IModelNameArg): Promise<GuidString | undefined> {\n for (const hub of this.hubs) {\n const localHub = hub[1];\n if (localHub.iTwinId === arg.iTwinId && localHub.iModelName === arg.iModelName)\n return localHub.iModelId;\n }\n return undefined;\n }\n\n public static async deleteIModel(arg: IModelIdArg & { iTwinId: GuidString }): Promise<void> {\n return this.destroy(arg.iModelId);\n }\n\n private static async mockProgressReporting(progressCallback: ProgressFunction, totalSize: number): Promise<void> {\n await new Promise((resolve, reject) => {\n let rejected = false;\n\n const mockProgress = (index: number) => {\n const bytesDownloaded = Math.floor(totalSize * (index / 4));\n if (!rejected && progressCallback(bytesDownloaded, totalSize) === ProgressStatus.Abort){\n rejected = true;\n reject(new Error(\"AbortError\"));\n }\n };\n\n mockProgress(1);\n setTimeout(() => mockProgress(2), 50);\n setTimeout(() => mockProgress(3), 100);\n setTimeout(() => {\n mockProgress(4);\n resolve(undefined);\n }, 150);\n });\n }\n}\n"]}
1
+ {"version":3,"file":"HubMock.js","sourceRoot":"","sources":["../../src/HubMock.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,+BAA4B;AAC5B,sDAAuD;AASvD,2DAAyG;AACzG,6CAA0C;AAC1C,6CAA0C;AAC1C,yCAAsC;AAEtC,gDAAkE;AAElE,SAAS,UAAU,CAAC,GAAuB;IACzC,IAAI,SAAS,KAAK,GAAG;QACnB,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;AAClD,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAa,OAAO;IACV,MAAM,CAAC,QAAQ,CAA2B;IAC1C,MAAM,CAAC,IAAI,GAAG,IAAI,GAAG,EAAoB,CAAC;IAC1C,MAAM,CAAC,cAAc,CAA+B;IACpD,MAAM,CAAC,QAAQ,CAAyB;IAEhD,oEAAoE;IAC7D,MAAM,KAAK,OAAO,KAAK,OAAO,SAAS,KAAK,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC5D,MAAM,KAAK,OAAO;QACvB,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC1B,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,OAAO,CAAC,QAAsB,EAAE,SAAiB;QAC7D,IAAI,IAAI,CAAC,OAAO;YACd,MAAM,IAAI,KAAK,CAAC,0JAA0J,CAAC,CAAC;QAE9K,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;QAClB,IAAI,CAAC,QAAQ,GAAG,IAAA,WAAI,EAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;QACrD,uBAAU,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC7C,uBAA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C,CAAC;gBAClC,CAAC;YACH,CAAC,CAAC;YAEF,YAAY,CAAC,CAAC,CAAC,CAAC;YAChB,UAAU,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YACtC,UAAU,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;YACvC,UAAU,CAAC,GAAG,EAAE;gBACd,YAAY,CAAC,CAAC,CAAC,CAAC;gBAChB,OAAO,CAAC,SAAS,CAAC,CAAC;YACrB,CAAC,EAAE,GAAG,CAAC,CAAC;QACV,CAAC,CAAC,CAAC;IACL,CAAC;;AApNH,0BAqNC","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\nimport { join } from \"path\";\nimport { Guid, GuidString } from \"@itwin/core-bentley\";\nimport {\n ChangesetFileProps, ChangesetIndex, ChangesetIndexAndId, ChangesetProps, ChangesetRange, IModelVersion, LocalDirName,\n} from \"@itwin/core-common\";\nimport {\n AcquireNewBriefcaseIdArg,\n BackendHubAccess, BriefcaseDbArg, BriefcaseIdArg, ChangesetArg, CreateNewIModelProps, DownloadChangesetArg, DownloadChangesetRangeArg, IModelIdArg, IModelNameArg,\n LockMap, LockProps, V2CheckpointAccessProps,\n} from \"./BackendHubAccess\";\nimport { CheckpointProps, DownloadRequest, ProgressFunction, ProgressStatus } from \"./CheckpointManager\";\nimport { IModelHost } from \"./IModelHost\";\nimport { IModelJsFs } from \"./IModelJsFs\";\nimport { LocalHub } from \"./LocalHub\";\nimport { TokenArg } from \"./IModelDb\";\nimport { _getHubAccess, _setHubAccess } from \"./internal/Symbols\";\n\nfunction wasStarted(val: string | undefined): asserts val is string {\n if (undefined === val)\n throw new Error(\"Call HubMock.startup first\");\n}\n\n/**\n * Mocks iModelHub for testing creating Briefcases, downloading checkpoints, and simulating multiple users pushing and pulling changesets, etc.\n *\n * Generally, tests for apis that *create or modify* iModels can and should be mocked. Otherwise they:\n * - create tremendous load on the test servers when they run on programmer's desktops and in CI jobs\n * - waste network and data center resources (i.e. $$$s),\n * - interfere with other tests running on the same or other systems, and\n * - (far worse) are the source of test flakiness outside of the api being tested.\n *\n * This class can be used to create tests that do not require authentication, are synchronous,\n * are guaranteed to be self-contained (i.e. do not interfere with other tests running at the same time or later), and do not fail for reasons outside\n * of the control of the test itself. As a bonus, in addition to making tests more reliable, mocking IModelHub generally makes tests run *much* faster.\n *\n * On the other hand, tests that expect to find an existing iModels, checkpoints, changesets, etc. in IModelHub cannot be mocked. In that case, those tests\n * should be careful to NOT modify the data, since doing so causes interference with other tests running simultaneously. These tests should be limited to\n * low level testing of the core apis only.\n *\n * To initialize HubMock, call [[startup]] at the beginning of your test, usually in `describe.before`. Thereafter, all access to iModelHub for an iModel will be\n * directed to a [[LocalHub]] - your test code does not change. After the test(s) complete, call [[shutdown]] (usually in `describe.after`) to stop mocking IModelHub and clean\n * up any resources used by the test(s). If you want to mock a single test, call [[startup]] as the first line and [[shutdown]] as the last. If you wish to run the\n * test against a \"real\" IModelHub, you can simply comment off the call [[startup]], though in that case you should make sure the name of your\n * iModel is unique so your test won't collide with other tests (iModel name uniqueness is not necessary for mocked tests.)\n *\n * Mocked tests must always start by creating a new iModel via [[IModelHost[_hubAccess].createNewIModel]] with a `version0` iModel.\n * They use mock (aka \"bogus\") credentials for `AccessTokens`, which is fine since [[HubMock]] never accesses resources outside the current\n * computer.\n *\n * @note Only one HubMock at a time, *running in a single process*, may be active. The comments above about multiple simultaneous tests refer to tests\n * running on different computers, or on a single computer in multiple processes. All of those scenarios are problematic without mocking.\n *\n * @internal\n */\nexport class HubMock {\n private static mockRoot: LocalDirName | undefined;\n private static hubs = new Map<string, LocalHub>();\n private static _saveHubAccess: BackendHubAccess | undefined;\n private static _iTwinId: GuidString | undefined;\n\n /** Determine whether a test us currently being run under HubMock */\n public static get isValid() { return undefined !== this.mockRoot; }\n public static get iTwinId() {\n wasStarted(this._iTwinId);\n return this._iTwinId;\n }\n\n /**\n * Begin mocking IModelHub access. After this call, all access to IModelHub will be directed to a [[LocalHub]].\n * @param mockName a unique name (e.g. \"MyTest\") for this HubMock to disambiguate tests when more than one is simultaneously active.\n * It is used to create a private directory used by the HubMock for a test. That directory is removed when [[shutdown]] is called.\n */\n public static startup(mockName: LocalDirName, outputDir: string) {\n if (this.isValid)\n throw new Error(\"Either a previous test did not call HubMock.shutdown() properly, or more than one test is simultaneously attempting to use HubMock, which is not allowed\");\n\n this.hubs.clear();\n this.mockRoot = join(outputDir, \"HubMock\", mockName);\n IModelJsFs.recursiveMkDirSync(this.mockRoot);\n IModelJsFs.purgeDirSync(this.mockRoot);\n this._saveHubAccess = IModelHost[_getHubAccess]();\n\n IModelHost[_setHubAccess](this);\n HubMock._iTwinId = Guid.createValue(); // all iModels for this test get the same \"iTwinId\"\n }\n\n /** Stop a HubMock that was previously started with [[startup]]\n * @note this function throws an exception if any of the iModels used during the tests are left open.\n */\n public static shutdown() {\n if (this.mockRoot === undefined)\n return;\n\n HubMock._iTwinId = undefined;\n for (const hub of this.hubs)\n hub[1].cleanup();\n\n this.hubs.clear();\n IModelJsFs.purgeDirSync(this.mockRoot);\n IModelJsFs.removeSync(this.mockRoot);\n IModelHost[_setHubAccess](this._saveHubAccess);\n this.mockRoot = undefined;\n }\n\n public static findLocalHub(iModelId: GuidString): LocalHub {\n const hub = this.hubs.get(iModelId);\n if (!hub)\n throw new Error(`local hub for iModel ${iModelId} not created`);\n return hub;\n }\n\n /** create a [[LocalHub]] for an iModel. */\n public static async createNewIModel(arg: CreateNewIModelProps): Promise<GuidString> {\n wasStarted(this.mockRoot);\n const props = { ...arg, iModelId: Guid.createValue() };\n const mock = new LocalHub(join(this.mockRoot, props.iModelId), props);\n this.hubs.set(props.iModelId, mock);\n return props.iModelId;\n }\n\n /** remove the [[LocalHub]] for an iModel */\n public static destroy(iModelId: GuidString) {\n this.findLocalHub(iModelId).cleanup();\n this.hubs.delete(iModelId);\n }\n\n /** All methods below are mocks of the [[BackendHubAccess]] interface */\n\n public static async getChangesetFromNamedVersion(arg: IModelIdArg & { versionName: string }): Promise<ChangesetProps> {\n return this.findLocalHub(arg.iModelId).findNamedVersion(arg.versionName);\n }\n\n private static changesetIndexFromArg(arg: ChangesetArg) {\n return (undefined !== arg.changeset.index) ? arg.changeset.index : this.findLocalHub(arg.iModelId).getChangesetIndex(arg.changeset.id);\n }\n\n public static async getChangesetFromVersion(arg: IModelIdArg & { version: IModelVersion }): Promise<ChangesetProps> {\n const hub = this.findLocalHub(arg.iModelId);\n const version = arg.version;\n if (version.isFirst)\n return hub.getChangesetByIndex(0);\n\n const asOf = version.getAsOfChangeSet();\n if (asOf)\n return hub.getChangesetById(asOf);\n\n const versionName = version.getName();\n if (versionName)\n return hub.findNamedVersion(versionName);\n\n return hub.getLatestChangeset();\n }\n\n public static async getLatestChangeset(arg: IModelIdArg): Promise<ChangesetProps> {\n return this.findLocalHub(arg.iModelId).getLatestChangeset();\n }\n\n private static async getAccessToken(arg: TokenArg) {\n return arg.accessToken ?? await IModelHost.getAccessToken();\n }\n\n public static async getMyBriefcaseIds(arg: IModelIdArg): Promise<number[]> {\n const accessToken = await this.getAccessToken(arg);\n return this.findLocalHub(arg.iModelId).getBriefcaseIds(accessToken);\n }\n\n public static async acquireNewBriefcaseId(arg: AcquireNewBriefcaseIdArg): Promise<number> {\n const accessToken = await this.getAccessToken(arg);\n return this.findLocalHub(arg.iModelId).acquireNewBriefcaseId(accessToken, arg.briefcaseAlias);\n }\n\n /** Release a briefcaseId. After this call it is illegal to generate changesets for the released briefcaseId. */\n public static async releaseBriefcase(arg: BriefcaseIdArg): Promise<void> {\n return this.findLocalHub(arg.iModelId).releaseBriefcaseId(arg.briefcaseId);\n }\n\n public static async downloadChangeset(arg: DownloadChangesetArg): Promise<ChangesetFileProps> {\n const changesetProps = this.findLocalHub(arg.iModelId).downloadChangeset({ index: this.changesetIndexFromArg(arg), targetDir: arg.targetDir });\n\n if (arg.progressCallback) {\n const totalSize = IModelJsFs.lstatSync(changesetProps.pathname)?.size;\n if (totalSize)\n await HubMock.mockProgressReporting(arg.progressCallback, totalSize);\n }\n\n return changesetProps;\n }\n\n public static async downloadChangesets(arg: DownloadChangesetRangeArg): Promise<ChangesetFileProps[]> {\n const changesetProps = this.findLocalHub(arg.iModelId).downloadChangesets({ range: arg.range, targetDir: arg.targetDir });\n\n if (arg.progressCallback) {\n const totalSize = changesetProps.reduce((sum, props) => sum + (IModelJsFs.lstatSync(props.pathname)?.size ?? 0), 0);\n await HubMock.mockProgressReporting(arg.progressCallback, totalSize);\n }\n\n return changesetProps;\n }\n\n public static async queryChangeset(arg: ChangesetArg): Promise<ChangesetProps> {\n return this.findLocalHub(arg.iModelId).getChangesetByIndex(this.changesetIndexFromArg(arg));\n }\n\n public static async queryChangesets(arg: IModelIdArg & { range?: ChangesetRange }): Promise<ChangesetProps[]> {\n return this.findLocalHub(arg.iModelId).queryChangesets(arg.range);\n }\n\n public static async pushChangeset(arg: IModelIdArg & { changesetProps: ChangesetFileProps }): Promise<ChangesetIndex> {\n return this.findLocalHub(arg.iModelId).addChangeset(arg.changesetProps);\n }\n\n public static async queryV2Checkpoint(_arg: CheckpointProps): Promise<V2CheckpointAccessProps | undefined> {\n return undefined;\n }\n\n\n public static async downloadV1Checkpoint(arg: DownloadRequest): Promise<ChangesetIndexAndId> {\n return this.findLocalHub(arg.checkpoint.iModelId).downloadCheckpoint({ changeset: arg.checkpoint.changeset, targetFile: arg.localFile });\n }\n\n public static async releaseAllLocks(arg: BriefcaseDbArg) {\n const hub = this.findLocalHub(arg.iModelId);\n hub.releaseAllLocks({ briefcaseId: arg.briefcaseId, changesetIndex: hub.getIndexFromChangeset(arg.changeset) });\n }\n\n public static async queryAllLocks(_arg: BriefcaseDbArg): Promise<LockProps[]> {\n return [];\n }\n\n public static async acquireLocks(arg: BriefcaseDbArg, locks: LockMap): Promise<void> {\n this.findLocalHub(arg.iModelId).acquireLocks(locks, arg);\n }\n\n public static async queryIModelByName(arg: IModelNameArg): Promise<GuidString | undefined> {\n for (const hub of this.hubs) {\n const localHub = hub[1];\n if (localHub.iTwinId === arg.iTwinId && localHub.iModelName === arg.iModelName)\n return localHub.iModelId;\n }\n return undefined;\n }\n\n public static async deleteIModel(arg: IModelIdArg & { iTwinId: GuidString }): Promise<void> {\n return this.destroy(arg.iModelId);\n }\n\n private static async mockProgressReporting(progressCallback: ProgressFunction, totalSize: number): Promise<void> {\n await new Promise((resolve, reject) => {\n let rejected = false;\n\n const mockProgress = (index: number) => {\n const bytesDownloaded = Math.floor(totalSize * (index / 4));\n if (!rejected && progressCallback(bytesDownloaded, totalSize) === ProgressStatus.Abort){\n rejected = true;\n reject(new Error(\"AbortError\"));\n }\n };\n\n mockProgress(1);\n setTimeout(() => mockProgress(2), 50);\n setTimeout(() => mockProgress(3), 100);\n setTimeout(() => {\n mockProgress(4);\n resolve(undefined);\n }, 150);\n });\n }\n}\n"]}
@@ -315,56 +315,6 @@ export declare abstract class IModelDb extends IModel {
315
315
  * @public
316
316
  * */
317
317
  createQueryReader(ecsql: string, params?: QueryBinder, config?: QueryOptions): ECSqlReader;
318
- /** Execute a query and stream its results
319
- * The result of the query is async iterator over the rows. The iterator will get next page automatically once rows in current page has been read.
320
- * [ECSQL row]($docs/learning/ECSQLRowFormat).
321
- *
322
- * See also:
323
- * - [ECSQL Overview]($docs/learning/backend/ExecutingECSQL)
324
- * - [Code Examples]($docs/learning/backend/ECSQLCodeExamples)
325
- *
326
- * @param ecsql The ECSQL statement to execute
327
- * @param params The values to bind to the parameters (if the ECSQL has any).
328
- * @param options Allow to specify certain flags which control how query is executed.
329
- * @returns Returns the query result as an *AsyncIterableIterator<any>* which lazy load result as needed. The row format is determined by *rowFormat* parameter.
330
- * See [ECSQL row format]($docs/learning/ECSQLRowFormat) for details about the format of the returned rows.
331
- * @throws [IModelError]($common) If there was any error while submitting, preparing or stepping into query
332
- * @deprecated in 3.7. Use [[createQueryReader]] instead; it accepts the same parameters.
333
- */
334
- query(ecsql: string, params?: QueryBinder, options?: QueryOptions): AsyncIterableIterator<any>;
335
- /** Compute number of rows that would be returned by the ECSQL.
336
- *
337
- * See also:
338
- * - [ECSQL Overview]($docs/learning/backend/ExecutingECSQL)
339
- * - [Code Examples]($docs/learning/backend/ECSQLCodeExamples)
340
- *
341
- * @param ecsql The ECSQL statement to execute
342
- * @param params The values to bind to the parameters (if the ECSQL has any).
343
- * See "[iTwin.js Types used in ECSQL Parameter Bindings]($docs/learning/ECSQLParameterTypes)" for details.
344
- * @returns Return row count.
345
- * @throws [IModelError]($common) If the statement is invalid
346
- * @deprecated in 3.7. Count the number of results using `count(*)` where the original query is a subquery instead. E.g., `SELECT count(*) FROM (<query-whose-rows-to-count>)`.
347
- */
348
- queryRowCount(ecsql: string, params?: QueryBinder): Promise<number>;
349
- /** Cancel any previous query with same token and run execute the current specified query.
350
- * The result of the query is async iterator over the rows. The iterator will get next page automatically once rows in current page has been read.
351
- * [ECSQL row]($docs/learning/ECSQLRowFormat).
352
- *
353
- * See also:
354
- * - [ECSQL Overview]($docs/learning/backend/ExecutingECSQL)
355
- * - [Code Examples]($docs/learning/backend/ECSQLCodeExamples)
356
- *
357
- * @param ecsql The ECSQL statement to execute
358
- * @param token None empty restart token. The previous query with same token would be cancelled. This would cause
359
- * exception which user code must handle.
360
- * @param params The values to bind to the parameters (if the ECSQL has any).
361
- * @param options Allow to specify certain flags which control how query is executed.
362
- * @returns Returns the query result as an *AsyncIterableIterator<any>* which lazy load result as needed. The row format is determined by *rowFormat* parameter.
363
- * See [ECSQL row format]($docs/learning/ECSQLRowFormat) for details about the format of the returned rows.
364
- * @throws [IModelError]($common) If there was any error while submitting, preparing or stepping into query
365
- * @deprecated in 3.7. Use [[createQueryReader]] instead. Pass in the restart token as part of the `config` argument; e.g., `{ restartToken: myToken }` or `new QueryOptionsBuilder().setRestartToken(myToken).getOptions()`.
366
- */
367
- restartQuery(token: string, ecsql: string, params?: QueryBinder, options?: QueryOptions): AsyncIterableIterator<any>;
368
318
  /**
369
319
  * Use a prepared SQL statement, potentially from the statement cache. If the requested statement doesn't exist
370
320
  * in the statement cache, a new statement is prepared. After the callback completes, the statement is reset and saved
@@ -1090,8 +1040,6 @@ export declare namespace IModelDb {
1090
1040
  */
1091
1041
  iterateViews(params: ViewQueryParams, callback: (view: ViewDefinition) => boolean): boolean;
1092
1042
  private loadViewData;
1093
- /** @deprecated in 3.x. use [[getViewStateProps]]. */
1094
- getViewStateData(viewDefinitionId: ViewIdString, options?: ViewStateLoadProps): ViewStateProps;
1095
1043
  /** Obtain a [ViewStateProps]($common) for a [[ViewDefinition]] specified by ViewIdString. */
1096
1044
  getViewStateProps(viewDefinitionId: ViewIdString, options?: ViewStateLoadProps): Promise<ViewStateProps>;
1097
1045
  private getViewThumbnailArg;
@@ -1 +1 @@
1
- {"version":3,"file":"IModelDb.d.ts","sourceRoot":"","sources":["../../src/IModelDb.ts"],"names":[],"mappings":"AAIA;;GAEG;AAKH,OAAO,EAAE,cAAc,EAAqB,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EACL,WAAW,EAAU,OAAO,EAAE,aAAa,EAAyE,QAAQ,EACtH,UAAU,EAAQ,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,EAA+B,QAAQ,EACrH,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,gBAAgB,EAAE,kBAAkB,EAAE,WAAW,EAA2C,oBAAoB,EAAuB,IAAI,EAC3I,SAAS,EAAE,8BAA8B,EAAE,gCAAgC,EAAE,yBAAyB,EACvF,YAAY,EAAa,aAAa,EAAE,WAAW,EAAE,kBAAkB,EAAE,yCAAyC,EAAE,gCAAgC,EAAE,iCAAiC,EAAE,sBAAsB,EAAE,2BAA2B,EAC3P,gBAAgB,EAAE,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,iBAAiB,EAAE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wBAAwB,CAAC,QAAQ,EAAE,aAAa;IAS9D;;;;;OAKG;IACI,gBAAgB,IAAI,IAAI;IAQ/B;;;;;OAKG;WACW,QAAQ,CAAC,QAAQ,EAAE,aAAa,EAAE,QAAQ,GAAE,QAA6B,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,YAAY;IAiBpI;;;;OAIG;WACW,mBAAmB,CAAC,cAAc,EAAE,aAAa,GAAG,IAAI;CAWvE"}
@@ -400,70 +400,6 @@ class IModelDb extends core_common_1.IModel {
400
400
  };
401
401
  return new core_common_1.ECSqlReader(executor, ecsql, params, config);
402
402
  }
403
- /** Execute a query and stream its results
404
- * The result of the query is async iterator over the rows. The iterator will get next page automatically once rows in current page has been read.
405
- * [ECSQL row]($docs/learning/ECSQLRowFormat).
406
- *
407
- * See also:
408
- * - [ECSQL Overview]($docs/learning/backend/ExecutingECSQL)
409
- * - [Code Examples]($docs/learning/backend/ECSQLCodeExamples)
410
- *
411
- * @param ecsql The ECSQL statement to execute
412
- * @param params The values to bind to the parameters (if the ECSQL has any).
413
- * @param options Allow to specify certain flags which control how query is executed.
414
- * @returns Returns the query result as an *AsyncIterableIterator<any>* which lazy load result as needed. The row format is determined by *rowFormat* parameter.
415
- * See [ECSQL row format]($docs/learning/ECSQLRowFormat) for details about the format of the returned rows.
416
- * @throws [IModelError]($common) If there was any error while submitting, preparing or stepping into query
417
- * @deprecated in 3.7. Use [[createQueryReader]] instead; it accepts the same parameters.
418
- */
419
- async *query(ecsql, params, options) {
420
- const builder = new core_common_1.QueryOptionsBuilder(options);
421
- const reader = this.createQueryReader(ecsql, params, builder.getOptions());
422
- while (await reader.step())
423
- yield reader.formatCurrentRow();
424
- }
425
- /** Compute number of rows that would be returned by the ECSQL.
426
- *
427
- * See also:
428
- * - [ECSQL Overview]($docs/learning/backend/ExecutingECSQL)
429
- * - [Code Examples]($docs/learning/backend/ECSQLCodeExamples)
430
- *
431
- * @param ecsql The ECSQL statement to execute
432
- * @param params The values to bind to the parameters (if the ECSQL has any).
433
- * See "[iTwin.js Types used in ECSQL Parameter Bindings]($docs/learning/ECSQLParameterTypes)" for details.
434
- * @returns Return row count.
435
- * @throws [IModelError]($common) If the statement is invalid
436
- * @deprecated in 3.7. Count the number of results using `count(*)` where the original query is a subquery instead. E.g., `SELECT count(*) FROM (<query-whose-rows-to-count>)`.
437
- */
438
- async queryRowCount(ecsql, params) {
439
- for await (const row of this.createQueryReader(`SELECT count(*) FROM (${ecsql})`, params)) {
440
- return row[0];
441
- }
442
- throw new core_common_1.IModelError(core_bentley_1.DbResult.BE_SQLITE_ERROR, "Failed to get row count");
443
- }
444
- /** Cancel any previous query with same token and run execute the current specified query.
445
- * The result of the query is async iterator over the rows. The iterator will get next page automatically once rows in current page has been read.
446
- * [ECSQL row]($docs/learning/ECSQLRowFormat).
447
- *
448
- * See also:
449
- * - [ECSQL Overview]($docs/learning/backend/ExecutingECSQL)
450
- * - [Code Examples]($docs/learning/backend/ECSQLCodeExamples)
451
- *
452
- * @param ecsql The ECSQL statement to execute
453
- * @param token None empty restart token. The previous query with same token would be cancelled. This would cause
454
- * exception which user code must handle.
455
- * @param params The values to bind to the parameters (if the ECSQL has any).
456
- * @param options Allow to specify certain flags which control how query is executed.
457
- * @returns Returns the query result as an *AsyncIterableIterator<any>* which lazy load result as needed. The row format is determined by *rowFormat* parameter.
458
- * See [ECSQL row format]($docs/learning/ECSQLRowFormat) for details about the format of the returned rows.
459
- * @throws [IModelError]($common) If there was any error while submitting, preparing or stepping into query
460
- * @deprecated in 3.7. Use [[createQueryReader]] instead. Pass in the restart token as part of the `config` argument; e.g., `{ restartToken: myToken }` or `new QueryOptionsBuilder().setRestartToken(myToken).getOptions()`.
461
- */
462
- async *restartQuery(token, ecsql, params, options) {
463
- for await (const row of this.createQueryReader(ecsql, params, new core_common_1.QueryOptionsBuilder(options).setRestartToken(token).getOptions())) {
464
- yield row;
465
- }
466
- }
467
403
  /**
468
404
  * Use a prepared SQL statement, potentially from the statement cache. If the requested statement doesn't exist
469
405
  * in the statement cache, a new statement is prepared. After the callback completes, the statement is reset and saved
@@ -2251,17 +2187,6 @@ function processSchemaWriteStatus(status) {
2251
2187
  }
2252
2188
  return props;
2253
2189
  }
2254
- /** @deprecated in 3.x. use [[getViewStateProps]]. */
2255
- getViewStateData(viewDefinitionId, options) {
2256
- const viewStateData = this.loadViewData(viewDefinitionId, options);
2257
- const baseModelId = viewStateData.viewDefinitionProps.baseModelId;
2258
- if (baseModelId) {
2259
- const drawingExtents = core_geometry_1.Range3d.fromJSON(this._iModel[Symbols_1._nativeDb].queryModelExtents({ id: baseModelId }).modelExtents);
2260
- if (!drawingExtents.isNull)
2261
- viewStateData.modelExtents = drawingExtents.toJSON();
2262
- }
2263
- return viewStateData;
2264
- }
2265
2190
  /** Obtain a [ViewStateProps]($common) for a [[ViewDefinition]] specified by ViewIdString. */
2266
2191
  async getViewStateProps(viewDefinitionId, options) {
2267
2192
  const viewStateData = this.loadViewData(viewDefinitionId, options);