@itwin/core-backend 3.6.0-dev.8 → 3.6.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.
Files changed (98) hide show
  1. package/CHANGELOG.md +55 -1
  2. package/LICENSE.md +1 -1
  3. package/lib/cjs/AliCloudStorageService.d.ts +2 -2
  4. package/lib/cjs/AliCloudStorageService.js +1 -1
  5. package/lib/cjs/AliCloudStorageService.js.map +1 -1
  6. package/lib/cjs/BackendHubAccess.d.ts +2 -2
  7. package/lib/cjs/BackendHubAccess.js.map +1 -1
  8. package/lib/cjs/BriefcaseManager.d.ts.map +1 -1
  9. package/lib/cjs/BriefcaseManager.js +1 -0
  10. package/lib/cjs/BriefcaseManager.js.map +1 -1
  11. package/lib/cjs/ChangeSummaryManager.d.ts +2 -2
  12. package/lib/cjs/ChangeSummaryManager.js +1 -1
  13. package/lib/cjs/ChangeSummaryManager.js.map +1 -1
  14. package/lib/cjs/CheckpointManager.d.ts +3 -2
  15. package/lib/cjs/CheckpointManager.d.ts.map +1 -1
  16. package/lib/cjs/CheckpointManager.js +14 -8
  17. package/lib/cjs/CheckpointManager.js.map +1 -1
  18. package/lib/cjs/ClassRegistry.d.ts.map +1 -1
  19. package/lib/cjs/ClassRegistry.js +2 -1
  20. package/lib/cjs/ClassRegistry.js.map +1 -1
  21. package/lib/cjs/CloudSqlite.d.ts.map +1 -1
  22. package/lib/cjs/CloudSqlite.js +2 -1
  23. package/lib/cjs/CloudSqlite.js.map +1 -1
  24. package/lib/cjs/CloudStorageBackend.d.ts +4 -4
  25. package/lib/cjs/CloudStorageBackend.js +3 -3
  26. package/lib/cjs/CloudStorageBackend.js.map +1 -1
  27. package/lib/cjs/CodeSpecs.d.ts +5 -0
  28. package/lib/cjs/CodeSpecs.d.ts.map +1 -1
  29. package/lib/cjs/CodeSpecs.js +12 -0
  30. package/lib/cjs/CodeSpecs.js.map +1 -1
  31. package/lib/cjs/ECSqlStatement.d.ts +8 -1
  32. package/lib/cjs/ECSqlStatement.d.ts.map +1 -1
  33. package/lib/cjs/ECSqlStatement.js.map +1 -1
  34. package/lib/cjs/Element.d.ts +10 -3
  35. package/lib/cjs/Element.d.ts.map +1 -1
  36. package/lib/cjs/Element.js +17 -6
  37. package/lib/cjs/Element.js.map +1 -1
  38. package/lib/cjs/ElementAspect.d.ts +5 -2
  39. package/lib/cjs/ElementAspect.d.ts.map +1 -1
  40. package/lib/cjs/ElementAspect.js +1 -1
  41. package/lib/cjs/ElementAspect.js.map +1 -1
  42. package/lib/cjs/IModelCloneContext.d.ts +2 -2
  43. package/lib/cjs/IModelCloneContext.d.ts.map +1 -1
  44. package/lib/cjs/IModelCloneContext.js +1 -1
  45. package/lib/cjs/IModelCloneContext.js.map +1 -1
  46. package/lib/cjs/IModelDb.d.ts +29 -2
  47. package/lib/cjs/IModelDb.d.ts.map +1 -1
  48. package/lib/cjs/IModelDb.js +40 -28
  49. package/lib/cjs/IModelDb.js.map +1 -1
  50. package/lib/cjs/IModelHost.d.ts +7 -8
  51. package/lib/cjs/IModelHost.d.ts.map +1 -1
  52. package/lib/cjs/IModelHost.js.map +1 -1
  53. package/lib/cjs/IpcHost.js +4 -4
  54. package/lib/cjs/IpcHost.js.map +1 -1
  55. package/lib/cjs/LocalHub.d.ts.map +1 -1
  56. package/lib/cjs/LocalHub.js +1 -3
  57. package/lib/cjs/LocalHub.js.map +1 -1
  58. package/lib/cjs/Material.d.ts +49 -21
  59. package/lib/cjs/Material.d.ts.map +1 -1
  60. package/lib/cjs/Material.js +41 -7
  61. package/lib/cjs/Material.js.map +1 -1
  62. package/lib/cjs/RpcBackend.d.ts.map +1 -1
  63. package/lib/cjs/RpcBackend.js +1 -0
  64. package/lib/cjs/RpcBackend.js.map +1 -1
  65. package/lib/cjs/domains/FunctionalSchema.d.ts +1 -1
  66. package/lib/cjs/domains/FunctionalSchema.d.ts.map +1 -1
  67. package/lib/cjs/domains/FunctionalSchema.js +1 -1
  68. package/lib/cjs/domains/FunctionalSchema.js.map +1 -1
  69. package/lib/cjs/rpc/multipart.d.ts.map +1 -1
  70. package/lib/cjs/rpc/multipart.js +1 -0
  71. package/lib/cjs/rpc/multipart.js.map +1 -1
  72. package/lib/cjs/rpc/tracing.d.ts.map +1 -1
  73. package/lib/cjs/rpc/tracing.js +1 -0
  74. package/lib/cjs/rpc/tracing.js.map +1 -1
  75. package/lib/cjs/rpc/web/logging.d.ts.map +1 -1
  76. package/lib/cjs/rpc/web/logging.js +1 -0
  77. package/lib/cjs/rpc/web/logging.js.map +1 -1
  78. package/lib/cjs/rpc/web/request.d.ts.map +1 -1
  79. package/lib/cjs/rpc/web/request.js +1 -0
  80. package/lib/cjs/rpc/web/request.js.map +1 -1
  81. package/lib/cjs/rpc/web/response.d.ts.map +1 -1
  82. package/lib/cjs/rpc/web/response.js +1 -0
  83. package/lib/cjs/rpc/web/response.js.map +1 -1
  84. package/lib/cjs/rpc-impl/DevToolsRpcImpl.js.map +1 -1
  85. package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts +1 -1
  86. package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts.map +1 -1
  87. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js +34 -31
  88. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  89. package/lib/cjs/rpc-impl/IModelTileRpcImpl.d.ts.map +1 -1
  90. package/lib/cjs/rpc-impl/IModelTileRpcImpl.js +10 -7
  91. package/lib/cjs/rpc-impl/IModelTileRpcImpl.js.map +1 -1
  92. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js +2 -2
  93. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  94. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  95. package/lib/cjs/rpc-impl/WipRpcImpl.js.map +1 -1
  96. package/lib/cjs/workspace/Workspace.js +2 -2
  97. package/lib/cjs/workspace/Workspace.js.map +1 -1
  98. package/package.json +13 -13
@@ -1 +1 @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C,YAAgC;QAC7E,KAAK,CAAC,2BAA2B,CAAC,YAAY,CAAC,CAAC;QAChD,IAAI,IAAI,CAAC,KAAK;YACZ,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACzC,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACzC,IAAI,IAAI,CAAC,MAAM;YACb,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAC5C,CAAC;CACF;AAtGD,oDAsGC;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,GAApB,4BAAoB,KAApB,4BAAoB,QAcpC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ElementAspects\r\n */\r\n\r\nimport { ChannelRootAspectProps, ElementAspectProps, EntityReferenceSet, ExternalSourceAspectProps, RelatedElement } from \"@itwin/core-common\";\r\nimport { Entity } from \"./Entity\";\r\nimport { IModelDb } from \"./IModelDb\";\r\nimport { ECSqlStatement } from \"./ECSqlStatement\";\r\nimport { DbResult, Id64String } from \"@itwin/core-bentley\";\r\n\r\n/** Argument for the `ElementAspect.onXxx` static methods\r\n * @beta\r\n */\r\nexport interface OnAspectArg {\r\n /** The iModel for the aspect affected by this event. */\r\n iModel: IModelDb;\r\n}\r\n/** Argument for the `ElementAspect.onXxx` static methods that supply the properties of an aspect to be inserted or updated.\r\n * @beta\r\n */\r\nexport interface OnAspectPropsArg extends OnAspectArg {\r\n /** The new properties of the aspect affected by this event. */\r\n props: Readonly<ElementAspectProps>;\r\n}\r\n/** Argument for the `ElementAspect.onXxx` static methods that only supply the Id of the affected aspect.\r\n * @beta\r\n */\r\nexport interface OnAspectIdArg extends OnAspectArg {\r\n /** The Id of the aspect affected by this event */\r\n aspectId: Id64String;\r\n}\r\n\r\n/** An Element Aspect is a class that defines a set of properties that are related to (and owned by) a single element.\r\n * Semantically, an ElementAspect can be considered part of the Element. Thus, an ElementAspect is deleted if its owning Element is deleted.\r\n * BIS Guideline: Subclass ElementUniqueAspect or ElementMultiAspect rather than subclassing ElementAspect directly.\r\n * @public\r\n */\r\nexport class ElementAspect extends Entity {\r\n /** @internal */\r\n public static override get className(): string { return \"ElementAspect\"; }\r\n public element: RelatedElement;\r\n\r\n /** @internal */\r\n constructor(props: ElementAspectProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.element = RelatedElement.fromJSON(props.element)!; // eslint-disable-line @typescript-eslint/no-non-null-assertion\r\n }\r\n\r\n /** @internal */\r\n public override toJSON(): ElementAspectProps {\r\n const val = super.toJSON() as ElementAspectProps;\r\n val.element = this.element;\r\n return val;\r\n }\r\n\r\n /** Called before a new ElementAspect is inserted.\r\n * @note throw an exception to disallow the insert\r\n * @note If you override this method, you must call super.\r\n * @beta\r\n */\r\n protected static onInsert(_arg: OnAspectPropsArg): void { }\r\n\r\n /** Called after a new ElementAspect was inserted.\r\n * @note If you override this method, you must call super.\r\n * @beta\r\n */\r\n protected static onInserted(_arg: OnAspectPropsArg): void { }\r\n\r\n /** Called before an ElementAspect is updated.\r\n * @note throw an exception to disallow the update\r\n * @note If you override this method, you must call super.\r\n * @beta\r\n */\r\n protected static onUpdate(_arg: OnAspectPropsArg): void { }\r\n\r\n /** Called after an ElementAspect was updated.\r\n * @note If you override this method, you must call super.\r\n * @beta\r\n */\r\n protected static onUpdated(_arg: OnAspectPropsArg): void { }\r\n\r\n /** Called before an ElementAspect is deleted.\r\n * @note throw an exception to disallow the delete\r\n * @note If you override this method, you must call super.\r\n * @beta\r\n */\r\n protected static onDelete(_arg: OnAspectIdArg): void { }\r\n\r\n /** Called after an ElementAspect was deleted.\r\n * @note If you override this method, you must call super.\r\n * @beta\r\n */\r\n protected static onDeleted(_arg: OnAspectIdArg): void { }\r\n}\r\n\r\n/** An Element Unique Aspect is an ElementAspect where there can be only zero or one instance of the Element Aspect class per Element.\r\n * @public\r\n */\r\nexport class ElementUniqueAspect extends ElementAspect {\r\n /** @internal */\r\n public static override get className(): string { return \"ElementUniqueAspect\"; }\r\n}\r\n\r\n/** An Element Multi-Aspect is an ElementAspect where there can be **n** instances of the Element Aspect class per Element.\r\n * @public\r\n */\r\nexport class ElementMultiAspect extends ElementAspect {\r\n /** @internal */\r\n public static override get className(): string { return \"ElementMultiAspect\"; }\r\n}\r\n\r\n/** A ChannelRootAspect identifies an Element as the root of a *channel* which is a subset of the overall iModel hierarchy that is independently maintained.\r\n * @note The associated ECClass was added to the BisCore schema in version 1.0.10\r\n * @public\r\n */\r\nexport class ChannelRootAspect extends ElementUniqueAspect {\r\n /** @internal */\r\n public static override get className(): string { return \"ChannelRootAspect\"; }\r\n\r\n /** The owner of the channel */\r\n public owner: string;\r\n\r\n /** @internal */\r\n constructor(props: ChannelRootAspectProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.owner = props.owner;\r\n }\r\n\r\n /** @internal */\r\n public override toJSON(): ChannelRootAspectProps {\r\n const val = super.toJSON() as ChannelRootAspectProps;\r\n val.owner = this.owner;\r\n return val;\r\n }\r\n\r\n /** Insert a ChannelRootAspect on the specified element. */\r\n public static insert(iModel: IModelDb, ownerId: Id64String, ownerDescription: string) {\r\n const props: ChannelRootAspectProps = {\r\n classFullName: ChannelRootAspect.classFullName,\r\n element: { id: ownerId },\r\n owner: ownerDescription,\r\n };\r\n iModel.elements.insertAspect(props);\r\n }\r\n}\r\n\r\n/** An ElementMultiAspect that stores synchronization information for an Element originating from an external source.\r\n * @note The associated ECClass was added to the BisCore schema in version 1.0.2\r\n * @public\r\n */\r\nexport class ExternalSourceAspect extends ElementMultiAspect {\r\n /** @internal */\r\n public static override get className(): string { return \"ExternalSourceAspect\"; }\r\n\r\n /** An element that scopes the combination of `kind` and `identifier` to uniquely identify the object from the external source.\r\n * @note Warning: in a future major release the `scope` property will be optional, since the scope is intended to be potentially invalid.\r\n * all references should treat it as potentially undefined, but we cannot change the type yet since that is a breaking change.\r\n */\r\n public scope: RelatedElement;\r\n /** The identifier of the object in the source repository. */\r\n public identifier: string;\r\n /** The kind of object within the source repository. */\r\n public kind: string;\r\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. */\r\n public checksum?: string;\r\n /** An optional value that is typically a version number or a pseudo version number like last modified time.\r\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.\r\n * If present, this value must be guaranteed to change when any of the source object's content changes.\r\n */\r\n public version?: string;\r\n /** A place where additional JSON properties can be stored. For example, provenance information or properties relating to the synchronization process. */\r\n public jsonProperties?: string;\r\n /** The source of the imported/synchronized object. Should point to an instance of [ExternalSource]($backend). */\r\n public source?: RelatedElement;\r\n\r\n /** @internal */\r\n constructor(props: ExternalSourceAspectProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.scope = RelatedElement.fromJSON(props.scope)!; // eslint-disable-line @typescript-eslint/no-non-null-assertion\r\n this.source = RelatedElement.fromJSON(props.source);\r\n this.identifier = props.identifier;\r\n this.kind = props.kind;\r\n this.checksum = props.checksum;\r\n this.version = props.version;\r\n this.jsonProperties = props.jsonProperties;\r\n }\r\n\r\n /** @deprecated findAllBySource */\r\n public static findBySource(iModelDb: IModelDb, scope: Id64String, kind: string, identifier: string): { elementId?: Id64String, aspectId?: Id64String } {\r\n const sql = `SELECT Element.Id, ECInstanceId FROM ${ExternalSourceAspect.classFullName} WHERE (Scope.Id=:scope AND Kind=:kind AND Identifier=:identifier)`;\r\n let elementId: Id64String | undefined;\r\n let aspectId: Id64String | undefined;\r\n iModelDb.withPreparedStatement(sql, (statement: ECSqlStatement) => {\r\n statement.bindId(\"scope\", scope);\r\n statement.bindString(\"kind\", kind);\r\n statement.bindString(\"identifier\", identifier);\r\n if (DbResult.BE_SQLITE_ROW === statement.step()) {\r\n elementId = statement.getValue(0).getId();\r\n aspectId = statement.getValue(1).getId();\r\n }\r\n });\r\n return { elementId, aspectId };\r\n }\r\n\r\n /** Look up the elements that contain one or more ExternalSourceAspect with the specified Scope, Kind, and Identifier.\r\n * The result of this function is an array of all of the ExternalSourceAspects that were found, each associated with the owning element.\r\n * A given element could have more than one ExternalSourceAspect with the given scope, kind, and identifier.\r\n * Also, many elements could have ExternalSourceAspect with the same scope, kind, and identifier.\r\n * Therefore, the result array could have more than one entry with the same elementId.\r\n * Aspects are never shared. Each aspect has its own unique ECInstanceId.\r\n * @param iModelDb The iModel to query\r\n * @param scope The scope of the ExternalSourceAspects to find\r\n * @param kind The kind of the ExternalSourceAspects to find\r\n * @param identifier The identifier of the ExternalSourceAspects to find\r\n * @returns the query results\r\n */\r\n public static findAllBySource(iModelDb: IModelDb, scope: Id64String, kind: string, identifier: string): Array<{ elementId: Id64String, aspectId: Id64String }> {\r\n const sql = `SELECT Element.Id, ECInstanceId FROM ${ExternalSourceAspect.classFullName} WHERE (Scope.Id=:scope AND Kind=:kind AND Identifier=:identifier)`;\r\n const found: Array<{ elementId: Id64String, aspectId: Id64String }> = [];\r\n iModelDb.withPreparedStatement(sql, (statement: ECSqlStatement) => {\r\n statement.bindId(\"scope\", scope);\r\n statement.bindString(\"kind\", kind);\r\n statement.bindString(\"identifier\", identifier);\r\n while (DbResult.BE_SQLITE_ROW === statement.step()) {\r\n found.push({ elementId: statement.getValue(0).getId(), aspectId: statement.getValue(1).getId() });\r\n }\r\n });\r\n return found;\r\n }\r\n\r\n /** @internal */\r\n public override toJSON(): ExternalSourceAspectProps {\r\n const val = super.toJSON() as ExternalSourceAspectProps;\r\n val.scope = this.scope;\r\n val.source = this.source;\r\n val.identifier = this.identifier;\r\n val.kind = this.kind;\r\n val.checksum = this.checksum;\r\n val.version = this.version;\r\n val.jsonProperties = this.jsonProperties;\r\n return val;\r\n }\r\n\r\n /** @internal */\r\n protected override collectReferenceConcreteIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceConcreteIds(referenceIds);\r\n if (this.scope)\r\n referenceIds.addElement(this.scope.id);\r\n referenceIds.addElement(this.element.id);\r\n if (this.source)\r\n referenceIds.addElement(this.source.id);\r\n }\r\n}\r\n\r\n/** @public */\r\nexport namespace ExternalSourceAspect { // eslint-disable-line no-redeclare\r\n /** Standard values for the `Kind` property of `ExternalSourceAspect`.\r\n * @public\r\n */\r\n export enum Kind {\r\n /** Indicates that the [[ExternalSourceAspect]] is storing [[Element]] provenance */\r\n Element = \"Element\",\r\n /** Indicates that the [[ExternalSourceAspect]] is storing [[Relationship]] provenance */\r\n Relationship = \"Relationship\",\r\n /** Indicates that the [[ExternalSourceAspect]] is storing *scope* provenance\r\n * @see [[ExternalSourceAspect.scope]]\r\n */\r\n Scope = \"Scope\",\r\n }\r\n}\r\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;AAwB3D;;;;GAIG;AACH,MAAa,aAAc,SAAQ,eAAM;IAKvC,gBAAgB;IAChB,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;IARD,gBAAgB;IACT,MAAM,KAAc,SAAS,KAAa,OAAO,eAAe,CAAC,CAAC,CAAC;IAS1E,gBAAg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,qCAA6B,CAAA;QAC7B;;WAEG;QACH,uBAAe,CAAA;IACjB,CAAC,EATW,IAAI,GAAJ,yBAAI,KAAJ,yBAAI,QASf;AACH,CAAC,EAdgB,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAcpC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ElementAspects\r\n */\r\n\r\nimport { ChannelRootAspectProps, ElementAspectProps, EntityReferenceSet, ExternalSourceAspectProps, RelatedElement } from \"@itwin/core-common\";\r\nimport { Entity } from \"./Entity\";\r\nimport { IModelDb } from \"./IModelDb\";\r\nimport { ECSqlStatement } from \"./ECSqlStatement\";\r\nimport { DbResult, Id64String } from \"@itwin/core-bentley\";\r\n\r\n/** Argument for the `ElementAspect.onXxx` static methods\r\n * @beta\r\n */\r\nexport interface OnAspectArg {\r\n /** The iModel for the aspect affected by this event. */\r\n iModel: IModelDb;\r\n}\r\n/** Argument for the `ElementAspect.onXxx` static methods that supply the properties of an aspect to be inserted or updated.\r\n * @beta\r\n */\r\nexport interface OnAspectPropsArg extends OnAspectArg {\r\n /** The new properties of the aspect affected by this event. */\r\n props: Readonly<ElementAspectProps>;\r\n}\r\n/** Argument for the `ElementAspect.onXxx` static methods that only supply the Id of the affected aspect.\r\n * @beta\r\n */\r\nexport interface OnAspectIdArg extends OnAspectArg {\r\n /** The Id of the aspect affected by this event */\r\n aspectId: Id64String;\r\n}\r\n\r\n/** An Element Aspect is a class that defines a set of properties that are related to (and owned by) a single element.\r\n * Semantically, an ElementAspect can be considered part of the Element. Thus, an ElementAspect is deleted if its owning Element is deleted.\r\n * BIS Guideline: Subclass ElementUniqueAspect or ElementMultiAspect rather than subclassing ElementAspect directly.\r\n * @public\r\n */\r\nexport class ElementAspect extends Entity {\r\n /** @internal */\r\n public static override get className(): string { return \"ElementAspect\"; }\r\n public element: RelatedElement;\r\n\r\n /** @internal */\r\n constructor(props: ElementAspectProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.element = RelatedElement.fromJSON(props.element)!; // eslint-disable-line @typescript-eslint/no-non-null-assertion\r\n }\r\n\r\n /** @internal */\r\n public override toJSON(): ElementAspectProps {\r\n const val = super.toJSON() as ElementAspectProps;\r\n val.element = this.element;\r\n return val;\r\n }\r\n\r\n /** Called before a new ElementAspect is inserted.\r\n * @note throw an exception to disallow the insert\r\n * @note If you override this method, you must call super.\r\n * @beta\r\n */\r\n protected static onInsert(_arg: OnAspectPropsArg): void { }\r\n\r\n /** Called after a new ElementAspect was inserted.\r\n * @note If you override this method, you must call super.\r\n * @beta\r\n */\r\n protected static onInserted(_arg: OnAspectPropsArg): void { }\r\n\r\n /** Called before an ElementAspect is updated.\r\n * @note throw an exception to disallow the update\r\n * @note If you override this method, you must call super.\r\n * @beta\r\n */\r\n protected static onUpdate(_arg: OnAspectPropsArg): void { }\r\n\r\n /** Called after an ElementAspect was updated.\r\n * @note If you override this method, you must call super.\r\n * @beta\r\n */\r\n protected static onUpdated(_arg: OnAspectPropsArg): void { }\r\n\r\n /** Called before an ElementAspect is deleted.\r\n * @note throw an exception to disallow the delete\r\n * @note If you override this method, you must call super.\r\n * @beta\r\n */\r\n protected static onDelete(_arg: OnAspectIdArg): void { }\r\n\r\n /** Called after an ElementAspect was deleted.\r\n * @note If you override this method, you must call super.\r\n * @beta\r\n */\r\n protected static onDeleted(_arg: OnAspectIdArg): void { }\r\n}\r\n\r\n/** An Element Unique Aspect is an ElementAspect where there can be only zero or one instance of the Element Aspect class per Element.\r\n * @public\r\n */\r\nexport class ElementUniqueAspect extends ElementAspect {\r\n /** @internal */\r\n public static override get className(): string { return \"ElementUniqueAspect\"; }\r\n}\r\n\r\n/** An Element Multi-Aspect is an ElementAspect where there can be **n** instances of the Element Aspect class per Element.\r\n * @public\r\n */\r\nexport class ElementMultiAspect extends ElementAspect {\r\n /** @internal */\r\n public static override get className(): string { return \"ElementMultiAspect\"; }\r\n}\r\n\r\n/** A ChannelRootAspect identifies an Element as the root of a *channel* which is a subset of the overall iModel hierarchy that is independently maintained.\r\n * @note The associated ECClass was added to the BisCore schema in version 1.0.10\r\n * @public\r\n */\r\nexport class ChannelRootAspect extends ElementUniqueAspect {\r\n /** @internal */\r\n public static override get className(): string { return \"ChannelRootAspect\"; }\r\n\r\n /** The owner of the channel */\r\n public owner: string;\r\n\r\n /** @internal */\r\n constructor(props: ChannelRootAspectProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.owner = props.owner;\r\n }\r\n\r\n /** @internal */\r\n public override toJSON(): ChannelRootAspectProps {\r\n const val = super.toJSON() as ChannelRootAspectProps;\r\n val.owner = this.owner;\r\n return val;\r\n }\r\n\r\n /** Insert a ChannelRootAspect on the specified element. */\r\n public static insert(iModel: IModelDb, ownerId: Id64String, ownerDescription: string) {\r\n const props: ChannelRootAspectProps = {\r\n classFullName: ChannelRootAspect.classFullName,\r\n element: { id: ownerId },\r\n owner: ownerDescription,\r\n };\r\n iModel.elements.insertAspect(props);\r\n }\r\n}\r\n\r\n/** An ElementMultiAspect that stores synchronization information for an Element originating from an external source.\r\n * @note The associated ECClass was added to the BisCore schema in version 1.0.2\r\n * @public\r\n */\r\nexport class ExternalSourceAspect extends ElementMultiAspect {\r\n /** @internal */\r\n public static override get className(): string { return \"ExternalSourceAspect\"; }\r\n\r\n /** An element that scopes the combination of `kind` and `identifier` to uniquely identify the object from the external source.\r\n * @note Warning: in a future major release the `scope` property will be optional, since the scope is intended to be potentially invalid.\r\n * all references should treat it as potentially undefined, but we cannot change the type yet since that is a breaking change.\r\n */\r\n public scope: RelatedElement;\r\n /** The identifier of the object in the source repository. */\r\n public identifier: string;\r\n /** The kind of object within the source repository. */\r\n public kind: string;\r\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. */\r\n public checksum?: string;\r\n /** An optional value that is typically a version number or a pseudo version number like last modified time.\r\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.\r\n * If present, this value must be guaranteed to change when any of the source object's content changes.\r\n */\r\n public version?: string;\r\n /** A place where additional JSON properties can be stored. For example, provenance information or properties relating to the synchronization process.\r\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.\r\n * This will be a breaking change, since application code will have to change from supplying a string to supplying an object.\r\n */\r\n public jsonProperties?: string;\r\n /** The source of the imported/synchronized object. Should point to an instance of [ExternalSource]($backend). */\r\n public source?: RelatedElement;\r\n\r\n /** @internal */\r\n constructor(props: ExternalSourceAspectProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.scope = RelatedElement.fromJSON(props.scope)!; // eslint-disable-line @typescript-eslint/no-non-null-assertion\r\n this.source = RelatedElement.fromJSON(props.source);\r\n this.identifier = props.identifier;\r\n this.kind = props.kind;\r\n this.checksum = props.checksum;\r\n this.version = props.version;\r\n this.jsonProperties = props.jsonProperties;\r\n }\r\n\r\n /** @deprecated in 3.x. findAllBySource */\r\n public static findBySource(iModelDb: IModelDb, scope: Id64String, kind: string, identifier: string): { elementId?: Id64String, aspectId?: Id64String } {\r\n const sql = `SELECT Element.Id, ECInstanceId FROM ${ExternalSourceAspect.classFullName} WHERE (Scope.Id=:scope AND Kind=:kind AND Identifier=:identifier)`;\r\n let elementId: Id64String | undefined;\r\n let aspectId: Id64String | undefined;\r\n iModelDb.withPreparedStatement(sql, (statement: ECSqlStatement) => {\r\n statement.bindId(\"scope\", scope);\r\n statement.bindString(\"kind\", kind);\r\n statement.bindString(\"identifier\", identifier);\r\n if (DbResult.BE_SQLITE_ROW === statement.step()) {\r\n elementId = statement.getValue(0).getId();\r\n aspectId = statement.getValue(1).getId();\r\n }\r\n });\r\n return { elementId, aspectId };\r\n }\r\n\r\n /** Look up the elements that contain one or more ExternalSourceAspect with the specified Scope, Kind, and Identifier.\r\n * The result of this function is an array of all of the ExternalSourceAspects that were found, each associated with the owning element.\r\n * A given element could have more than one ExternalSourceAspect with the given scope, kind, and identifier.\r\n * Also, many elements could have ExternalSourceAspect with the same scope, kind, and identifier.\r\n * Therefore, the result array could have more than one entry with the same elementId.\r\n * Aspects are never shared. Each aspect has its own unique ECInstanceId.\r\n * @param iModelDb The iModel to query\r\n * @param scope The scope of the ExternalSourceAspects to find\r\n * @param kind The kind of the ExternalSourceAspects to find\r\n * @param identifier The identifier of the ExternalSourceAspects to find\r\n * @returns the query results\r\n */\r\n public static findAllBySource(iModelDb: IModelDb, scope: Id64String, kind: string, identifier: string): Array<{ elementId: Id64String, aspectId: Id64String }> {\r\n const sql = `SELECT Element.Id, ECInstanceId FROM ${ExternalSourceAspect.classFullName} WHERE (Scope.Id=:scope AND Kind=:kind AND Identifier=:identifier)`;\r\n const found: Array<{ elementId: Id64String, aspectId: Id64String }> = [];\r\n iModelDb.withPreparedStatement(sql, (statement: ECSqlStatement) => {\r\n statement.bindId(\"scope\", scope);\r\n statement.bindString(\"kind\", kind);\r\n statement.bindString(\"identifier\", identifier);\r\n while (DbResult.BE_SQLITE_ROW === statement.step()) {\r\n found.push({ elementId: statement.getValue(0).getId(), aspectId: statement.getValue(1).getId() });\r\n }\r\n });\r\n return found;\r\n }\r\n\r\n /** @internal */\r\n public override toJSON(): ExternalSourceAspectProps {\r\n const val = super.toJSON() as ExternalSourceAspectProps;\r\n val.scope = this.scope;\r\n val.source = this.source;\r\n val.identifier = this.identifier;\r\n val.kind = this.kind;\r\n val.checksum = this.checksum;\r\n val.version = this.version;\r\n val.jsonProperties = this.jsonProperties;\r\n return val;\r\n }\r\n\r\n /** @internal */\r\n protected override collectReferenceConcreteIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceConcreteIds(referenceIds);\r\n if (this.scope)\r\n referenceIds.addElement(this.scope.id);\r\n referenceIds.addElement(this.element.id);\r\n if (this.source)\r\n referenceIds.addElement(this.source.id);\r\n }\r\n}\r\n\r\n/** @public */\r\nexport namespace ExternalSourceAspect { // eslint-disable-line no-redeclare\r\n /** Standard values for the `Kind` property of `ExternalSourceAspect`.\r\n * @public\r\n */\r\n export enum Kind {\r\n /** Indicates that the [[ExternalSourceAspect]] is storing [[Element]] provenance */\r\n Element = \"Element\",\r\n /** Indicates that the [[ExternalSourceAspect]] is storing [[Relationship]] provenance */\r\n Relationship = \"Relationship\",\r\n /** Indicates that the [[ExternalSourceAspect]] is storing *scope* provenance\r\n * @see [[ExternalSourceAspect.scope]]\r\n */\r\n Scope = \"Scope\",\r\n }\r\n}\r\n"]}
@@ -2,8 +2,8 @@
2
2
  * @module iModels
3
3
  */
4
4
  import { IModelElementCloneContext } from "./IModelElementCloneContext";
5
- /** @deprecated use [[IModelElementCloneContext]] instead, @beta */
5
+ /** @deprecated in 3.x. use [[IModelElementCloneContext]] instead, @beta */
6
6
  export declare const IModelCloneContext: typeof IModelElementCloneContext;
7
- /** @deprecated use [[IModelElementCloneContext]] instead, @beta */
7
+ /** @deprecated in 3.x. use [[IModelElementCloneContext]] instead, @beta */
8
8
  export declare type IModelCloneContext = IModelElementCloneContext;
9
9
  //# sourceMappingURL=IModelCloneContext.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IModelCloneContext.d.ts","sourceRoot":"","sources":["../../src/IModelCloneContext.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAIxE,mEAAmE;AAEnE,eAAO,MAAM,kBAAkB,kCAA4B,CAAC;AAC5D,mEAAmE;AAEnE,oBAAY,kBAAkB,GAAG,yBAAyB,CAAC"}
1
+ {"version":3,"file":"IModelCloneContext.d.ts","sourceRoot":"","sources":["../../src/IModelCloneContext.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAIxE,2EAA2E;AAE3E,eAAO,MAAM,kBAAkB,kCAA4B,CAAC;AAC5D,2EAA2E;AAE3E,oBAAY,kBAAkB,GAAG,yBAAyB,CAAC"}
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.IModelCloneContext = void 0;
11
11
  const IModelElementCloneContext_1 = require("./IModelElementCloneContext");
12
12
  // re-export both the type and the value of the class, and deprecate both
13
- /** @deprecated use [[IModelElementCloneContext]] instead, @beta */
13
+ /** @deprecated in 3.x. use [[IModelElementCloneContext]] instead, @beta */
14
14
  // eslint-disable-next-line @typescript-eslint/naming-convention
15
15
  exports.IModelCloneContext = IModelElementCloneContext_1.IModelElementCloneContext;
16
16
  //# sourceMappingURL=IModelCloneContext.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IModelCloneContext.js","sourceRoot":"","sources":["../../src/IModelCloneContext.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,2EAAwE;AAExE,yEAAyE;AAEzE,mEAAmE;AACnE,gEAAgE;AACnD,QAAA,kBAAkB,GAAG,qDAAyB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module iModels\r\n */\r\n\r\nimport { IModelElementCloneContext } from \"./IModelElementCloneContext\";\r\n\r\n// re-export both the type and the value of the class, and deprecate both\r\n\r\n/** @deprecated use [[IModelElementCloneContext]] instead, @beta */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport const IModelCloneContext = IModelElementCloneContext;\r\n/** @deprecated use [[IModelElementCloneContext]] instead, @beta */\r\n// eslint-disable-next-line @typescript-eslint/no-redeclare\r\nexport type IModelCloneContext = IModelElementCloneContext;\r\n"]}
1
+ {"version":3,"file":"IModelCloneContext.js","sourceRoot":"","sources":["../../src/IModelCloneContext.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,2EAAwE;AAExE,yEAAyE;AAEzE,2EAA2E;AAC3E,gEAAgE;AACnD,QAAA,kBAAkB,GAAG,qDAAyB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module iModels\r\n */\r\n\r\nimport { IModelElementCloneContext } from \"./IModelElementCloneContext\";\r\n\r\n// re-export both the type and the value of the class, and deprecate both\r\n\r\n/** @deprecated in 3.x. use [[IModelElementCloneContext]] instead, @beta */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport const IModelCloneContext = IModelElementCloneContext;\r\n/** @deprecated in 3.x. use [[IModelElementCloneContext]] instead, @beta */\r\n// eslint-disable-next-line @typescript-eslint/no-redeclare\r\nexport type IModelCloneContext = IModelElementCloneContext;\r\n"]}
@@ -23,6 +23,7 @@ import { TxnManager } from "./TxnManager";
23
23
  import { ViewDefinition } from "./ViewDefinition";
24
24
  import { SettingDictionary } from "./workspace/Settings";
25
25
  import { Workspace } from "./workspace/Workspace";
26
+ import { ECSchemaXmlContext } from "./ECSchemaXmlContext";
26
27
  /** Options for [[IModelDb.Models.updateModel]]
27
28
  * @note To mark *only* the geometry as changed, use [[IModelDb.Models.updateGeometryGuid]] instead.
28
29
  * @public
@@ -110,6 +111,18 @@ export interface LockControl {
110
111
  */
111
112
  releaseAllLocks(): Promise<void>;
112
113
  }
114
+ /**
115
+ * Options for the importing of schemas
116
+ * @public
117
+ */
118
+ export interface SchemaImportOptions {
119
+ /**
120
+ * An [[ECSchemaXmlContext]] to use instead of building a default one.
121
+ * This can be useful in rare cases where custom schema location logic is necessary
122
+ * @internal
123
+ */
124
+ ecSchemaXmlContext?: ECSchemaXmlContext;
125
+ }
113
126
  /** @internal */
114
127
  export declare enum BriefcaseLocalValue {
115
128
  StandaloneEdit = "StandaloneEdit",
@@ -394,6 +407,15 @@ export declare abstract class IModelDb extends IModel {
394
407
  saveChanges(description?: string): void;
395
408
  /** Abandon pending changes in this iModel. */
396
409
  abandonChanges(): void;
410
+ /**
411
+ * Save all changes and perform a [checkpoint](https://www.sqlite.org/c3ref/wal_checkpoint_v2.html) on this IModelDb.
412
+ * This ensures that all changes to the database since it was opened are saved to its file and the WAL file is truncated.
413
+ * @note Checkpoint automatically happens when IModelDbs are closed. However, the checkpoint
414
+ * operation itself can take some time. It may be useful to call this method prior to closing so that the checkpoint "penalty" is paid earlier.
415
+ * @note Another use for this function is to permit the file to be copied while it is open for write. iModel files should
416
+ * rarely be copied, and even less so while they're opened. But this scenario is sometimes encountered for tests.
417
+ */
418
+ performCheckpoint(): void;
397
419
  /** @internal */
398
420
  reverseTxns(numOperations: number): IModelStatus;
399
421
  /** @internal */
@@ -404,11 +426,12 @@ export declare abstract class IModelDb extends IModel {
404
426
  * This method is asynchronous (must be awaited) because, in the case where this IModelDb is a briefcase, this method first obtains the schema lock from the iModel server.
405
427
  * You must import a schema into an iModel before you can insert instances of the classes in that schema. See [[Element]]
406
428
  * @param schemaFileName array of Full paths to ECSchema.xml files to be imported.
429
+ * @param {SchemaImportOptions} options - options during schema import.
407
430
  * @throws [[IModelError]] if the schema lock cannot be obtained or there is a problem importing the schema.
408
431
  * @note Changes are saved if importSchemas is successful and abandoned if not successful.
409
432
  * @see querySchemaVersion
410
433
  */
411
- importSchemas(schemaFileNames: LocalFileName[]): Promise<void>;
434
+ importSchemas(schemaFileNames: LocalFileName[], options?: SchemaImportOptions): Promise<void>;
412
435
  /** Import ECSchema(s) serialized to XML. On success, the schema definition is stored in the iModel.
413
436
  * This method is asynchronous (must be awaited) because, in the case where this IModelDb is a briefcase, this method first obtains the schema lock from the iModel server.
414
437
  * You must import a schema into an iModel before you can insert instances of the classes in that schema. See [[Element]]
@@ -820,6 +843,10 @@ export declare namespace IModelDb {
820
843
  * @param elProps The properties of the new element.
821
844
  * @returns The newly inserted element's Id.
822
845
  * @throws [[IModelError]] if unable to insert the element.
846
+ * @note For convenience, the value of `elProps.id` is updated to reflect the resultant element's id.
847
+ * However when `elProps.federationGuid` is not present or undefined, a new Guid will be generated and stored on the resultant element. But
848
+ * the value of `elProps.federationGuid` is *not* updated. Generally, it is best to re-read the element after inserting (e.g. via [[getElementProps]])
849
+ * if you intend to continue working with it. That will ensure its values reflect the persistent state.
823
850
  */
824
851
  insertElement(elProps: ElementProps): Id64String;
825
852
  /** Update some properties of an existing element.
@@ -929,7 +956,7 @@ export declare namespace IModelDb {
929
956
  */
930
957
  iterateViews(params: ViewQueryParams, callback: (view: ViewDefinition) => boolean): boolean;
931
958
  private loadViewStateProps;
932
- /** @deprecated use [[getViewStateProps]]. */
959
+ /** @deprecated in 3.x. use [[getViewStateProps]]. */
933
960
  getViewStateData(viewDefinitionId: string, options?: ViewStateLoadProps): ViewStateProps;
934
961
  /** Obtain a [ViewStateProps]($common) for a [[ViewDefinition]] specified by element Id. */
935
962
  getViewStateProps(viewDefinitionId: string, options?: ViewStateLoadProps): Promise<ViewStateProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"IModelDb.d.ts","sourceRoot":"","sources":["../../src/IModelDb.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EACL,WAAW,EAAU,OAAO,EAAkC,QAAQ,EAAQ,UAAU,EAAQ,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EACvI,YAAY,EAAqB,QAAQ,EAC1C,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,gBAAgB,EAAE,kBAAkB,EAAE,WAAW,EAA2C,oBAAoB,EAAuB,IAAI,EAC3I,SAAS,EAAE,QAAQ,EAAE,8BAA8B,EAAE,gCAAgC,EAAE,yBAAyB,EACjG,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,2BAA2B,EAAE,gBAAgB,EAAE,YA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AAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,YAAY;CAgBrI"}
@@ -581,6 +581,20 @@ class IModelDb extends core_common_1.IModel {
581
581
  abandonChanges() {
582
582
  this.nativeDb.abandonChanges();
583
583
  }
584
+ /**
585
+ * Save all changes and perform a [checkpoint](https://www.sqlite.org/c3ref/wal_checkpoint_v2.html) on this IModelDb.
586
+ * This ensures that all changes to the database since it was opened are saved to its file and the WAL file is truncated.
587
+ * @note Checkpoint automatically happens when IModelDbs are closed. However, the checkpoint
588
+ * operation itself can take some time. It may be useful to call this method prior to closing so that the checkpoint "penalty" is paid earlier.
589
+ * @note Another use for this function is to permit the file to be copied while it is open for write. iModel files should
590
+ * rarely be copied, and even less so while they're opened. But this scenario is sometimes encountered for tests.
591
+ */
592
+ performCheckpoint() {
593
+ if (!this.isReadonly) {
594
+ this.saveChanges();
595
+ this.nativeDb.performCheckpoint();
596
+ }
597
+ }
584
598
  /** @internal */
585
599
  reverseTxns(numOperations) {
586
600
  return this.nativeDb.reverseTxns(numOperations);
@@ -597,20 +611,21 @@ class IModelDb extends core_common_1.IModel {
597
611
  * This method is asynchronous (must be awaited) because, in the case where this IModelDb is a briefcase, this method first obtains the schema lock from the iModel server.
598
612
  * You must import a schema into an iModel before you can insert instances of the classes in that schema. See [[Element]]
599
613
  * @param schemaFileName array of Full paths to ECSchema.xml files to be imported.
614
+ * @param {SchemaImportOptions} options - options during schema import.
600
615
  * @throws [[IModelError]] if the schema lock cannot be obtained or there is a problem importing the schema.
601
616
  * @note Changes are saved if importSchemas is successful and abandoned if not successful.
602
617
  * @see querySchemaVersion
603
618
  */
604
- async importSchemas(schemaFileNames) {
605
- if (this.isSnapshot || this.isStandalone) {
606
- const status = this.nativeDb.importSchemas(schemaFileNames);
607
- if (core_bentley_1.DbResult.BE_SQLITE_OK !== status)
608
- throw new core_common_1.IModelError(status, "Error importing schema");
609
- this.clearCaches();
610
- return;
611
- }
612
- await this.acquireSchemaLock();
613
- const stat = this.nativeDb.importSchemas(schemaFileNames);
619
+ async importSchemas(schemaFileNames, options) {
620
+ var _a;
621
+ if (this.nativeDb.getITwinId() !== core_bentley_1.Guid.empty) // if this iModel is associated with an iTwin, importing schema requires the schema lock
622
+ await this.acquireSchemaLock();
623
+ const maybeCustomNativeContext = (_a = options === null || options === void 0 ? void 0 : options.ecSchemaXmlContext) === null || _a === void 0 ? void 0 : _a.nativeContext;
624
+ const nativeImportOptions = {
625
+ schemaLockHeld: true,
626
+ ecSchemaXmlContext: maybeCustomNativeContext,
627
+ };
628
+ const stat = this.nativeDb.importSchemas(schemaFileNames, nativeImportOptions);
614
629
  if (core_bentley_1.DbResult.BE_SQLITE_OK !== stat) {
615
630
  throw new core_common_1.IModelError(stat, "Error importing schema");
616
631
  }
@@ -626,16 +641,9 @@ class IModelDb extends core_common_1.IModel {
626
641
  * @alpha
627
642
  */
628
643
  async importSchemaStrings(serializedXmlSchemas) {
629
- if (this.isSnapshot || this.isStandalone) {
630
- const status = this.nativeDb.importXmlSchemas(serializedXmlSchemas);
631
- if (core_bentley_1.DbResult.BE_SQLITE_OK !== status) {
632
- throw new core_common_1.IModelError(status, "Error importing schema");
633
- }
634
- this.clearCaches();
635
- return;
636
- }
637
- await this.acquireSchemaLock();
638
- const stat = this.nativeDb.importXmlSchemas(serializedXmlSchemas);
644
+ if (this.iTwinId && this.iTwinId !== core_bentley_1.Guid.empty) // if this iModel is associated with an iTwin, importing schema requires the schema lock
645
+ await this.acquireSchemaLock();
646
+ const stat = this.nativeDb.importXmlSchemas(serializedXmlSchemas, { schemaLockHeld: true });
639
647
  if (core_bentley_1.DbResult.BE_SQLITE_OK !== stat)
640
648
  throw new core_common_1.IModelError(stat, "Error importing schema");
641
649
  this.clearCaches();
@@ -755,7 +763,7 @@ class IModelDb extends core_common_1.IModel {
755
763
  }
756
764
  /** @internal */
757
765
  insertCodeSpec(codeSpec) {
758
- return this.nativeDb.insertCodeSpec(codeSpec.name, codeSpec.properties);
766
+ return this.nativeDb.insertCodeSpec(codeSpec.name, codeSpec.properties); // TODO: Remove "as any" when NativeLibrary.ts is updated so "spec" isn't marked as required
759
767
  }
760
768
  /** Prepare an ECSQL statement.
761
769
  * @param sql The ECSQL statement to prepare
@@ -1441,6 +1449,10 @@ IModelDb._settingPropNamespace = "settings";
1441
1449
  * @param elProps The properties of the new element.
1442
1450
  * @returns The newly inserted element's Id.
1443
1451
  * @throws [[IModelError]] if unable to insert the element.
1452
+ * @note For convenience, the value of `elProps.id` is updated to reflect the resultant element's id.
1453
+ * However when `elProps.federationGuid` is not present or undefined, a new Guid will be generated and stored on the resultant element. But
1454
+ * the value of `elProps.federationGuid` is *not* updated. Generally, it is best to re-read the element after inserting (e.g. via [[getElementProps]])
1455
+ * if you intend to continue working with it. That will ensure its values reflect the persistent state.
1444
1456
  */
1445
1457
  insertElement(elProps) {
1446
1458
  try {
@@ -1812,7 +1824,7 @@ IModelDb._settingPropNamespace = "settings";
1812
1824
  }
1813
1825
  return viewStateData;
1814
1826
  }
1815
- /** @deprecated use [[getViewStateProps]]. */
1827
+ /** @deprecated in 3.x. use [[getViewStateProps]]. */
1816
1828
  getViewStateData(viewDefinitionId, options) {
1817
1829
  const view = this._iModel.elements.getElement(viewDefinitionId);
1818
1830
  let drawingExtents;
@@ -2023,8 +2035,8 @@ class BriefcaseDb extends IModelDb {
2023
2035
  // good thing computers are fast. Fortunately upgrading should be rare (and the push time will dominate anyway.) Don't try to optimize any of this away.
2024
2036
  await withBriefcaseDb(briefcase, async (db) => db.acquireSchemaLock()); // may not really acquire lock if iModel uses "noLocks" mode.
2025
2037
  try {
2026
- await this.doUpgrade(briefcase, { profile: core_common_1.ProfileOptions.Upgrade }, "Upgraded profile");
2027
- await this.doUpgrade(briefcase, { domain: core_common_1.DomainOptions.Upgrade }, "Upgraded domain schemas");
2038
+ await this.doUpgrade(briefcase, { profile: core_common_1.ProfileOptions.Upgrade, schemaLockHeld: true }, "Upgraded profile");
2039
+ await this.doUpgrade(briefcase, { domain: core_common_1.DomainOptions.Upgrade, schemaLockHeld: true }, "Upgraded domain schemas");
2028
2040
  }
2029
2041
  finally {
2030
2042
  await withBriefcaseDb(briefcase, async (db) => db.locks.releaseAllLocks());
@@ -2201,6 +2213,7 @@ class SnapshotDb extends IModelDb {
2201
2213
  * @see [Snapshot iModels]($docs/learning/backend/AccessingIModels.md#snapshot-imodels)
2202
2214
  */
2203
2215
  static createFrom(iModelDb, snapshotFile, options) {
2216
+ iModelDb.performCheckpoint();
2204
2217
  IModelJsFs_1.IModelJsFs.copySync(iModelDb.pathName, snapshotFile);
2205
2218
  const nativeDb = new IModelHost_1.IModelHost.platform.DgnDb();
2206
2219
  nativeDb.openIModel(snapshotFile, core_bentley_1.OpenMode.ReadWrite, undefined, options);
@@ -2212,7 +2225,6 @@ class SnapshotDb extends IModelDb {
2212
2225
  nativeDb.saveChanges();
2213
2226
  nativeDb.deleteAllTxns();
2214
2227
  nativeDb.resetBriefcaseId(core_common_1.BriefcaseIdValue.Unassigned);
2215
- nativeDb.saveChanges();
2216
2228
  const snapshotDb = new SnapshotDb(nativeDb, core_bentley_1.Guid.createValue());
2217
2229
  if (options === null || options === void 0 ? void 0 : options.createClassViews)
2218
2230
  snapshotDb._createClassViewsOnClose = true; // save flag that will be checked when close() is called
@@ -2266,7 +2278,7 @@ class SnapshotDb extends IModelDb {
2266
2278
  const snapshot = SnapshotDb.openFile(dbName, { key, tempFileBase, container });
2267
2279
  snapshot._iTwinId = checkpoint.iTwinId;
2268
2280
  try {
2269
- CheckpointManager_1.CheckpointManager.validateCheckpointGuids(checkpoint, snapshot.nativeDb);
2281
+ CheckpointManager_1.CheckpointManager.validateCheckpointGuids(checkpoint, snapshot);
2270
2282
  }
2271
2283
  catch (err) {
2272
2284
  snapshot.close();
@@ -2344,9 +2356,9 @@ class StandaloneDb extends BriefcaseDb {
2344
2356
  * @see [[StandaloneDb.validateSchemas]]
2345
2357
  */
2346
2358
  static upgradeStandaloneSchemas(filePath) {
2347
- let nativeDb = this.openDgnDb({ path: filePath }, core_bentley_1.OpenMode.ReadWrite, { profile: core_common_1.ProfileOptions.Upgrade });
2359
+ let nativeDb = this.openDgnDb({ path: filePath }, core_bentley_1.OpenMode.ReadWrite, { profile: core_common_1.ProfileOptions.Upgrade, schemaLockHeld: true });
2348
2360
  nativeDb.closeIModel();
2349
- nativeDb = this.openDgnDb({ path: filePath }, core_bentley_1.OpenMode.ReadWrite, { domain: core_common_1.DomainOptions.Upgrade });
2361
+ nativeDb = this.openDgnDb({ path: filePath }, core_bentley_1.OpenMode.ReadWrite, { domain: core_common_1.DomainOptions.Upgrade, schemaLockHeld: true });
2350
2362
  nativeDb.closeIModel();
2351
2363
  }
2352
2364
  /** Open a standalone iModel file.