@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
@@ -110,7 +110,7 @@ class IModelDb extends core_common_1.IModel {
110
110
  _jsClassMap;
111
111
  _schemaMap;
112
112
  _schemaContext;
113
- /** @deprecated in 5.0.0. Use [[fonts]]. */
113
+ /** @deprecated in 5.0.0 - will not be removed until after 2026-06-13. Use [[fonts]]. */
114
114
  _fontMap; // eslint-disable-line @typescript-eslint/no-deprecated
115
115
  _fonts = (0, IModelDbFontsImpl_1.createIModelDbFonts)(this);
116
116
  _workspace;
@@ -166,7 +166,7 @@ class IModelDb extends core_common_1.IModel {
166
166
  restartDefaultTxn() {
167
167
  this[Symbols_1._nativeDb].restartDefaultTxn();
168
168
  }
169
- /** @deprecated in 5.0.0. Use [[fonts]]. */
169
+ /** @deprecated in 5.0.0 - will not be removed until after 2026-06-13. Use [[fonts]]. */
170
170
  get fontMap() {
171
171
  return this._fontMap ?? (this._fontMap = new core_common_1.FontMap(this[Symbols_1._nativeDb].readFontMap())); // eslint-disable-line @typescript-eslint/no-deprecated
172
172
  }
@@ -343,7 +343,7 @@ class IModelDb extends core_common_1.IModel {
343
343
  * @returns the value returned by `callback`.
344
344
  * @see [[withStatement]]
345
345
  * @public
346
- * @deprecated in 4.11. Use [[createQueryReader]] instead.
346
+ * @deprecated in 4.11 - will not be removed until after 2026-06-13. Use [[createQueryReader]] instead.
347
347
  */
348
348
  // eslint-disable-next-line @typescript-eslint/no-deprecated
349
349
  withPreparedStatement(ecsql, callback, logErrors = true) {
@@ -375,7 +375,7 @@ class IModelDb extends core_common_1.IModel {
375
375
  * @returns the value returned by `callback`.
376
376
  * @see [[withPreparedStatement]]
377
377
  * @public
378
- * @deprecated in 4.11. Use [[createQueryReader]] instead.
378
+ * @deprecated in 4.11 - will not be removed until after 2026-06-13. Use [[createQueryReader]] instead.
379
379
  */
380
380
  // eslint-disable-next-line @typescript-eslint/no-deprecated
381
381
  withStatement(ecsql, callback, logErrors = true) {
@@ -582,6 +582,8 @@ class IModelDb extends core_common_1.IModel {
582
582
  this._schemaContext = undefined;
583
583
  this.elements[Symbols_1._cache].clear();
584
584
  this.models[Symbols_1._cache].clear();
585
+ this.elements[Symbols_1._instanceKeyCache].clear();
586
+ this.models[Symbols_1._instanceKeyCache].clear();
585
587
  }
586
588
  /** Update the project extents for this iModel.
587
589
  * <p><em>Example:</em>
@@ -637,6 +639,7 @@ class IModelDb extends core_common_1.IModel {
637
639
  * @note This will not delete Txns that have already been saved, even if they have not yet been pushed.
638
640
  */
639
641
  abandonChanges() {
642
+ this.clearCaches();
640
643
  this[Symbols_1._nativeDb].abandonChanges();
641
644
  }
642
645
  /**
@@ -650,11 +653,14 @@ class IModelDb extends core_common_1.IModel {
650
653
  performCheckpoint() {
651
654
  if (!this.isReadonly) {
652
655
  this.saveChanges();
656
+ this.clearCaches();
657
+ this[Symbols_1._nativeDb].concurrentQueryShutdown();
658
+ this[Symbols_1._nativeDb].clearECDbCache();
653
659
  this[Symbols_1._nativeDb].performCheckpoint();
654
660
  }
655
661
  }
656
662
  /** @internal
657
- * @deprecated in 4.8. Use `txns.reverseTxns`.
663
+ * @deprecated in 4.8 - will not be removed until after 2026-06-13. Use `txns.reverseTxns`.
658
664
  */
659
665
  reverseTxns(numOperations) {
660
666
  return this[Symbols_1._nativeDb].reverseTxns(numOperations);
@@ -880,7 +886,7 @@ class IModelDb extends core_common_1.IModel {
880
886
  }
881
887
  /** The registry of entity metadata for this iModel.
882
888
  * @internal
883
- * @deprecated in 5.0. Please use `schemaContext` from the `iModel` instead.
889
+ * @deprecated in 5.0 - will not be removed until after 2026-06-13. Please use `schemaContext` from the `iModel` instead.
884
890
  *
885
891
  * @example
886
892
  * ```typescript
@@ -940,7 +946,7 @@ class IModelDb extends core_common_1.IModel {
940
946
  * @param sql The ECSQL statement to prepare
941
947
  * @param logErrors Determines if error will be logged if statement fail to prepare
942
948
  * @throws [[IModelError]] if there is a problem preparing the statement.
943
- * @deprecated in 4.11. Use [IModelDb.createQueryReader]($backend) or [ECDb.createQueryReader]($backend) to query.
949
+ * @deprecated in 4.11 - will not be removed until after 2026-06-13. Use [IModelDb.createQueryReader]($backend) or [ECDb.createQueryReader]($backend) to query.
944
950
  */
945
951
  // eslint-disable-next-line @typescript-eslint/no-deprecated
946
952
  prepareStatement(sql, logErrors = true) {
@@ -952,7 +958,7 @@ class IModelDb extends core_common_1.IModel {
952
958
  /** Prepare an ECSQL statement.
953
959
  * @param sql The ECSQL statement to prepare
954
960
  * @returns `undefined` if there is a problem preparing the statement.
955
- * @deprecated in 4.11. Use [IModelDb.createQueryReader]($backend) or [ECDb.createQueryReader]($backend) to query.
961
+ * @deprecated in 4.11 - will not be removed until after 2026-06-13. Use [IModelDb.createQueryReader]($backend) or [ECDb.createQueryReader]($backend) to query.
956
962
  */
957
963
  // eslint-disable-next-line @typescript-eslint/no-deprecated
958
964
  tryPrepareStatement(sql) {
@@ -1002,7 +1008,7 @@ class IModelDb extends core_common_1.IModel {
1002
1008
  }
1003
1009
  /** Get metadata for a class. This method will load the metadata from the iModel into the cache as a side-effect, if necessary.
1004
1010
  * @throws [[IModelError]] if the metadata cannot be found nor loaded.
1005
- * @deprecated in 5.0. Please use `getSchemaItem` from `SchemaContext` class instead.
1011
+ * @deprecated in 5.0 - will not be removed until after 2026-06-13. Please use `getSchemaItem` from `SchemaContext` class instead.
1006
1012
  *
1007
1013
  * @example
1008
1014
  * * ```typescript
@@ -1028,7 +1034,7 @@ class IModelDb extends core_common_1.IModel {
1028
1034
  return metadata;
1029
1035
  }
1030
1036
  /** Identical to [[getMetaData]], except it returns `undefined` instead of throwing an error if the metadata cannot be found nor loaded.
1031
- * @deprecated in 5.0. Please use `getSchemaItem` from `SchemaContext` class instead.
1037
+ * @deprecated in 5.0 - will not be removed until after 2026-06-13. Please use `getSchemaItem` from `SchemaContext` class instead.
1032
1038
  *
1033
1039
  * @example
1034
1040
  * * ```typescript
@@ -1056,7 +1062,7 @@ class IModelDb extends core_common_1.IModel {
1056
1062
  * @param func The callback to be invoked on each property
1057
1063
  * @param includeCustom If true (default), include custom-handled properties in the iteration. Otherwise, skip custom-handled properties.
1058
1064
  * @note Custom-handled properties are core properties that have behavior enforced by C++ handlers.
1059
- * @deprecated in 5.0. Please use `forEachProperty` instead.
1065
+ * @deprecated in 5.0 - will not be removed until after 2026-06-13. Please use `forEachProperty` instead.
1060
1066
  *
1061
1067
  * @example
1062
1068
  * ```typescript
@@ -1082,7 +1088,7 @@ class IModelDb extends core_common_1.IModel {
1082
1088
  * @param func The callback to be invoked on each property
1083
1089
  * @param includeCustom If true (default), include custom-handled properties in the iteration. Otherwise, skip custom-handled properties.
1084
1090
  * @note Custom-handled properties are core properties that have behavior enforced by C++ handlers.
1085
- * @deprecated in 5.0. Use `forEachProperty` from `SchemaContext` class instead.
1091
+ * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `forEachProperty` from `SchemaContext` class instead.
1086
1092
  *
1087
1093
  * @example
1088
1094
  * ```typescript
@@ -1112,7 +1118,7 @@ class IModelDb extends core_common_1.IModel {
1112
1118
  }
1113
1119
  /**
1114
1120
  * @internal
1115
- * @deprecated in 5.0. Please use `schemaContext` from `iModel` instead to get metadata.
1121
+ * @deprecated in 5.0 - will not be removed until after 2026-06-13. Please use `schemaContext` from `iModel` instead to get metadata.
1116
1122
  */
1117
1123
  loadMetaData(classFullName) {
1118
1124
  // eslint-disable-next-line @typescript-eslint/no-deprecated
@@ -1243,11 +1249,21 @@ class IModelDb extends core_common_1.IModel {
1243
1249
  }
1244
1250
  /** Get the IModel coordinate corresponding to each GeoCoordinate point in the input */
1245
1251
  async getIModelCoordinatesFromGeoCoordinates(props) {
1246
- return this[Symbols_1._nativeDb].getIModelCoordinatesFromGeoCoordinates(props);
1252
+ const response = this[Symbols_1._nativeDb].getIModelCoordinatesFromGeoCoordinates(props);
1253
+ // fromCache is only meaningful on the front-end; provide it for compatibility with return type.
1254
+ response.fromCache = 0;
1255
+ // Native omits the array if the input was empty.
1256
+ response.iModelCoords = response.iModelCoords ?? [];
1257
+ return response;
1247
1258
  }
1248
1259
  /** Get the GeoCoordinate (longitude, latitude, elevation) corresponding to each IModel Coordinate point in the input */
1249
1260
  async getGeoCoordinatesFromIModelCoordinates(props) {
1250
- return this[Symbols_1._nativeDb].getGeoCoordinatesFromIModelCoordinates(props);
1261
+ const response = this[Symbols_1._nativeDb].getGeoCoordinatesFromIModelCoordinates(props);
1262
+ // fromCache is only meaningful on the front-end; provide it for compatibility with return type.
1263
+ response.fromCache = 0;
1264
+ // Native omits the array if the input was empty.
1265
+ response.geoCoords = response.geoCoords ?? [];
1266
+ return response;
1251
1267
  }
1252
1268
  /** Export meshes suitable for graphics APIs from arbitrary geometry in elements in this IModelDb.
1253
1269
  * * Requests can be slow when processing many elements so it is expected that this function be used on a dedicated backend,
@@ -1478,12 +1494,15 @@ function processSchemaWriteStatus(status) {
1478
1494
  /** @public */
1479
1495
  (function (IModelDb) {
1480
1496
  /** The collection of models in an [[IModelDb]].
1481
- * @public
1497
+ * @public @preview
1482
1498
  */
1483
1499
  class Models {
1484
1500
  _iModel;
1501
+ _modelCacheSize = 10;
1502
+ /** @internal */
1503
+ [Symbols_1._cache] = new core_bentley_1.LRUMap(this._modelCacheSize);
1485
1504
  /** @internal */
1486
- [Symbols_1._cache] = new core_bentley_1.LRUMap(500);
1505
+ [Symbols_1._instanceKeyCache] = new ElementLRUCache_1.InstanceKeyLRUCache(this._modelCacheSize);
1487
1506
  /** @internal */
1488
1507
  constructor(_iModel) {
1489
1508
  this._iModel = _iModel;
@@ -1587,7 +1606,16 @@ function processSchemaWriteStatus(status) {
1587
1606
  else {
1588
1607
  throw new core_common_1.IModelError(core_bentley_1.IModelStatus.InvalidId, `Invalid model identifier: ${JSON.stringify(modelIdArg)}`);
1589
1608
  }
1590
- return this._iModel[Symbols_1._nativeDb].resolveInstanceKey(args);
1609
+ // Check the cache to avoid unnecessary native calls
1610
+ const cachedResult = this[Symbols_1._instanceKeyCache].get(args);
1611
+ if (cachedResult) {
1612
+ return cachedResult;
1613
+ }
1614
+ else {
1615
+ const instanceKey = this._iModel[Symbols_1._nativeDb].resolveInstanceKey(args);
1616
+ this[Symbols_1._instanceKeyCache].set(args, instanceKey);
1617
+ return instanceKey;
1618
+ }
1591
1619
  }
1592
1620
  /** Get the sub-model of the specified Element.
1593
1621
  * See [[IModelDb.Elements.queryElementIdByCode]] for more on how to find an element by Code.
@@ -1631,7 +1659,9 @@ function processSchemaWriteStatus(status) {
1631
1659
  return props.id = this._iModel[Symbols_1._nativeDb].insertModel(props);
1632
1660
  }
1633
1661
  catch (err) {
1634
- throw new core_common_1.IModelError(err.errorNumber, `Error inserting model [${err.message}], class=${props.classFullName}`);
1662
+ const error = new core_common_1.IModelError(err.errorNumber, `Error inserting model [${err.message}], class=${props.classFullName}`);
1663
+ error.cause = err;
1664
+ throw error;
1635
1665
  }
1636
1666
  }
1637
1667
  /** Update an existing model.
@@ -1645,7 +1675,9 @@ function processSchemaWriteStatus(status) {
1645
1675
  this._iModel[Symbols_1._nativeDb].updateModel(props);
1646
1676
  }
1647
1677
  catch (err) {
1648
- throw new core_common_1.IModelError(err.errorNumber, `error updating model [${err.message}] id=${props.id}`);
1678
+ const error = new core_common_1.IModelError(err.errorNumber, `Error updating model [${err.message}], id: ${props.id}`);
1679
+ error.cause = err;
1680
+ throw error;
1649
1681
  }
1650
1682
  }
1651
1683
  /** Mark the geometry of [[GeometricModel]] as having changed, by recording an indirect change to its GeometryGuid property.
@@ -1661,7 +1693,7 @@ function processSchemaWriteStatus(status) {
1661
1693
  this._iModel.models[Symbols_1._cache].delete(modelId);
1662
1694
  const error = this._iModel[Symbols_1._nativeDb].updateModelGeometryGuid(modelId);
1663
1695
  if (error !== core_bentley_1.IModelStatus.Success)
1664
- throw new core_common_1.IModelError(error, `updating geometry guid for model ${modelId}`);
1696
+ throw new core_common_1.IModelError(error, `Error updating geometry guid for model ${modelId}`);
1665
1697
  }
1666
1698
  /** Delete one or more existing models.
1667
1699
  * @param ids The Ids of the models to be deleted
@@ -1671,10 +1703,13 @@ function processSchemaWriteStatus(status) {
1671
1703
  core_bentley_1.Id64.toIdSet(ids).forEach((id) => {
1672
1704
  try {
1673
1705
  this[Symbols_1._cache].delete(id);
1706
+ this[Symbols_1._instanceKeyCache].deleteById(id);
1674
1707
  this._iModel[Symbols_1._nativeDb].deleteModel(id);
1675
1708
  }
1676
1709
  catch (err) {
1677
- throw new core_common_1.IModelError(err.errorNumber, `error deleting model [${err.message}] id ${id}`);
1710
+ const error = new core_common_1.IModelError(err.errorNumber, `Error deleting model [${err.message}], id: ${id}`);
1711
+ error.cause = err;
1712
+ throw error;
1678
1713
  }
1679
1714
  });
1680
1715
  }
@@ -1704,12 +1739,15 @@ function processSchemaWriteStatus(status) {
1704
1739
  }
1705
1740
  IModelDb.Models = Models;
1706
1741
  /** The collection of elements in an [[IModelDb]].
1707
- * @public
1742
+ * @public @preview
1708
1743
  */
1709
1744
  class Elements {
1710
1745
  _iModel;
1746
+ _elementCacheSize = 50;
1747
+ /** @internal */
1748
+ [Symbols_1._cache] = new ElementLRUCache_1.ElementLRUCache(this._elementCacheSize);
1711
1749
  /** @internal */
1712
- [Symbols_1._cache] = new ElementLRUCache_1.ElementLRUCache();
1750
+ [Symbols_1._instanceKeyCache] = new ElementLRUCache_1.InstanceKeyLRUCache(this._elementCacheSize);
1713
1751
  /** @internal */
1714
1752
  constructor(_iModel) {
1715
1753
  this._iModel = _iModel;
@@ -1759,7 +1797,16 @@ function processSchemaWriteStatus(status) {
1759
1797
  throw new core_common_1.IModelError(core_bentley_1.IModelStatus.InvalidId, "Element Id or FederationGuid or Code is required");
1760
1798
  }
1761
1799
  }
1762
- return this._iModel[Symbols_1._nativeDb].resolveInstanceKey(args);
1800
+ // Check the cache to avoid unnecessary native calls
1801
+ const cachedResult = this[Symbols_1._instanceKeyCache].get(args);
1802
+ if (cachedResult) {
1803
+ return cachedResult;
1804
+ }
1805
+ else {
1806
+ const instanceKey = this._iModel[Symbols_1._nativeDb].resolveInstanceKey(args);
1807
+ this[Symbols_1._instanceKeyCache].set(args, instanceKey);
1808
+ return instanceKey;
1809
+ }
1763
1810
  }
1764
1811
  /** Get properties of an Element by Id, FederationGuid, or Code
1765
1812
  * @returns The properties of the element or `undefined` if the element is not found.
@@ -1849,15 +1896,16 @@ function processSchemaWriteStatus(status) {
1849
1896
  throw new core_common_1.IModelError(core_bentley_1.IModelStatus.InvalidCodeSpec, "Invalid CodeSpec");
1850
1897
  if (code.value === undefined)
1851
1898
  throw new core_common_1.IModelError(core_bentley_1.IModelStatus.InvalidCode, "Invalid Code");
1852
- // eslint-disable-next-line @typescript-eslint/no-deprecated
1853
- return this._iModel.withPreparedStatement("SELECT ECInstanceId FROM BisCore:Element WHERE CodeSpec.Id=? AND CodeScope.Id=? AND CodeValue=?", (stmt) => {
1854
- stmt.bindId(1, code.spec);
1855
- stmt.bindId(2, core_bentley_1.Id64.fromString(code.scope));
1856
- stmt.bindString(3, code.value);
1857
- if (core_bentley_1.DbResult.BE_SQLITE_ROW !== stmt.step())
1899
+ const codeToQuery = new core_common_1.Code(code);
1900
+ try {
1901
+ const elementKey = this.resolveElementKey(codeToQuery);
1902
+ return core_bentley_1.Id64.fromString(elementKey.id);
1903
+ }
1904
+ catch (err) {
1905
+ if (err.errorNumber === core_bentley_1.IModelStatus.NotFound)
1858
1906
  return undefined;
1859
- return stmt.getValue(0).getId();
1860
- });
1907
+ throw err;
1908
+ }
1861
1909
  }
1862
1910
  /** Query for an [[Element]]'s last modified time.
1863
1911
  * @param elementId The Id of the element.
@@ -1881,7 +1929,7 @@ function processSchemaWriteStatus(status) {
1881
1929
  /** Insert a new element into the iModel.
1882
1930
  * @param elProps The properties of the new element.
1883
1931
  * @returns The newly inserted element's Id.
1884
- * @throws [[IModelError]] if unable to insert the element.
1932
+ * @throws [[ITwinError]] if unable to insert the element.
1885
1933
  * @note For convenience, the value of `elProps.id` is updated to reflect the resultant element's id.
1886
1934
  * However when `elProps.federationGuid` is not present or undefined, a new Guid will be generated and stored on the resultant element. But
1887
1935
  * the value of `elProps.federationGuid` is *not* updated. Generally, it is best to re-read the element after inserting (e.g. via [[getElementProps]])
@@ -1911,7 +1959,7 @@ function processSchemaWriteStatus(status) {
1911
1959
  * @param elProps the properties of the element to update.
1912
1960
  * @note The values of `classFullName` and `model` *may not be changed* by this method. Further, it will permute the `elProps` object by adding or
1913
1961
  * overwriting their values to the correct values.
1914
- * @throws [[IModelError]] if unable to update the element.
1962
+ * @throws [[ITwinError]] if unable to update the element.
1915
1963
  */
1916
1964
  updateElement(elProps) {
1917
1965
  try {
@@ -1930,7 +1978,7 @@ function processSchemaWriteStatus(status) {
1930
1978
  }
1931
1979
  /** Delete one or more elements from this iModel.
1932
1980
  * @param ids The set of Ids of the element(s) to be deleted
1933
- * @throws [[IModelError]]
1981
+ * @throws [[ITwinError]]
1934
1982
  * @see deleteDefinitionElements
1935
1983
  */
1936
1984
  deleteElement(ids) {
@@ -1938,6 +1986,7 @@ function processSchemaWriteStatus(status) {
1938
1986
  core_bentley_1.Id64.toIdSet(ids).forEach((id) => {
1939
1987
  try {
1940
1988
  this[Symbols_1._cache].delete({ id });
1989
+ this[Symbols_1._instanceKeyCache].deleteById(id);
1941
1990
  iModel[Symbols_1._nativeDb].deleteElement(id);
1942
1991
  }
1943
1992
  catch (err) {
@@ -2217,7 +2266,9 @@ function processSchemaWriteStatus(status) {
2217
2266
  return this._iModel[Symbols_1._nativeDb].insertElementAspect(aspectProps);
2218
2267
  }
2219
2268
  catch (err) {
2220
- throw new core_common_1.IModelError(err.errorNumber, `Error inserting ElementAspect [${err.message}], class: ${aspectProps.classFullName}`);
2269
+ const error = new core_common_1.IModelError(err.errorNumber, `Error inserting ElementAspect [${err.message}], class: ${aspectProps.classFullName}`, aspectProps);
2270
+ error.cause = err;
2271
+ throw error;
2221
2272
  }
2222
2273
  }
2223
2274
  /** Update an exist ElementAspect within the iModel.
@@ -2229,7 +2280,9 @@ function processSchemaWriteStatus(status) {
2229
2280
  this._iModel[Symbols_1._nativeDb].updateElementAspect(aspectProps);
2230
2281
  }
2231
2282
  catch (err) {
2232
- throw new core_common_1.IModelError(err.errorNumber, `Error updating ElementAspect [${err.message}], id: ${aspectProps.id}`);
2283
+ const error = new core_common_1.IModelError(err.errorNumber, `Error updating ElementAspect [${err.message}], id: ${aspectProps.id}`, aspectProps);
2284
+ error.cause = err;
2285
+ throw error;
2233
2286
  }
2234
2287
  }
2235
2288
  /** Delete one or more ElementAspects from this iModel.
@@ -2243,14 +2296,16 @@ function processSchemaWriteStatus(status) {
2243
2296
  iModel[Symbols_1._nativeDb].deleteElementAspect(aspectInstanceId);
2244
2297
  }
2245
2298
  catch (err) {
2246
- throw new core_common_1.IModelError(err.errorNumber, `Error deleting ElementAspect [${err.message}], id: ${aspectInstanceId}`);
2299
+ const error = new core_common_1.IModelError(err.errorNumber, `Error deleting ElementAspect [${err.message}], id: ${aspectInstanceId}`);
2300
+ error.cause = err;
2301
+ throw error;
2247
2302
  }
2248
2303
  });
2249
2304
  }
2250
2305
  }
2251
2306
  IModelDb.Elements = Elements;
2252
2307
  /** The collection of views in an [[IModelDb]].
2253
- * @public
2308
+ * @public @preview
2254
2309
  */
2255
2310
  class Views {
2256
2311
  _iModel;
@@ -2276,7 +2331,7 @@ function processSchemaWriteStatus(status) {
2276
2331
  if (undefined === props) {
2277
2332
  const propsString = this._iModel.queryFilePropertyString(Views.viewStoreProperty);
2278
2333
  if (!propsString)
2279
- throw new Error("iModel does not have a default ViewStore");
2334
+ core_common_1.ViewStoreError.throwError("no-viewstore", { message: "iModel does not have a default ViewStore" });
2280
2335
  props = JSON.parse(propsString);
2281
2336
  }
2282
2337
  const accessToken = await CloudSqlite_1.CloudSqlite.requestToken({
@@ -2397,7 +2452,7 @@ function processSchemaWriteStatus(status) {
2397
2452
  }
2398
2453
  getViewThumbnailArg(viewDefinitionId) {
2399
2454
  if (!core_bentley_1.Id64.isValid(viewDefinitionId))
2400
- throw new Error("illegal thumbnail id");
2455
+ throw new core_common_1.IModelError(core_bentley_1.IModelStatus.BadArg, "illegal thumbnail id");
2401
2456
  return { namespace: "dgn_View", name: "Thumbnail", id: viewDefinitionId };
2402
2457
  }
2403
2458
  /** Get the thumbnail for a view.
@@ -2426,7 +2481,7 @@ function processSchemaWriteStatus(status) {
2426
2481
  }
2427
2482
  /** Set the default view property the iModel.
2428
2483
  * @param viewId The Id of the ViewDefinition to use as the default
2429
- * @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
2484
+ * @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
2430
2485
  * that might wish to view the contents of the iModel.
2431
2486
  */
2432
2487
  setDefaultViewId(viewId) {
@@ -3105,6 +3160,10 @@ class SnapshotDb extends IModelDb {
3105
3160
  snapshotDb.channels.addAllowedChannel(ChannelControl_1.ChannelControl.sharedChannelName);
3106
3161
  if (options.createClassViews)
3107
3162
  snapshotDb._createClassViewsOnClose = true; // save flag that will be checked when close() is called
3163
+ if (options.geographicCoordinateSystem)
3164
+ snapshotDb.setGeographicCoordinateSystem(options.geographicCoordinateSystem);
3165
+ if (options.ecefLocation)
3166
+ snapshotDb.setEcefLocation(options.ecefLocation);
3108
3167
  return snapshotDb;
3109
3168
  }
3110
3169
  /** Create a local [Snapshot]($docs/learning/backend/AccessingIModels.md#snapshot-imodels) iModel file, using this iModel as a *seed* or starting point.
@@ -3260,6 +3319,10 @@ class StandaloneDb extends BriefcaseDb {
3260
3319
  nativeDb.resetBriefcaseId(core_common_1.BriefcaseIdValue.Unassigned);
3261
3320
  nativeDb.saveChanges();
3262
3321
  const db = new this({ nativeDb, key: core_bentley_1.Guid.createValue(), briefcaseId: core_common_1.BriefcaseIdValue.Unassigned, openMode: core_bentley_1.OpenMode.ReadWrite });
3322
+ if (args.geographicCoordinateSystem)
3323
+ db.setGeographicCoordinateSystem(args.geographicCoordinateSystem);
3324
+ if (args.ecefLocation)
3325
+ db.setEcefLocation(args.ecefLocation);
3263
3326
  db.channels.addAllowedChannel(ChannelControl_1.ChannelControl.sharedChannelName);
3264
3327
  return db;
3265
3328
  }