@itwin/core-backend 5.1.0-dev.5 → 5.1.0-dev.52

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 (312) hide show
  1. package/CHANGELOG.md +122 -1
  2. package/lib/cjs/BackendHubAccess.d.ts +1 -1
  3. package/lib/cjs/BackendHubAccess.js +1 -1
  4. package/lib/cjs/BackendHubAccess.js.map +1 -1
  5. package/lib/cjs/BisCoreSchema.js +1 -1
  6. package/lib/cjs/BisCoreSchema.js.map +1 -1
  7. package/lib/cjs/BriefcaseManager.d.ts +10 -2
  8. package/lib/cjs/BriefcaseManager.d.ts.map +1 -1
  9. package/lib/cjs/BriefcaseManager.js +16 -0
  10. package/lib/cjs/BriefcaseManager.js.map +1 -1
  11. package/lib/cjs/Category.d.ts +4 -4
  12. package/lib/cjs/Category.js +4 -4
  13. package/lib/cjs/Category.js.map +1 -1
  14. package/lib/cjs/ChangesetECAdaptor.d.ts +67 -8
  15. package/lib/cjs/ChangesetECAdaptor.d.ts.map +1 -1
  16. package/lib/cjs/ChangesetECAdaptor.js +248 -33
  17. package/lib/cjs/ChangesetECAdaptor.js.map +1 -1
  18. package/lib/cjs/ClassRegistry.d.ts +1 -1
  19. package/lib/cjs/ClassRegistry.js +1 -1
  20. package/lib/cjs/ClassRegistry.js.map +1 -1
  21. package/lib/cjs/CloudSqlite.js +1 -1
  22. package/lib/cjs/CloudSqlite.js.map +1 -1
  23. package/lib/cjs/CodeSpecs.d.ts +1 -1
  24. package/lib/cjs/CodeSpecs.js +1 -1
  25. package/lib/cjs/CodeSpecs.js.map +1 -1
  26. package/lib/cjs/DisplayStyle.d.ts +4 -4
  27. package/lib/cjs/DisplayStyle.js +3 -3
  28. package/lib/cjs/DisplayStyle.js.map +1 -1
  29. package/lib/cjs/ECDb.d.ts +4 -4
  30. package/lib/cjs/ECDb.d.ts.map +1 -1
  31. package/lib/cjs/ECDb.js +4 -4
  32. package/lib/cjs/ECDb.js.map +1 -1
  33. package/lib/cjs/ECSqlStatement.d.ts +15 -6
  34. package/lib/cjs/ECSqlStatement.d.ts.map +1 -1
  35. package/lib/cjs/ECSqlStatement.js +18 -4
  36. package/lib/cjs/ECSqlStatement.js.map +1 -1
  37. package/lib/cjs/Element.d.ts +51 -51
  38. package/lib/cjs/Element.js +52 -52
  39. package/lib/cjs/Element.js.map +1 -1
  40. package/lib/cjs/ElementAspect.d.ts +8 -8
  41. package/lib/cjs/ElementAspect.d.ts.map +1 -1
  42. package/lib/cjs/ElementAspect.js +8 -8
  43. package/lib/cjs/ElementAspect.js.map +1 -1
  44. package/lib/cjs/Entity.d.ts +3 -3
  45. package/lib/cjs/Entity.js +2 -2
  46. package/lib/cjs/Entity.js.map +1 -1
  47. package/lib/cjs/ExportGraphics.d.ts +54 -8
  48. package/lib/cjs/ExportGraphics.d.ts.map +1 -1
  49. package/lib/cjs/ExportGraphics.js +158 -59
  50. package/lib/cjs/ExportGraphics.js.map +1 -1
  51. package/lib/cjs/GeographicCRSServices.d.ts +6 -2
  52. package/lib/cjs/GeographicCRSServices.d.ts.map +1 -1
  53. package/lib/cjs/GeographicCRSServices.js +1 -1
  54. package/lib/cjs/GeographicCRSServices.js.map +1 -1
  55. package/lib/cjs/IModelDb.d.ts +29 -23
  56. package/lib/cjs/IModelDb.d.ts.map +1 -1
  57. package/lib/cjs/IModelDb.js +106 -43
  58. package/lib/cjs/IModelDb.js.map +1 -1
  59. package/lib/cjs/IModelElementCloneContext.d.ts +1 -1
  60. package/lib/cjs/IModelElementCloneContext.d.ts.map +1 -1
  61. package/lib/cjs/IModelElementCloneContext.js +1 -1
  62. package/lib/cjs/IModelElementCloneContext.js.map +1 -1
  63. package/lib/cjs/IModelHost.d.ts +2 -3
  64. package/lib/cjs/IModelHost.d.ts.map +1 -1
  65. package/lib/cjs/IModelHost.js +2 -3
  66. package/lib/cjs/IModelHost.js.map +1 -1
  67. package/lib/cjs/Material.d.ts +1 -1
  68. package/lib/cjs/Material.js +1 -1
  69. package/lib/cjs/Material.js.map +1 -1
  70. package/lib/cjs/Model.d.ts +22 -22
  71. package/lib/cjs/Model.js +22 -22
  72. package/lib/cjs/Model.js.map +1 -1
  73. package/lib/cjs/SQLiteDb.d.ts +1 -1
  74. package/lib/cjs/SQLiteDb.js +1 -1
  75. package/lib/cjs/SQLiteDb.js.map +1 -1
  76. package/lib/cjs/SqliteStatement.d.ts +1 -1
  77. package/lib/cjs/SqliteStatement.d.ts.map +1 -1
  78. package/lib/cjs/SqliteStatement.js +1 -1
  79. package/lib/cjs/SqliteStatement.js.map +1 -1
  80. package/lib/cjs/Texture.d.ts +1 -1
  81. package/lib/cjs/Texture.js +1 -1
  82. package/lib/cjs/Texture.js.map +1 -1
  83. package/lib/cjs/TxnManager.d.ts +4 -4
  84. package/lib/cjs/TxnManager.js +1 -1
  85. package/lib/cjs/TxnManager.js.map +1 -1
  86. package/lib/cjs/ViewDefinition.d.ts +40 -14
  87. package/lib/cjs/ViewDefinition.d.ts.map +1 -1
  88. package/lib/cjs/ViewDefinition.js +42 -14
  89. package/lib/cjs/ViewDefinition.js.map +1 -1
  90. package/lib/cjs/annotations/FrameGeometry.d.ts +52 -0
  91. package/lib/cjs/annotations/FrameGeometry.d.ts.map +1 -0
  92. package/lib/cjs/annotations/FrameGeometry.js +250 -0
  93. package/lib/cjs/annotations/FrameGeometry.js.map +1 -0
  94. package/lib/cjs/{TextAnnotationElement.d.ts → annotations/TextAnnotationElement.d.ts} +6 -11
  95. package/lib/cjs/annotations/TextAnnotationElement.d.ts.map +1 -0
  96. package/lib/cjs/{TextAnnotationElement.js → annotations/TextAnnotationElement.js} +20 -26
  97. package/lib/cjs/annotations/TextAnnotationElement.js.map +1 -0
  98. package/lib/cjs/annotations/TextAnnotationGeometry.d.ts +31 -0
  99. package/lib/cjs/annotations/TextAnnotationGeometry.d.ts.map +1 -0
  100. package/lib/cjs/annotations/TextAnnotationGeometry.js +132 -0
  101. package/lib/cjs/annotations/TextAnnotationGeometry.js.map +1 -0
  102. package/lib/cjs/annotations/TextBlockGeometry.d.ts +16 -0
  103. package/lib/cjs/annotations/TextBlockGeometry.d.ts.map +1 -0
  104. package/lib/cjs/{TextAnnotationGeometry.js → annotations/TextBlockGeometry.js} +13 -69
  105. package/lib/cjs/annotations/TextBlockGeometry.js.map +1 -0
  106. package/lib/cjs/{TextAnnotationLayout.d.ts → annotations/TextBlockLayout.d.ts} +22 -8
  107. package/lib/cjs/annotations/TextBlockLayout.d.ts.map +1 -0
  108. package/lib/cjs/{TextAnnotationLayout.js → annotations/TextBlockLayout.js} +51 -9
  109. package/lib/cjs/annotations/TextBlockLayout.js.map +1 -0
  110. package/lib/cjs/core-backend.d.ts +5 -3
  111. package/lib/cjs/core-backend.d.ts.map +1 -1
  112. package/lib/cjs/core-backend.js +25 -6
  113. package/lib/cjs/core-backend.js.map +1 -1
  114. package/lib/cjs/internal/ElementLRUCache.d.ts +23 -0
  115. package/lib/cjs/internal/ElementLRUCache.d.ts.map +1 -1
  116. package/lib/cjs/internal/ElementLRUCache.js +167 -3
  117. package/lib/cjs/internal/ElementLRUCache.js.map +1 -1
  118. package/lib/cjs/internal/Symbols.d.ts +1 -0
  119. package/lib/cjs/internal/Symbols.d.ts.map +1 -1
  120. package/lib/cjs/internal/Symbols.js +2 -1
  121. package/lib/cjs/internal/Symbols.js.map +1 -1
  122. package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts +1 -1
  123. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js +1 -1
  124. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  125. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.d.ts +2 -2
  126. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  127. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.d.ts +1 -1
  128. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js +1 -1
  129. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  130. package/lib/esm/BackendHubAccess.d.ts +1 -1
  131. package/lib/esm/BackendHubAccess.js +1 -1
  132. package/lib/esm/BackendHubAccess.js.map +1 -1
  133. package/lib/esm/BisCoreSchema.js +1 -1
  134. package/lib/esm/BisCoreSchema.js.map +1 -1
  135. package/lib/esm/BriefcaseManager.d.ts +10 -2
  136. package/lib/esm/BriefcaseManager.d.ts.map +1 -1
  137. package/lib/esm/BriefcaseManager.js +17 -1
  138. package/lib/esm/BriefcaseManager.js.map +1 -1
  139. package/lib/esm/Category.d.ts +4 -4
  140. package/lib/esm/Category.js +4 -4
  141. package/lib/esm/Category.js.map +1 -1
  142. package/lib/esm/ChangesetECAdaptor.d.ts +67 -8
  143. package/lib/esm/ChangesetECAdaptor.d.ts.map +1 -1
  144. package/lib/esm/ChangesetECAdaptor.js +248 -33
  145. package/lib/esm/ChangesetECAdaptor.js.map +1 -1
  146. package/lib/esm/ClassRegistry.d.ts +1 -1
  147. package/lib/esm/ClassRegistry.js +1 -1
  148. package/lib/esm/ClassRegistry.js.map +1 -1
  149. package/lib/esm/CloudSqlite.js +1 -1
  150. package/lib/esm/CloudSqlite.js.map +1 -1
  151. package/lib/esm/CodeSpecs.d.ts +1 -1
  152. package/lib/esm/CodeSpecs.js +1 -1
  153. package/lib/esm/CodeSpecs.js.map +1 -1
  154. package/lib/esm/DisplayStyle.d.ts +4 -4
  155. package/lib/esm/DisplayStyle.js +3 -3
  156. package/lib/esm/DisplayStyle.js.map +1 -1
  157. package/lib/esm/ECDb.d.ts +4 -4
  158. package/lib/esm/ECDb.d.ts.map +1 -1
  159. package/lib/esm/ECDb.js +4 -4
  160. package/lib/esm/ECDb.js.map +1 -1
  161. package/lib/esm/ECSqlStatement.d.ts +15 -6
  162. package/lib/esm/ECSqlStatement.d.ts.map +1 -1
  163. package/lib/esm/ECSqlStatement.js +18 -4
  164. package/lib/esm/ECSqlStatement.js.map +1 -1
  165. package/lib/esm/Element.d.ts +51 -51
  166. package/lib/esm/Element.js +52 -52
  167. package/lib/esm/Element.js.map +1 -1
  168. package/lib/esm/ElementAspect.d.ts +8 -8
  169. package/lib/esm/ElementAspect.d.ts.map +1 -1
  170. package/lib/esm/ElementAspect.js +8 -8
  171. package/lib/esm/ElementAspect.js.map +1 -1
  172. package/lib/esm/Entity.d.ts +3 -3
  173. package/lib/esm/Entity.js +2 -2
  174. package/lib/esm/Entity.js.map +1 -1
  175. package/lib/esm/ExportGraphics.d.ts +54 -8
  176. package/lib/esm/ExportGraphics.d.ts.map +1 -1
  177. package/lib/esm/ExportGraphics.js +156 -58
  178. package/lib/esm/ExportGraphics.js.map +1 -1
  179. package/lib/esm/GeographicCRSServices.d.ts +6 -2
  180. package/lib/esm/GeographicCRSServices.d.ts.map +1 -1
  181. package/lib/esm/GeographicCRSServices.js +1 -1
  182. package/lib/esm/GeographicCRSServices.js.map +1 -1
  183. package/lib/esm/IModelDb.d.ts +29 -23
  184. package/lib/esm/IModelDb.d.ts.map +1 -1
  185. package/lib/esm/IModelDb.js +109 -46
  186. package/lib/esm/IModelDb.js.map +1 -1
  187. package/lib/esm/IModelElementCloneContext.d.ts +1 -1
  188. package/lib/esm/IModelElementCloneContext.d.ts.map +1 -1
  189. package/lib/esm/IModelElementCloneContext.js +1 -1
  190. package/lib/esm/IModelElementCloneContext.js.map +1 -1
  191. package/lib/esm/IModelHost.d.ts +2 -3
  192. package/lib/esm/IModelHost.d.ts.map +1 -1
  193. package/lib/esm/IModelHost.js +2 -3
  194. package/lib/esm/IModelHost.js.map +1 -1
  195. package/lib/esm/Material.d.ts +1 -1
  196. package/lib/esm/Material.js +1 -1
  197. package/lib/esm/Material.js.map +1 -1
  198. package/lib/esm/Model.d.ts +22 -22
  199. package/lib/esm/Model.js +22 -22
  200. package/lib/esm/Model.js.map +1 -1
  201. package/lib/esm/SQLiteDb.d.ts +1 -1
  202. package/lib/esm/SQLiteDb.js +1 -1
  203. package/lib/esm/SQLiteDb.js.map +1 -1
  204. package/lib/esm/SqliteStatement.d.ts +1 -1
  205. package/lib/esm/SqliteStatement.d.ts.map +1 -1
  206. package/lib/esm/SqliteStatement.js +1 -1
  207. package/lib/esm/SqliteStatement.js.map +1 -1
  208. package/lib/esm/Texture.d.ts +1 -1
  209. package/lib/esm/Texture.js +1 -1
  210. package/lib/esm/Texture.js.map +1 -1
  211. package/lib/esm/TxnManager.d.ts +4 -4
  212. package/lib/esm/TxnManager.js +1 -1
  213. package/lib/esm/TxnManager.js.map +1 -1
  214. package/lib/esm/ViewDefinition.d.ts +40 -14
  215. package/lib/esm/ViewDefinition.d.ts.map +1 -1
  216. package/lib/esm/ViewDefinition.js +42 -14
  217. package/lib/esm/ViewDefinition.js.map +1 -1
  218. package/lib/esm/annotations/FrameGeometry.d.ts +52 -0
  219. package/lib/esm/annotations/FrameGeometry.d.ts.map +1 -0
  220. package/lib/esm/annotations/FrameGeometry.js +245 -0
  221. package/lib/esm/annotations/FrameGeometry.js.map +1 -0
  222. package/lib/esm/{TextAnnotationElement.d.ts → annotations/TextAnnotationElement.d.ts} +6 -11
  223. package/lib/esm/annotations/TextAnnotationElement.d.ts.map +1 -0
  224. package/lib/esm/{TextAnnotationElement.js → annotations/TextAnnotationElement.js} +22 -28
  225. package/lib/esm/annotations/TextAnnotationElement.js.map +1 -0
  226. package/lib/esm/annotations/TextAnnotationGeometry.d.ts +31 -0
  227. package/lib/esm/annotations/TextAnnotationGeometry.d.ts.map +1 -0
  228. package/lib/esm/annotations/TextAnnotationGeometry.js +129 -0
  229. package/lib/esm/annotations/TextAnnotationGeometry.js.map +1 -0
  230. package/lib/esm/annotations/TextBlockGeometry.d.ts +16 -0
  231. package/lib/esm/annotations/TextBlockGeometry.d.ts.map +1 -0
  232. package/lib/esm/{TextAnnotationGeometry.js → annotations/TextBlockGeometry.js} +13 -69
  233. package/lib/esm/annotations/TextBlockGeometry.js.map +1 -0
  234. package/lib/esm/{TextAnnotationLayout.d.ts → annotations/TextBlockLayout.d.ts} +22 -8
  235. package/lib/esm/annotations/TextBlockLayout.d.ts.map +1 -0
  236. package/lib/esm/{TextAnnotationLayout.js → annotations/TextBlockLayout.js} +51 -9
  237. package/lib/esm/annotations/TextBlockLayout.js.map +1 -0
  238. package/lib/esm/core-backend.d.ts +5 -3
  239. package/lib/esm/core-backend.d.ts.map +1 -1
  240. package/lib/esm/core-backend.js +25 -3
  241. package/lib/esm/core-backend.js.map +1 -1
  242. package/lib/esm/internal/ElementLRUCache.d.ts +23 -0
  243. package/lib/esm/internal/ElementLRUCache.d.ts.map +1 -1
  244. package/lib/esm/internal/ElementLRUCache.js +165 -2
  245. package/lib/esm/internal/ElementLRUCache.js.map +1 -1
  246. package/lib/esm/internal/Symbols.d.ts +1 -0
  247. package/lib/esm/internal/Symbols.d.ts.map +1 -1
  248. package/lib/esm/internal/Symbols.js +1 -0
  249. package/lib/esm/internal/Symbols.js.map +1 -1
  250. package/lib/esm/rpc-impl/IModelReadRpcImpl.d.ts +1 -1
  251. package/lib/esm/rpc-impl/IModelReadRpcImpl.js +1 -1
  252. package/lib/esm/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  253. package/lib/esm/rpc-impl/RpcBriefcaseUtility.d.ts +2 -2
  254. package/lib/esm/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  255. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.d.ts +1 -1
  256. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js +1 -1
  257. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  258. package/lib/esm/test/ElementLRUCache.test.js +224 -1
  259. package/lib/esm/test/ElementLRUCache.test.js.map +1 -1
  260. package/lib/esm/test/TestUtils.d.ts +1 -1
  261. package/lib/esm/test/TestUtils.d.ts.map +1 -1
  262. package/lib/esm/test/TestUtils.js +1 -1
  263. package/lib/esm/test/TestUtils.js.map +1 -1
  264. package/lib/esm/test/annotations/TextAnnotation.test.js +190 -1025
  265. package/lib/esm/test/annotations/TextAnnotation.test.js.map +1 -1
  266. package/lib/esm/test/annotations/TextBlock.test.d.ts +2 -0
  267. package/lib/esm/test/annotations/TextBlock.test.d.ts.map +1 -0
  268. package/lib/esm/test/annotations/TextBlock.test.js +1105 -0
  269. package/lib/esm/test/annotations/TextBlock.test.js.map +1 -0
  270. package/lib/esm/test/ecdb/ConcurrentQuery.test.d.ts +2 -0
  271. package/lib/esm/test/ecdb/ConcurrentQuery.test.d.ts.map +1 -0
  272. package/lib/esm/test/ecdb/ConcurrentQuery.test.js +164 -0
  273. package/lib/esm/test/ecdb/ConcurrentQuery.test.js.map +1 -0
  274. package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js +22 -32
  275. package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js.map +1 -1
  276. package/lib/esm/test/ecdb/ECDb.test.js +29 -8
  277. package/lib/esm/test/ecdb/ECDb.test.js.map +1 -1
  278. package/lib/esm/test/ecdb/ECSqlQuery.test.js +0 -55
  279. package/lib/esm/test/ecdb/ECSqlQuery.test.js.map +1 -1
  280. package/lib/esm/test/ecdb/ECSqlStatement.test.js +192 -0
  281. package/lib/esm/test/ecdb/ECSqlStatement.test.js.map +1 -1
  282. package/lib/esm/test/imodel/IModel.test.js +255 -5
  283. package/lib/esm/test/imodel/IModel.test.js.map +1 -1
  284. package/lib/esm/test/misc/GeoServices.test.js +23 -9
  285. package/lib/esm/test/misc/GeoServices.test.js.map +1 -1
  286. package/lib/esm/test/standalone/ChangesetReader.test.js +451 -136
  287. package/lib/esm/test/standalone/ChangesetReader.test.js.map +1 -1
  288. package/lib/esm/test/standalone/ExportGraphics.test.js +53 -1
  289. package/lib/esm/test/standalone/ExportGraphics.test.js.map +1 -1
  290. package/lib/esm/test/standalone/GeometryStream.test.js +49 -1
  291. package/lib/esm/test/standalone/GeometryStream.test.js.map +1 -1
  292. package/lib/esm/test/standalone/IModelLimits.test.d.ts +2 -0
  293. package/lib/esm/test/standalone/IModelLimits.test.d.ts.map +1 -0
  294. package/lib/esm/test/standalone/IModelLimits.test.js +103 -0
  295. package/lib/esm/test/standalone/IModelLimits.test.js.map +1 -0
  296. package/lib/esm/test/standalone/SnapshotDb.test.js +19 -1
  297. package/lib/esm/test/standalone/SnapshotDb.test.js.map +1 -1
  298. package/package.json +12 -12
  299. package/lib/cjs/TextAnnotationElement.d.ts.map +0 -1
  300. package/lib/cjs/TextAnnotationElement.js.map +0 -1
  301. package/lib/cjs/TextAnnotationGeometry.d.ts +0 -32
  302. package/lib/cjs/TextAnnotationGeometry.d.ts.map +0 -1
  303. package/lib/cjs/TextAnnotationGeometry.js.map +0 -1
  304. package/lib/cjs/TextAnnotationLayout.d.ts.map +0 -1
  305. package/lib/cjs/TextAnnotationLayout.js.map +0 -1
  306. package/lib/esm/TextAnnotationElement.d.ts.map +0 -1
  307. package/lib/esm/TextAnnotationElement.js.map +0 -1
  308. package/lib/esm/TextAnnotationGeometry.d.ts +0 -32
  309. package/lib/esm/TextAnnotationGeometry.d.ts.map +0 -1
  310. package/lib/esm/TextAnnotationGeometry.js.map +0 -1
  311. package/lib/esm/TextAnnotationLayout.d.ts.map +0 -1
  312. package/lib/esm/TextAnnotationLayout.js.map +0 -1
@@ -9,7 +9,7 @@ import * as fs from "fs";
9
9
  import { join } from "path";
10
10
  import * as touch from "touch";
11
11
  import { assert, BeEvent, BentleyStatus, ChangeSetStatus, DbChangeStage, DbConflictCause, DbConflictResolution, DbResult, Guid, Id64, IModelStatus, JsonUtils, Logger, LogLevel, LRUMap, OpenMode } from "@itwin/core-bentley";
12
- import { BriefcaseIdValue, Code, DomainOptions, ECJsNames, ECSqlReader, EntityMetaData, FontMap, IModel, IModelError, IModelNotFoundResponse, ProfileOptions, QueryRowFormat, SchemaState, ViewStoreRpc } from "@itwin/core-common";
12
+ import { BriefcaseIdValue, Code, DomainOptions, ECJsNames, ECSqlReader, EntityMetaData, FontMap, IModel, IModelError, IModelNotFoundResponse, ProfileOptions, QueryRowFormat, SchemaState, ViewStoreError, ViewStoreRpc } from "@itwin/core-common";
13
13
  import { Range2d, Range3d } from "@itwin/core-geometry";
14
14
  import { BackendLoggerCategory } from "./BackendLoggerCategory";
15
15
  import { BriefcaseManager } from "./BriefcaseManager";
@@ -44,10 +44,10 @@ import { SettingsImpl } from "./internal/workspace/SettingsImpl";
44
44
  import { IModelNative } from "./internal/NativePlatform";
45
45
  import { createNoOpLockControl } from "./internal/NoLocks";
46
46
  import { createIModelDbFonts } from "./internal/IModelDbFontsImpl";
47
- import { _cache, _close, _hubAccess, _nativeDb, _releaseAllLocks } from "./internal/Symbols";
47
+ import { _cache, _close, _hubAccess, _instanceKeyCache, _nativeDb, _releaseAllLocks } from "./internal/Symbols";
48
48
  import { SchemaContext, SchemaJsonLocater } from "@itwin/ecschema-metadata";
49
49
  import { SchemaMap } from "./Schema";
50
- import { ElementLRUCache } from "./internal/ElementLRUCache";
50
+ import { ElementLRUCache, InstanceKeyLRUCache } from "./internal/ElementLRUCache";
51
51
  // spell:ignore fontid fontmap
52
52
  const loggerCategory = BackendLoggerCategory.IModelDb;
53
53
  /** @internal */
@@ -107,7 +107,7 @@ export class IModelDb extends IModel {
107
107
  _jsClassMap;
108
108
  _schemaMap;
109
109
  _schemaContext;
110
- /** @deprecated in 5.0.0. Use [[fonts]]. */
110
+ /** @deprecated in 5.0.0 - will not be removed until after 2026-06-13. Use [[fonts]]. */
111
111
  _fontMap; // eslint-disable-line @typescript-eslint/no-deprecated
112
112
  _fonts = createIModelDbFonts(this);
113
113
  _workspace;
@@ -163,7 +163,7 @@ export class IModelDb extends IModel {
163
163
  restartDefaultTxn() {
164
164
  this[_nativeDb].restartDefaultTxn();
165
165
  }
166
- /** @deprecated in 5.0.0. Use [[fonts]]. */
166
+ /** @deprecated in 5.0.0 - will not be removed until after 2026-06-13. Use [[fonts]]. */
167
167
  get fontMap() {
168
168
  return this._fontMap ?? (this._fontMap = new FontMap(this[_nativeDb].readFontMap())); // eslint-disable-line @typescript-eslint/no-deprecated
169
169
  }
@@ -340,7 +340,7 @@ export class IModelDb extends IModel {
340
340
  * @returns the value returned by `callback`.
341
341
  * @see [[withStatement]]
342
342
  * @public
343
- * @deprecated in 4.11. Use [[createQueryReader]] instead.
343
+ * @deprecated in 4.11 - will not be removed until after 2026-06-13. Use [[createQueryReader]] instead.
344
344
  */
345
345
  // eslint-disable-next-line @typescript-eslint/no-deprecated
346
346
  withPreparedStatement(ecsql, callback, logErrors = true) {
@@ -372,7 +372,7 @@ export class IModelDb extends IModel {
372
372
  * @returns the value returned by `callback`.
373
373
  * @see [[withPreparedStatement]]
374
374
  * @public
375
- * @deprecated in 4.11. Use [[createQueryReader]] instead.
375
+ * @deprecated in 4.11 - will not be removed until after 2026-06-13. Use [[createQueryReader]] instead.
376
376
  */
377
377
  // eslint-disable-next-line @typescript-eslint/no-deprecated
378
378
  withStatement(ecsql, callback, logErrors = true) {
@@ -579,6 +579,8 @@ export class IModelDb extends IModel {
579
579
  this._schemaContext = undefined;
580
580
  this.elements[_cache].clear();
581
581
  this.models[_cache].clear();
582
+ this.elements[_instanceKeyCache].clear();
583
+ this.models[_instanceKeyCache].clear();
582
584
  }
583
585
  /** Update the project extents for this iModel.
584
586
  * <p><em>Example:</em>
@@ -634,6 +636,7 @@ export class IModelDb extends IModel {
634
636
  * @note This will not delete Txns that have already been saved, even if they have not yet been pushed.
635
637
  */
636
638
  abandonChanges() {
639
+ this.clearCaches();
637
640
  this[_nativeDb].abandonChanges();
638
641
  }
639
642
  /**
@@ -647,11 +650,14 @@ export class IModelDb extends IModel {
647
650
  performCheckpoint() {
648
651
  if (!this.isReadonly) {
649
652
  this.saveChanges();
653
+ this.clearCaches();
654
+ this[_nativeDb].concurrentQueryShutdown();
655
+ this[_nativeDb].clearECDbCache();
650
656
  this[_nativeDb].performCheckpoint();
651
657
  }
652
658
  }
653
659
  /** @internal
654
- * @deprecated in 4.8. Use `txns.reverseTxns`.
660
+ * @deprecated in 4.8 - will not be removed until after 2026-06-13. Use `txns.reverseTxns`.
655
661
  */
656
662
  reverseTxns(numOperations) {
657
663
  return this[_nativeDb].reverseTxns(numOperations);
@@ -877,7 +883,7 @@ export class IModelDb extends IModel {
877
883
  }
878
884
  /** The registry of entity metadata for this iModel.
879
885
  * @internal
880
- * @deprecated in 5.0. Please use `schemaContext` from the `iModel` instead.
886
+ * @deprecated in 5.0 - will not be removed until after 2026-06-13. Please use `schemaContext` from the `iModel` instead.
881
887
  *
882
888
  * @example
883
889
  * ```typescript
@@ -937,7 +943,7 @@ export class IModelDb extends IModel {
937
943
  * @param sql The ECSQL statement to prepare
938
944
  * @param logErrors Determines if error will be logged if statement fail to prepare
939
945
  * @throws [[IModelError]] if there is a problem preparing the statement.
940
- * @deprecated in 4.11. Use [IModelDb.createQueryReader]($backend) or [ECDb.createQueryReader]($backend) to query.
946
+ * @deprecated in 4.11 - will not be removed until after 2026-06-13. Use [IModelDb.createQueryReader]($backend) or [ECDb.createQueryReader]($backend) to query.
941
947
  */
942
948
  // eslint-disable-next-line @typescript-eslint/no-deprecated
943
949
  prepareStatement(sql, logErrors = true) {
@@ -949,7 +955,7 @@ export class IModelDb extends IModel {
949
955
  /** Prepare an ECSQL statement.
950
956
  * @param sql The ECSQL statement to prepare
951
957
  * @returns `undefined` if there is a problem preparing the statement.
952
- * @deprecated in 4.11. Use [IModelDb.createQueryReader]($backend) or [ECDb.createQueryReader]($backend) to query.
958
+ * @deprecated in 4.11 - will not be removed until after 2026-06-13. Use [IModelDb.createQueryReader]($backend) or [ECDb.createQueryReader]($backend) to query.
953
959
  */
954
960
  // eslint-disable-next-line @typescript-eslint/no-deprecated
955
961
  tryPrepareStatement(sql) {
@@ -999,7 +1005,7 @@ export class IModelDb extends IModel {
999
1005
  }
1000
1006
  /** Get metadata for a class. This method will load the metadata from the iModel into the cache as a side-effect, if necessary.
1001
1007
  * @throws [[IModelError]] if the metadata cannot be found nor loaded.
1002
- * @deprecated in 5.0. Please use `getSchemaItem` from `SchemaContext` class instead.
1008
+ * @deprecated in 5.0 - will not be removed until after 2026-06-13. Please use `getSchemaItem` from `SchemaContext` class instead.
1003
1009
  *
1004
1010
  * @example
1005
1011
  * * ```typescript
@@ -1025,7 +1031,7 @@ export class IModelDb extends IModel {
1025
1031
  return metadata;
1026
1032
  }
1027
1033
  /** Identical to [[getMetaData]], except it returns `undefined` instead of throwing an error if the metadata cannot be found nor loaded.
1028
- * @deprecated in 5.0. Please use `getSchemaItem` from `SchemaContext` class instead.
1034
+ * @deprecated in 5.0 - will not be removed until after 2026-06-13. Please use `getSchemaItem` from `SchemaContext` class instead.
1029
1035
  *
1030
1036
  * @example
1031
1037
  * * ```typescript
@@ -1053,7 +1059,7 @@ export class IModelDb extends IModel {
1053
1059
  * @param func The callback to be invoked on each property
1054
1060
  * @param includeCustom If true (default), include custom-handled properties in the iteration. Otherwise, skip custom-handled properties.
1055
1061
  * @note Custom-handled properties are core properties that have behavior enforced by C++ handlers.
1056
- * @deprecated in 5.0. Please use `forEachProperty` instead.
1062
+ * @deprecated in 5.0 - will not be removed until after 2026-06-13. Please use `forEachProperty` instead.
1057
1063
  *
1058
1064
  * @example
1059
1065
  * ```typescript
@@ -1079,7 +1085,7 @@ export class IModelDb extends IModel {
1079
1085
  * @param func The callback to be invoked on each property
1080
1086
  * @param includeCustom If true (default), include custom-handled properties in the iteration. Otherwise, skip custom-handled properties.
1081
1087
  * @note Custom-handled properties are core properties that have behavior enforced by C++ handlers.
1082
- * @deprecated in 5.0. Use `forEachProperty` from `SchemaContext` class instead.
1088
+ * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `forEachProperty` from `SchemaContext` class instead.
1083
1089
  *
1084
1090
  * @example
1085
1091
  * ```typescript
@@ -1109,7 +1115,7 @@ export class IModelDb extends IModel {
1109
1115
  }
1110
1116
  /**
1111
1117
  * @internal
1112
- * @deprecated in 5.0. Please use `schemaContext` from `iModel` instead to get metadata.
1118
+ * @deprecated in 5.0 - will not be removed until after 2026-06-13. Please use `schemaContext` from `iModel` instead to get metadata.
1113
1119
  */
1114
1120
  loadMetaData(classFullName) {
1115
1121
  // eslint-disable-next-line @typescript-eslint/no-deprecated
@@ -1240,11 +1246,21 @@ export class IModelDb extends IModel {
1240
1246
  }
1241
1247
  /** Get the IModel coordinate corresponding to each GeoCoordinate point in the input */
1242
1248
  async getIModelCoordinatesFromGeoCoordinates(props) {
1243
- return this[_nativeDb].getIModelCoordinatesFromGeoCoordinates(props);
1249
+ const response = this[_nativeDb].getIModelCoordinatesFromGeoCoordinates(props);
1250
+ // fromCache is only meaningful on the front-end; provide it for compatibility with return type.
1251
+ response.fromCache = 0;
1252
+ // Native omits the array if the input was empty.
1253
+ response.iModelCoords = response.iModelCoords ?? [];
1254
+ return response;
1244
1255
  }
1245
1256
  /** Get the GeoCoordinate (longitude, latitude, elevation) corresponding to each IModel Coordinate point in the input */
1246
1257
  async getGeoCoordinatesFromIModelCoordinates(props) {
1247
- return this[_nativeDb].getGeoCoordinatesFromIModelCoordinates(props);
1258
+ const response = this[_nativeDb].getGeoCoordinatesFromIModelCoordinates(props);
1259
+ // fromCache is only meaningful on the front-end; provide it for compatibility with return type.
1260
+ response.fromCache = 0;
1261
+ // Native omits the array if the input was empty.
1262
+ response.geoCoords = response.geoCoords ?? [];
1263
+ return response;
1248
1264
  }
1249
1265
  /** Export meshes suitable for graphics APIs from arbitrary geometry in elements in this IModelDb.
1250
1266
  * * Requests can be slow when processing many elements so it is expected that this function be used on a dedicated backend,
@@ -1474,12 +1490,15 @@ function processSchemaWriteStatus(status) {
1474
1490
  /** @public */
1475
1491
  (function (IModelDb) {
1476
1492
  /** The collection of models in an [[IModelDb]].
1477
- * @public
1493
+ * @public @preview
1478
1494
  */
1479
1495
  class Models {
1480
1496
  _iModel;
1497
+ _modelCacheSize = 10;
1498
+ /** @internal */
1499
+ [_cache] = new LRUMap(this._modelCacheSize);
1481
1500
  /** @internal */
1482
- [_cache] = new LRUMap(500);
1501
+ [_instanceKeyCache] = new InstanceKeyLRUCache(this._modelCacheSize);
1483
1502
  /** @internal */
1484
1503
  constructor(_iModel) {
1485
1504
  this._iModel = _iModel;
@@ -1583,7 +1602,16 @@ function processSchemaWriteStatus(status) {
1583
1602
  else {
1584
1603
  throw new IModelError(IModelStatus.InvalidId, `Invalid model identifier: ${JSON.stringify(modelIdArg)}`);
1585
1604
  }
1586
- return this._iModel[_nativeDb].resolveInstanceKey(args);
1605
+ // Check the cache to avoid unnecessary native calls
1606
+ const cachedResult = this[_instanceKeyCache].get(args);
1607
+ if (cachedResult) {
1608
+ return cachedResult;
1609
+ }
1610
+ else {
1611
+ const instanceKey = this._iModel[_nativeDb].resolveInstanceKey(args);
1612
+ this[_instanceKeyCache].set(args, instanceKey);
1613
+ return instanceKey;
1614
+ }
1587
1615
  }
1588
1616
  /** Get the sub-model of the specified Element.
1589
1617
  * See [[IModelDb.Elements.queryElementIdByCode]] for more on how to find an element by Code.
@@ -1627,7 +1655,9 @@ function processSchemaWriteStatus(status) {
1627
1655
  return props.id = this._iModel[_nativeDb].insertModel(props);
1628
1656
  }
1629
1657
  catch (err) {
1630
- throw new IModelError(err.errorNumber, `Error inserting model [${err.message}], class=${props.classFullName}`);
1658
+ const error = new IModelError(err.errorNumber, `Error inserting model [${err.message}], class=${props.classFullName}`);
1659
+ error.cause = err;
1660
+ throw error;
1631
1661
  }
1632
1662
  }
1633
1663
  /** Update an existing model.
@@ -1641,7 +1671,9 @@ function processSchemaWriteStatus(status) {
1641
1671
  this._iModel[_nativeDb].updateModel(props);
1642
1672
  }
1643
1673
  catch (err) {
1644
- throw new IModelError(err.errorNumber, `error updating model [${err.message}] id=${props.id}`);
1674
+ const error = new IModelError(err.errorNumber, `Error updating model [${err.message}], id: ${props.id}`);
1675
+ error.cause = err;
1676
+ throw error;
1645
1677
  }
1646
1678
  }
1647
1679
  /** Mark the geometry of [[GeometricModel]] as having changed, by recording an indirect change to its GeometryGuid property.
@@ -1657,7 +1689,7 @@ function processSchemaWriteStatus(status) {
1657
1689
  this._iModel.models[_cache].delete(modelId);
1658
1690
  const error = this._iModel[_nativeDb].updateModelGeometryGuid(modelId);
1659
1691
  if (error !== IModelStatus.Success)
1660
- throw new IModelError(error, `updating geometry guid for model ${modelId}`);
1692
+ throw new IModelError(error, `Error updating geometry guid for model ${modelId}`);
1661
1693
  }
1662
1694
  /** Delete one or more existing models.
1663
1695
  * @param ids The Ids of the models to be deleted
@@ -1667,10 +1699,13 @@ function processSchemaWriteStatus(status) {
1667
1699
  Id64.toIdSet(ids).forEach((id) => {
1668
1700
  try {
1669
1701
  this[_cache].delete(id);
1702
+ this[_instanceKeyCache].deleteById(id);
1670
1703
  this._iModel[_nativeDb].deleteModel(id);
1671
1704
  }
1672
1705
  catch (err) {
1673
- throw new IModelError(err.errorNumber, `error deleting model [${err.message}] id ${id}`);
1706
+ const error = new IModelError(err.errorNumber, `Error deleting model [${err.message}], id: ${id}`);
1707
+ error.cause = err;
1708
+ throw error;
1674
1709
  }
1675
1710
  });
1676
1711
  }
@@ -1700,12 +1735,15 @@ function processSchemaWriteStatus(status) {
1700
1735
  }
1701
1736
  IModelDb.Models = Models;
1702
1737
  /** The collection of elements in an [[IModelDb]].
1703
- * @public
1738
+ * @public @preview
1704
1739
  */
1705
1740
  class Elements {
1706
1741
  _iModel;
1742
+ _elementCacheSize = 50;
1743
+ /** @internal */
1744
+ [_cache] = new ElementLRUCache(this._elementCacheSize);
1707
1745
  /** @internal */
1708
- [_cache] = new ElementLRUCache();
1746
+ [_instanceKeyCache] = new InstanceKeyLRUCache(this._elementCacheSize);
1709
1747
  /** @internal */
1710
1748
  constructor(_iModel) {
1711
1749
  this._iModel = _iModel;
@@ -1755,7 +1793,16 @@ function processSchemaWriteStatus(status) {
1755
1793
  throw new IModelError(IModelStatus.InvalidId, "Element Id or FederationGuid or Code is required");
1756
1794
  }
1757
1795
  }
1758
- return this._iModel[_nativeDb].resolveInstanceKey(args);
1796
+ // Check the cache to avoid unnecessary native calls
1797
+ const cachedResult = this[_instanceKeyCache].get(args);
1798
+ if (cachedResult) {
1799
+ return cachedResult;
1800
+ }
1801
+ else {
1802
+ const instanceKey = this._iModel[_nativeDb].resolveInstanceKey(args);
1803
+ this[_instanceKeyCache].set(args, instanceKey);
1804
+ return instanceKey;
1805
+ }
1759
1806
  }
1760
1807
  /** Get properties of an Element by Id, FederationGuid, or Code
1761
1808
  * @returns The properties of the element or `undefined` if the element is not found.
@@ -1845,15 +1892,16 @@ function processSchemaWriteStatus(status) {
1845
1892
  throw new IModelError(IModelStatus.InvalidCodeSpec, "Invalid CodeSpec");
1846
1893
  if (code.value === undefined)
1847
1894
  throw new IModelError(IModelStatus.InvalidCode, "Invalid Code");
1848
- // eslint-disable-next-line @typescript-eslint/no-deprecated
1849
- return this._iModel.withPreparedStatement("SELECT ECInstanceId FROM BisCore:Element WHERE CodeSpec.Id=? AND CodeScope.Id=? AND CodeValue=?", (stmt) => {
1850
- stmt.bindId(1, code.spec);
1851
- stmt.bindId(2, Id64.fromString(code.scope));
1852
- stmt.bindString(3, code.value);
1853
- if (DbResult.BE_SQLITE_ROW !== stmt.step())
1895
+ const codeToQuery = new Code(code);
1896
+ try {
1897
+ const elementKey = this.resolveElementKey(codeToQuery);
1898
+ return Id64.fromString(elementKey.id);
1899
+ }
1900
+ catch (err) {
1901
+ if (err.errorNumber === IModelStatus.NotFound)
1854
1902
  return undefined;
1855
- return stmt.getValue(0).getId();
1856
- });
1903
+ throw err;
1904
+ }
1857
1905
  }
1858
1906
  /** Query for an [[Element]]'s last modified time.
1859
1907
  * @param elementId The Id of the element.
@@ -1877,7 +1925,7 @@ function processSchemaWriteStatus(status) {
1877
1925
  /** Insert a new element into the iModel.
1878
1926
  * @param elProps The properties of the new element.
1879
1927
  * @returns The newly inserted element's Id.
1880
- * @throws [[IModelError]] if unable to insert the element.
1928
+ * @throws [[ITwinError]] if unable to insert the element.
1881
1929
  * @note For convenience, the value of `elProps.id` is updated to reflect the resultant element's id.
1882
1930
  * However when `elProps.federationGuid` is not present or undefined, a new Guid will be generated and stored on the resultant element. But
1883
1931
  * the value of `elProps.federationGuid` is *not* updated. Generally, it is best to re-read the element after inserting (e.g. via [[getElementProps]])
@@ -1907,7 +1955,7 @@ function processSchemaWriteStatus(status) {
1907
1955
  * @param elProps the properties of the element to update.
1908
1956
  * @note The values of `classFullName` and `model` *may not be changed* by this method. Further, it will permute the `elProps` object by adding or
1909
1957
  * overwriting their values to the correct values.
1910
- * @throws [[IModelError]] if unable to update the element.
1958
+ * @throws [[ITwinError]] if unable to update the element.
1911
1959
  */
1912
1960
  updateElement(elProps) {
1913
1961
  try {
@@ -1926,7 +1974,7 @@ function processSchemaWriteStatus(status) {
1926
1974
  }
1927
1975
  /** Delete one or more elements from this iModel.
1928
1976
  * @param ids The set of Ids of the element(s) to be deleted
1929
- * @throws [[IModelError]]
1977
+ * @throws [[ITwinError]]
1930
1978
  * @see deleteDefinitionElements
1931
1979
  */
1932
1980
  deleteElement(ids) {
@@ -1934,6 +1982,7 @@ function processSchemaWriteStatus(status) {
1934
1982
  Id64.toIdSet(ids).forEach((id) => {
1935
1983
  try {
1936
1984
  this[_cache].delete({ id });
1985
+ this[_instanceKeyCache].deleteById(id);
1937
1986
  iModel[_nativeDb].deleteElement(id);
1938
1987
  }
1939
1988
  catch (err) {
@@ -2213,7 +2262,9 @@ function processSchemaWriteStatus(status) {
2213
2262
  return this._iModel[_nativeDb].insertElementAspect(aspectProps);
2214
2263
  }
2215
2264
  catch (err) {
2216
- throw new IModelError(err.errorNumber, `Error inserting ElementAspect [${err.message}], class: ${aspectProps.classFullName}`);
2265
+ const error = new IModelError(err.errorNumber, `Error inserting ElementAspect [${err.message}], class: ${aspectProps.classFullName}`, aspectProps);
2266
+ error.cause = err;
2267
+ throw error;
2217
2268
  }
2218
2269
  }
2219
2270
  /** Update an exist ElementAspect within the iModel.
@@ -2225,7 +2276,9 @@ function processSchemaWriteStatus(status) {
2225
2276
  this._iModel[_nativeDb].updateElementAspect(aspectProps);
2226
2277
  }
2227
2278
  catch (err) {
2228
- throw new IModelError(err.errorNumber, `Error updating ElementAspect [${err.message}], id: ${aspectProps.id}`);
2279
+ const error = new IModelError(err.errorNumber, `Error updating ElementAspect [${err.message}], id: ${aspectProps.id}`, aspectProps);
2280
+ error.cause = err;
2281
+ throw error;
2229
2282
  }
2230
2283
  }
2231
2284
  /** Delete one or more ElementAspects from this iModel.
@@ -2239,14 +2292,16 @@ function processSchemaWriteStatus(status) {
2239
2292
  iModel[_nativeDb].deleteElementAspect(aspectInstanceId);
2240
2293
  }
2241
2294
  catch (err) {
2242
- throw new IModelError(err.errorNumber, `Error deleting ElementAspect [${err.message}], id: ${aspectInstanceId}`);
2295
+ const error = new IModelError(err.errorNumber, `Error deleting ElementAspect [${err.message}], id: ${aspectInstanceId}`);
2296
+ error.cause = err;
2297
+ throw error;
2243
2298
  }
2244
2299
  });
2245
2300
  }
2246
2301
  }
2247
2302
  IModelDb.Elements = Elements;
2248
2303
  /** The collection of views in an [[IModelDb]].
2249
- * @public
2304
+ * @public @preview
2250
2305
  */
2251
2306
  class Views {
2252
2307
  _iModel;
@@ -2272,7 +2327,7 @@ function processSchemaWriteStatus(status) {
2272
2327
  if (undefined === props) {
2273
2328
  const propsString = this._iModel.queryFilePropertyString(Views.viewStoreProperty);
2274
2329
  if (!propsString)
2275
- throw new Error("iModel does not have a default ViewStore");
2330
+ ViewStoreError.throwError("no-viewstore", { message: "iModel does not have a default ViewStore" });
2276
2331
  props = JSON.parse(propsString);
2277
2332
  }
2278
2333
  const accessToken = await CloudSqlite.requestToken({
@@ -2393,7 +2448,7 @@ function processSchemaWriteStatus(status) {
2393
2448
  }
2394
2449
  getViewThumbnailArg(viewDefinitionId) {
2395
2450
  if (!Id64.isValid(viewDefinitionId))
2396
- throw new Error("illegal thumbnail id");
2451
+ throw new IModelError(IModelStatus.BadArg, "illegal thumbnail id");
2397
2452
  return { namespace: "dgn_View", name: "Thumbnail", id: viewDefinitionId };
2398
2453
  }
2399
2454
  /** Get the thumbnail for a view.
@@ -2422,7 +2477,7 @@ function processSchemaWriteStatus(status) {
2422
2477
  }
2423
2478
  /** Set the default view property the iModel.
2424
2479
  * @param viewId The Id of the ViewDefinition to use as the default
2425
- * @deprecated in 4.2.x. Avoid setting this property - it is not practical for one single view to serve the needs of the many applications
2480
+ * @deprecated in 4.2.x - will not be removed until after 2026-06-13. Avoid setting this property - it is not practical for one single view to serve the needs of the many applications
2426
2481
  * that might wish to view the contents of the iModel.
2427
2482
  */
2428
2483
  setDefaultViewId(viewId) {
@@ -3100,6 +3155,10 @@ export class SnapshotDb extends IModelDb {
3100
3155
  snapshotDb.channels.addAllowedChannel(ChannelControl.sharedChannelName);
3101
3156
  if (options.createClassViews)
3102
3157
  snapshotDb._createClassViewsOnClose = true; // save flag that will be checked when close() is called
3158
+ if (options.geographicCoordinateSystem)
3159
+ snapshotDb.setGeographicCoordinateSystem(options.geographicCoordinateSystem);
3160
+ if (options.ecefLocation)
3161
+ snapshotDb.setEcefLocation(options.ecefLocation);
3103
3162
  return snapshotDb;
3104
3163
  }
3105
3164
  /** Create a local [Snapshot]($docs/learning/backend/AccessingIModels.md#snapshot-imodels) iModel file, using this iModel as a *seed* or starting point.
@@ -3254,6 +3313,10 @@ export class StandaloneDb extends BriefcaseDb {
3254
3313
  nativeDb.resetBriefcaseId(BriefcaseIdValue.Unassigned);
3255
3314
  nativeDb.saveChanges();
3256
3315
  const db = new this({ nativeDb, key: Guid.createValue(), briefcaseId: BriefcaseIdValue.Unassigned, openMode: OpenMode.ReadWrite });
3316
+ if (args.geographicCoordinateSystem)
3317
+ db.setGeographicCoordinateSystem(args.geographicCoordinateSystem);
3318
+ if (args.ecefLocation)
3319
+ db.setEcefLocation(args.ecefLocation);
3257
3320
  db.channels.addAllowedChannel(ChannelControl.sharedChannelName);
3258
3321
  return db;
3259
3322
  }