@itwin/core-common 5.0.0-dev.4 → 5.0.0-dev.40

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 (270) hide show
  1. package/CHANGELOG.md +35 -1
  2. package/lib/cjs/AmbientOcclusion.js +9 -9
  3. package/lib/cjs/AmbientOcclusion.js.map +1 -1
  4. package/lib/cjs/AnalysisStyle.js +1 -1
  5. package/lib/cjs/AnalysisStyle.js.map +1 -1
  6. package/lib/cjs/Atmosphere.js +19 -21
  7. package/lib/cjs/Atmosphere.js.map +1 -1
  8. package/lib/cjs/BriefcaseTypes.d.ts +2 -2
  9. package/lib/cjs/BriefcaseTypes.d.ts.map +1 -1
  10. package/lib/cjs/BriefcaseTypes.js.map +1 -1
  11. package/lib/cjs/ClipStyle.js +5 -5
  12. package/lib/cjs/ClipStyle.js.map +1 -1
  13. package/lib/cjs/ColorDef.js +10 -10
  14. package/lib/cjs/ColorDef.js.map +1 -1
  15. package/lib/cjs/ConcurrentQuery.d.ts +5 -1
  16. package/lib/cjs/ConcurrentQuery.d.ts.map +1 -1
  17. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  18. package/lib/cjs/ContourDisplay.js +5 -5
  19. package/lib/cjs/ContourDisplay.js.map +1 -1
  20. package/lib/cjs/ECSqlReader.d.ts.map +1 -1
  21. package/lib/cjs/ECSqlReader.js +3 -1
  22. package/lib/cjs/ECSqlReader.js.map +1 -1
  23. package/lib/cjs/ElementProps.d.ts.map +1 -1
  24. package/lib/cjs/ElementProps.js +3 -3
  25. package/lib/cjs/ElementProps.js.map +1 -1
  26. package/lib/cjs/Environment.js +2 -2
  27. package/lib/cjs/Environment.js.map +1 -1
  28. package/lib/cjs/FeatureSymbology.js +3 -3
  29. package/lib/cjs/FeatureSymbology.js.map +1 -1
  30. package/lib/cjs/Fonts.d.ts +69 -11
  31. package/lib/cjs/Fonts.d.ts.map +1 -1
  32. package/lib/cjs/Fonts.js +20 -5
  33. package/lib/cjs/Fonts.js.map +1 -1
  34. package/lib/cjs/Gradient.js +9 -9
  35. package/lib/cjs/Gradient.js.map +1 -1
  36. package/lib/cjs/GroundPlane.js +2 -2
  37. package/lib/cjs/GroundPlane.js.map +1 -1
  38. package/lib/cjs/HiddenLine.js +4 -4
  39. package/lib/cjs/HiddenLine.js.map +1 -1
  40. package/lib/cjs/IModel.d.ts +3 -12
  41. package/lib/cjs/IModel.d.ts.map +1 -1
  42. package/lib/cjs/IModel.js +6 -6
  43. package/lib/cjs/IModel.js.map +1 -1
  44. package/lib/cjs/IModelError.d.ts +0 -2
  45. package/lib/cjs/IModelError.d.ts.map +1 -1
  46. package/lib/cjs/IModelError.js +1 -8
  47. package/lib/cjs/IModelError.js.map +1 -1
  48. package/lib/cjs/ITwinError.d.ts +1 -1
  49. package/lib/cjs/ITwinError.d.ts.map +1 -1
  50. package/lib/cjs/ITwinError.js +1 -1
  51. package/lib/cjs/ITwinError.js.map +1 -1
  52. package/lib/cjs/LightSettings.js +1 -1
  53. package/lib/cjs/LightSettings.js.map +1 -1
  54. package/lib/cjs/PlanarClipMask.js +2 -2
  55. package/lib/cjs/PlanarClipMask.js.map +1 -1
  56. package/lib/cjs/RealityModelDisplaySettings.js +4 -4
  57. package/lib/cjs/RealityModelDisplaySettings.js.map +1 -1
  58. package/lib/cjs/RenderMaterial.js +3 -3
  59. package/lib/cjs/RenderMaterial.js.map +1 -1
  60. package/lib/cjs/RpcInterface.js +1 -1
  61. package/lib/cjs/RpcInterface.js.map +1 -1
  62. package/lib/cjs/SkyBox.js +4 -4
  63. package/lib/cjs/SkyBox.js.map +1 -1
  64. package/lib/cjs/SolarShadows.js +1 -1
  65. package/lib/cjs/SolarShadows.js.map +1 -1
  66. package/lib/cjs/SubCategoryAppearance.js +1 -1
  67. package/lib/cjs/SubCategoryAppearance.js.map +1 -1
  68. package/lib/cjs/SubCategoryOverride.js +2 -2
  69. package/lib/cjs/SubCategoryOverride.js.map +1 -1
  70. package/lib/cjs/TextureMapping.js +2 -2
  71. package/lib/cjs/TextureMapping.js.map +1 -1
  72. package/lib/cjs/ThematicDisplay.js +2 -2
  73. package/lib/cjs/ThematicDisplay.js.map +1 -1
  74. package/lib/cjs/ViewDetails.js +2 -2
  75. package/lib/cjs/ViewDetails.js.map +1 -1
  76. package/lib/cjs/ViewFlags.js +2 -2
  77. package/lib/cjs/ViewFlags.js.map +1 -1
  78. package/lib/cjs/WhiteOnWhiteReversalSettings.js +2 -2
  79. package/lib/cjs/WhiteOnWhiteReversalSettings.js.map +1 -1
  80. package/lib/cjs/annotation/TextStyle.js +19 -19
  81. package/lib/cjs/annotation/TextStyle.js.map +1 -1
  82. package/lib/cjs/core-common.d.ts +0 -1
  83. package/lib/cjs/core-common.d.ts.map +1 -1
  84. package/lib/cjs/core-common.js +0 -1
  85. package/lib/cjs/core-common.js.map +1 -1
  86. package/lib/cjs/geometry/Cartographic.js +13 -13
  87. package/lib/cjs/geometry/Cartographic.js.map +1 -1
  88. package/lib/cjs/ipc/IpcWebSocket.js +1 -1
  89. package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
  90. package/lib/cjs/ipc/IpcWebSocketTransport.js +1 -1
  91. package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
  92. package/lib/cjs/rpc/DevToolsRpcInterface.js +6 -6
  93. package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
  94. package/lib/cjs/rpc/IModelReadRpcInterface.js +5 -5
  95. package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
  96. package/lib/cjs/rpc/IModelTileRpcInterface.js +4 -4
  97. package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
  98. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js +4 -4
  99. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  100. package/lib/cjs/rpc/core/RpcConfiguration.js +32 -34
  101. package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
  102. package/lib/cjs/rpc/core/RpcControl.js +8 -15
  103. package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
  104. package/lib/cjs/rpc/core/RpcInvocation.js +3 -5
  105. package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
  106. package/lib/cjs/rpc/core/RpcMarshaling.d.ts +0 -3
  107. package/lib/cjs/rpc/core/RpcMarshaling.d.ts.map +1 -1
  108. package/lib/cjs/rpc/core/RpcMarshaling.js +5 -4
  109. package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
  110. package/lib/cjs/rpc/core/RpcOperation.js +2 -2
  111. package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
  112. package/lib/cjs/rpc/core/RpcProtocol.js +4 -4
  113. package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
  114. package/lib/cjs/rpc/core/RpcPush.js +5 -5
  115. package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
  116. package/lib/cjs/rpc/core/RpcRequest.js +5 -5
  117. package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
  118. package/lib/cjs/rpc/core/RpcRoutingToken.js +2 -2
  119. package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
  120. package/lib/cjs/rpc/core/RpcSessionInvocation.js +1 -1
  121. package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
  122. package/lib/cjs/rpc/web/BentleyCloudRpcManager.js +6 -6
  123. package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  124. package/lib/cjs/rpc/web/RpcMultipart.d.ts.map +1 -1
  125. package/lib/cjs/rpc/web/RpcMultipart.js +13 -12
  126. package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
  127. package/lib/cjs/rpc/web/WebAppRpcRequest.js +17 -19
  128. package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
  129. package/lib/cjs/tile/IModelTileIO.d.ts +2 -2
  130. package/lib/cjs/tile/IModelTileIO.js +3 -3
  131. package/lib/cjs/tile/IModelTileIO.js.map +1 -1
  132. package/lib/esm/AmbientOcclusion.js +9 -9
  133. package/lib/esm/AmbientOcclusion.js.map +1 -1
  134. package/lib/esm/AnalysisStyle.js +1 -1
  135. package/lib/esm/AnalysisStyle.js.map +1 -1
  136. package/lib/esm/Atmosphere.js +19 -21
  137. package/lib/esm/Atmosphere.js.map +1 -1
  138. package/lib/esm/BriefcaseTypes.d.ts +2 -2
  139. package/lib/esm/BriefcaseTypes.d.ts.map +1 -1
  140. package/lib/esm/BriefcaseTypes.js.map +1 -1
  141. package/lib/esm/ClipStyle.js +5 -5
  142. package/lib/esm/ClipStyle.js.map +1 -1
  143. package/lib/esm/ColorDef.js +10 -10
  144. package/lib/esm/ColorDef.js.map +1 -1
  145. package/lib/esm/ConcurrentQuery.d.ts +5 -1
  146. package/lib/esm/ConcurrentQuery.d.ts.map +1 -1
  147. package/lib/esm/ConcurrentQuery.js.map +1 -1
  148. package/lib/esm/ContourDisplay.js +5 -5
  149. package/lib/esm/ContourDisplay.js.map +1 -1
  150. package/lib/esm/ECSqlReader.d.ts.map +1 -1
  151. package/lib/esm/ECSqlReader.js +3 -1
  152. package/lib/esm/ECSqlReader.js.map +1 -1
  153. package/lib/esm/ElementProps.d.ts.map +1 -1
  154. package/lib/esm/ElementProps.js +4 -4
  155. package/lib/esm/ElementProps.js.map +1 -1
  156. package/lib/esm/Environment.js +2 -2
  157. package/lib/esm/Environment.js.map +1 -1
  158. package/lib/esm/FeatureSymbology.js +3 -3
  159. package/lib/esm/FeatureSymbology.js.map +1 -1
  160. package/lib/esm/Fonts.d.ts +69 -11
  161. package/lib/esm/Fonts.d.ts.map +1 -1
  162. package/lib/esm/Fonts.js +20 -5
  163. package/lib/esm/Fonts.js.map +1 -1
  164. package/lib/esm/Gradient.js +9 -9
  165. package/lib/esm/Gradient.js.map +1 -1
  166. package/lib/esm/GroundPlane.js +2 -2
  167. package/lib/esm/GroundPlane.js.map +1 -1
  168. package/lib/esm/HiddenLine.js +4 -4
  169. package/lib/esm/HiddenLine.js.map +1 -1
  170. package/lib/esm/IModel.d.ts +3 -12
  171. package/lib/esm/IModel.d.ts.map +1 -1
  172. package/lib/esm/IModel.js +6 -6
  173. package/lib/esm/IModel.js.map +1 -1
  174. package/lib/esm/IModelError.d.ts +0 -2
  175. package/lib/esm/IModelError.d.ts.map +1 -1
  176. package/lib/esm/IModelError.js +0 -1
  177. package/lib/esm/IModelError.js.map +1 -1
  178. package/lib/esm/ITwinError.d.ts +1 -1
  179. package/lib/esm/ITwinError.d.ts.map +1 -1
  180. package/lib/esm/ITwinError.js +1 -1
  181. package/lib/esm/ITwinError.js.map +1 -1
  182. package/lib/esm/LightSettings.js +1 -1
  183. package/lib/esm/LightSettings.js.map +1 -1
  184. package/lib/esm/PlanarClipMask.js +2 -2
  185. package/lib/esm/PlanarClipMask.js.map +1 -1
  186. package/lib/esm/RealityModelDisplaySettings.js +4 -4
  187. package/lib/esm/RealityModelDisplaySettings.js.map +1 -1
  188. package/lib/esm/RenderMaterial.js +3 -3
  189. package/lib/esm/RenderMaterial.js.map +1 -1
  190. package/lib/esm/RpcInterface.js +2 -2
  191. package/lib/esm/RpcInterface.js.map +1 -1
  192. package/lib/esm/SkyBox.js +4 -4
  193. package/lib/esm/SkyBox.js.map +1 -1
  194. package/lib/esm/SolarShadows.js +1 -1
  195. package/lib/esm/SolarShadows.js.map +1 -1
  196. package/lib/esm/SubCategoryAppearance.js +1 -1
  197. package/lib/esm/SubCategoryAppearance.js.map +1 -1
  198. package/lib/esm/SubCategoryOverride.js +2 -2
  199. package/lib/esm/SubCategoryOverride.js.map +1 -1
  200. package/lib/esm/TextureMapping.js +2 -2
  201. package/lib/esm/TextureMapping.js.map +1 -1
  202. package/lib/esm/ThematicDisplay.js +2 -2
  203. package/lib/esm/ThematicDisplay.js.map +1 -1
  204. package/lib/esm/ViewDetails.js +2 -2
  205. package/lib/esm/ViewDetails.js.map +1 -1
  206. package/lib/esm/ViewFlags.js +2 -2
  207. package/lib/esm/ViewFlags.js.map +1 -1
  208. package/lib/esm/WhiteOnWhiteReversalSettings.js +2 -2
  209. package/lib/esm/WhiteOnWhiteReversalSettings.js.map +1 -1
  210. package/lib/esm/annotation/TextStyle.js +19 -19
  211. package/lib/esm/annotation/TextStyle.js.map +1 -1
  212. package/lib/esm/core-common.d.ts +0 -1
  213. package/lib/esm/core-common.d.ts.map +1 -1
  214. package/lib/esm/core-common.js +0 -1
  215. package/lib/esm/core-common.js.map +1 -1
  216. package/lib/esm/geometry/Cartographic.js +13 -13
  217. package/lib/esm/geometry/Cartographic.js.map +1 -1
  218. package/lib/esm/ipc/IpcWebSocket.js +1 -1
  219. package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
  220. package/lib/esm/ipc/IpcWebSocketTransport.js +1 -1
  221. package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
  222. package/lib/esm/rpc/DevToolsRpcInterface.js +6 -6
  223. package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
  224. package/lib/esm/rpc/IModelReadRpcInterface.js +5 -5
  225. package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
  226. package/lib/esm/rpc/IModelTileRpcInterface.js +4 -4
  227. package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
  228. package/lib/esm/rpc/SnapshotIModelRpcInterface.js +4 -4
  229. package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  230. package/lib/esm/rpc/core/RpcConfiguration.js +32 -34
  231. package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
  232. package/lib/esm/rpc/core/RpcControl.js +8 -15
  233. package/lib/esm/rpc/core/RpcControl.js.map +1 -1
  234. package/lib/esm/rpc/core/RpcInvocation.js +3 -5
  235. package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
  236. package/lib/esm/rpc/core/RpcMarshaling.d.ts +0 -3
  237. package/lib/esm/rpc/core/RpcMarshaling.d.ts.map +1 -1
  238. package/lib/esm/rpc/core/RpcMarshaling.js +2 -1
  239. package/lib/esm/rpc/core/RpcMarshaling.js.map +1 -1
  240. package/lib/esm/rpc/core/RpcOperation.js +2 -2
  241. package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
  242. package/lib/esm/rpc/core/RpcProtocol.js +4 -4
  243. package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
  244. package/lib/esm/rpc/core/RpcPush.js +5 -5
  245. package/lib/esm/rpc/core/RpcPush.js.map +1 -1
  246. package/lib/esm/rpc/core/RpcRequest.js +5 -5
  247. package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
  248. package/lib/esm/rpc/core/RpcRoutingToken.js +2 -2
  249. package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
  250. package/lib/esm/rpc/core/RpcSessionInvocation.js +1 -1
  251. package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
  252. package/lib/esm/rpc/web/BentleyCloudRpcManager.js +6 -6
  253. package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  254. package/lib/esm/rpc/web/RpcMultipart.d.ts.map +1 -1
  255. package/lib/esm/rpc/web/RpcMultipart.js +14 -13
  256. package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
  257. package/lib/esm/rpc/web/WebAppRpcRequest.js +17 -19
  258. package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
  259. package/lib/esm/tile/IModelTileIO.d.ts +2 -2
  260. package/lib/esm/tile/IModelTileIO.js +3 -3
  261. package/lib/esm/tile/IModelTileIO.js.map +1 -1
  262. package/package.json +9 -9
  263. package/lib/cjs/rpc/WipRpcInterface.d.ts +0 -31
  264. package/lib/cjs/rpc/WipRpcInterface.d.ts.map +0 -1
  265. package/lib/cjs/rpc/WipRpcInterface.js +0 -42
  266. package/lib/cjs/rpc/WipRpcInterface.js.map +0 -1
  267. package/lib/esm/rpc/WipRpcInterface.d.ts +0 -31
  268. package/lib/esm/rpc/WipRpcInterface.d.ts.map +0 -1
  269. package/lib/esm/rpc/WipRpcInterface.js +0 -38
  270. package/lib/esm/rpc/WipR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;IAC1B,uDAAQ,CAAA;IACR,2DAAU,CAAA;IACV,6DAAW,CAAA;IACX,6DAAW,CAAA;IACX,iEAAa,CAAA;IACb,2DAAW,CAAA;IACX,qGAAsC,CAAA;IACtC,6FAAkC,CAAA;IAClC,uGAAuC,CAAA;IACvC,mGAAqC,CAAA;IACrC,+FAAmC,CAAA;IACnC,+FAAmC,CAAA;AACrC,CAAC,EAbW,gBAAgB,KAAhB,gBAAgB,QAa3B;AAED,gBAAgB;AAChB,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,6DAAc,CAAA;IACd,uDAAW,CAAA;AACb,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB;AA0CD,cAAc;AACd,MAAM,OAAO,YAAa,SAAQ,YAAY;IAC5C,YAAmC,QAAa,EAAkB,OAAa,EAAE,EAAa;QAC5F,KAAK,CAAC,EAAE,IAAI,QAAQ,CAAC,eAAe,EAAE,QAAQ,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC;QAD5C,aAAQ,GAAR,QAAQ,CAAK;QAAkB,YAAO,GAAP,OAAO,CAAM;IAE/E,CAAC;IACM,MAAM,CAAC,YAAY,CAAC,QAAa,EAAE,OAAa;QACrD,IAAK,QAAQ,CAAC,MAAiB,IAAK,gBAAgB,CAAC,KAAgB,EAAE,CAAC;YACtE,MAAM,IAAI,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC5C,CAAC;QACD,IAAI,QAAQ,CAAC,MAAM,KAAK,gBAAgB,CAAC,MAAM,EAAE,CAAC;YAChD,MAAM,IAAI,YAAY,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,CAAC,mBAAmB,CAAC,CAAC;QAC1E,CAAC;IACH,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module iModels\n */\nimport { BentleyError, CompressedId64Set, DbResult, Id64, Id64String, OrderedId64Iterable } from \"@itwin/core-bentley\";\nimport { Point2d, Point3d } from \"@itwin/core-geometry\";\nimport { Base64 } from \"js-base64\";\n\n/**\n * Specifies the format of the rows returned by the `query` and `restartQuery` methods of\n * [IModelConnection]($frontend), [IModelDb]($backend), and [ECDb]($backend).\n *\n * @public\n * @extensions\n */\nexport enum QueryRowFormat {\n /** Each row is an object in which each non-null column value can be accessed by its name as defined in the ECSql.\n * Null values are omitted.\n */\n UseECSqlPropertyNames,\n /** Each row is an array of values accessed by an index corresponding to the property's position in the ECSql SELECT statement.\n * Null values are included if they are followed by a non-null column, but trailing null values at the end of the array are omitted.\n */\n UseECSqlPropertyIndexes,\n /** Each row is an object in which each non-null column value can be accessed by a [remapped property name]($docs/learning/ECSqlRowFormat.md).\n * This format is backwards-compatible with the format produced by iTwin.js 2.x. Null values are omitted.\n */\n UseJsPropertyNames,\n}\n\n/**\n * Specify limit or range of rows to return\n * @public\n * @extensions\n * */\nexport interface QueryLimit {\n /** Number of rows to return */\n count?: number;\n /** Offset from which to return rows */\n offset?: number;\n}\n\n/** @public */\nexport interface QueryPropertyMetaData {\n /** The class name is set to empty if the property is a generated one, otherwise, it is the name of the ECClass that the property is contained within. */\n className: string;\n /** Access string is the property's alias if the property is a generated one, otherwise it is the ECSQL property path. */\n accessString?: string;\n /** True if the property is a generated one. False, if the property directly refers to one of the classes in the FROM or JOIN clauses.\n * Note: Using a column alias always generates a property. So in the ECSQL <c>SELECT AssetID, Length * Breadth AS Area FROM myschema.Cubicle</c> the first column (AssetID) would not be a generated property, but the second (Area) would be.\n */\n generated: boolean;\n /** The index of the property value if the result is formatted as an array */\n index: number;\n /** The JSON name is the property's alias if the property is a generated one, otherwise, it is the ECSQL property path for the system property.\n * The JSON names are unique and _%d is added for duplicate property JSON names to make them unique.\n */\n jsonName: string;\n /** The name is the property's alias if the property is a generated one, otherwise, it is the name of the property. */\n name: string;\n /** If this property is a PrimitiveECProperty, extend type is the extended type name of this property, if it is not defined locally will be inherited from base property if one exists, otherwise extended type is set to an empty string. */\n extendType: string;\n /** The type name is set to 'navigation' if the property is a navigation property, otherwise, it is the type name for the property. */\n typeName: string;\n}\n\n/** @beta */\nexport interface DbRuntimeStats {\n cpuTime: number;\n totalTime: number;\n timeLimit: number;\n memLimit: number;\n memUsed: number;\n}\n\n/**\n * Quota hint for the query.\n * @public\n * @extensions\n * */\nexport interface QueryQuota {\n /** Max time allowed in seconds. This is hint and may not be honoured but help in prioritize request */\n time?: number;\n /** Max memory allowed in bytes. This is hint and may not be honoured but help in prioritize request */\n memory?: number;\n}\n\n/**\n * Config for all request made to concurrent query engine.\n * @public\n * @extensions\n */\nexport interface BaseReaderOptions {\n /** Determine priority of this query default to 0, used as hint and can be overriden by backend. */\n priority?: number;\n /** If specified cancel last query (if any) with same restart token and queue the new query */\n restartToken?: string;\n /** For editing apps this can be set to true and all query will run on primary connection\n * his may cause slow queries execution but the most recent data changes will be visitable via query\n */\n usePrimaryConn?: boolean;\n /** Restrict time or memory for query but use as hint and may be changed base on backend settings */\n quota?: QueryQuota;\n /**\n * @internal\n * Allow query to be be deferred by milliseconds specified. This parameter is ignore by default unless\n * concurrent query is configure to honour it.\n */\n delay?: number;\n}\n\n/**\n * ECSql query config\n * @public\n * @extensions\n * */\nexport interface QueryOptions extends BaseReaderOptions {\n /**\n * default to false. It abbreviate blobs to single bytes. This help cases where wildcard is\n * used in select clause. Use BlobReader api to read individual blob specially if its of large size.\n * */\n abbreviateBlobs?: boolean;\n /**\n * default to false. It will suppress error and will not log it. Useful in cases where we expect query\n * can fail.\n */\n suppressLogErrors?: boolean;\n /** This is used internally. If true it query will return meta data about query. */\n includeMetaData?: boolean;\n /** Limit range of rows returned by query*/\n limit?: QueryLimit;\n /**\n * Convert ECClassId, SourceECClassId, TargetECClassId and RelClassId to respective name.\n * When true, XXXXClassId property will be returned as className.\n * */\n convertClassIdsToClassNames?: boolean;\n /**\n * Determine row format.\n */\n rowFormat?: QueryRowFormat;\n}\n/** @beta */\nexport type BlobRange = QueryLimit;\n\n/** @beta */\nexport interface BlobOptions extends BaseReaderOptions {\n range?: BlobRange;\n}\n\n/** @public */\nexport class QueryOptionsBuilder {\n public constructor(private _options: QueryOptions = {}) { }\n public getOptions(): QueryOptions { return this._options; }\n /**\n * @internal\n * Allow to set priority of query. Query will be inserted int queue base on priority value. This value will be ignored if concurrent query is configured with ignored priority is true.\n * @param val integer value which can be negative as well. By default its zero.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setPriority(val: number) {\n this._options.priority = val;\n return this;\n }\n /**\n * Allow to set restart token. If restart token is set then any other query(s) in queue with same token is cancelled if its not already executed.\n * @param val A string token identifying a use case in which previous query with same token is cancelled.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setRestartToken(val: string) {\n this._options.restartToken = val;\n return this;\n }\n /**\n * Allow to set quota restriction for query. Its a hint and may be overriden or ignored by concurrent query manager.\n * @param val @type QueryQuota Specify time and memory that can be used by a query.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setQuota(val: QueryQuota) {\n this._options.quota = val;\n return this;\n }\n /**\n * Force a query to be executed synchronously against primary connection. This option is ignored if provided by frontend.\n * @param val A boolean value to force use primary connection on main thread to execute query.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setUsePrimaryConnection(val: boolean) {\n this._options.usePrimaryConn = val;\n return this;\n }\n /**\n * By default all blobs are abbreviated to save memory and network bandwidth. If set to false, all blob data will be returned by query as is.\n * Use @type BlobReader to access blob data more efficiently.\n * @param val A boolean value, if set to false will return complete blob type property data. This could cost time and network bandwidth.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setAbbreviateBlobs(val: boolean) {\n this._options.abbreviateBlobs = val;\n return this;\n }\n /**\n * When query fail to prepare it will log error. This setting will suppress log errors in case where query come from user typing it and its expected to fail often.\n * @param val A boolean value, if set to true, any error logging will be suppressed.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setSuppressLogErrors(val: boolean) {\n this._options.suppressLogErrors = val;\n return this;\n }\n /**\n * If set ECClassId, SourceECClassId and TargetECClassId system properties will return qualified name of class instead of a @typedef Id64String.\n * @param val A boolean value.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setConvertClassIdsToNames(val: boolean) {\n this._options.convertClassIdsToClassNames = val;\n return this;\n }\n /**\n * Specify limit for query. Limit determine number of rows and offset in result-set.\n * @param val Specify count and offset from within the result-set of a ECSQL query.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setLimit(val: QueryLimit) {\n this._options.limit = val;\n return this;\n }\n /**\n * Specify row format returned by concurrent query manager.\n * @param val @enum QueryRowFormat specifying format for result.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setRowFormat(val: QueryRowFormat) {\n this._options.rowFormat = val;\n return this;\n }\n /**\n * @internal\n * Defers execution of query in queue by specified milliseconds. This parameter is ignored by default unless concurrent query is configure to not ignore it.\n * @param val Number of milliseconds.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setDelay(val: number) {\n this._options.delay = val;\n return this;\n }\n}\n/** @beta */\nexport class BlobOptionsBuilder {\n public constructor(private _options: BlobOptions = {}) { }\n public getOptions(): BlobOptions { return this._options; }\n /**\n * @internal\n * Allow to set priority of blob request. Blob request will be inserted int queue base on priority value. This value will be ignored if concurrent query is configured with ignored priority is true.\n * @param val integer value which can be negative as well. By default its zero.\n * @returns @type BlobOptionsBuilder for fluent interface.\n */\n public setPriority(val: number) {\n this._options.priority = val;\n return this;\n }\n /**\n * Allow to set restart token. If restart token is set then any other blob request in queue with same token is cancelled if its not already executed.\n * @param val A string token identifying a use case in which previous blob request with same token is cancelled.\n * @returns @type BlobOptionsBuilder for fluent interface.\n */\n public setRestartToken(val: string) {\n this._options.restartToken = val;\n return this;\n }\n /**\n * Allow to set quota restriction for blob request. Its a hint and may be overriden or ignored by concurrent query manager.\n * @param val @type QueryQuota Specify time and memory that can be used by a query.\n * @returns @type BlobOptionsBuilder for fluent interface.\n */\n public setQuota(val: QueryQuota) {\n this._options.quota = val;\n return this;\n }\n /**\n * Force a blob request to be executed synchronously against primary connection. This option is ignored if provided by frontend.\n * @param val A boolean value to force use primary connection on main thread to execute blob request.\n * @returns @type BlobOptionsBuilder for fluent interface.\n */\n public setUsePrimaryConnection(val: boolean) {\n this._options.usePrimaryConn = val;\n return this;\n }\n /**\n * Specify range with in the blob that need to be returned.\n * @param val Specify offset and count of bytes that need to be returned.\n * @returns @type BlobOptionsBuilder for fluent interface.\n */\n public setRange(val: BlobRange) {\n this._options.range = val;\n return this;\n }\n /**\n * @internal\n * Defers execution of blob request in queue by specified milliseconds. This parameter is ignored by default unless concurrent query is configure to not ignore it.\n * @param val Number of milliseconds.\n * @returns @type BlobOptionsBuilder for fluent interface.\n */\n public setDelay(val: number) {\n this._options.delay = val;\n return this;\n }\n}\n\n/** @internal */\nexport enum QueryParamType {\n Boolean = 0,\n Double = 1,\n Id = 2,\n IdSet = 3,\n Integer = 4,\n Long = 5,\n Null = 6,\n // eslint-disable-next-line @typescript-eslint/no-shadow\n Point2d = 7,\n // eslint-disable-next-line @typescript-eslint/no-shadow\n Point3d = 8,\n String = 9,\n Blob = 10,\n Struct = 11,\n}\n\n/**\n * Bind values to an ECSQL query.\n *\n * All binding class methods accept an `indexOrName` parameter as a `string | number` type and a value to bind to it.\n * A binding must be mapped either by a positional index or a string/name. See the examples below.\n *\n * @example\n * Parameter By Index:\n * ```sql\n * SELECT a, v FROM test.Foo WHERE a=? AND b=?\n * ```\n * The first `?` is index 1 and the second `?` is index 2. The parameter index starts with 1 and not 0.\n *\n * @example\n * Parameter By Name:\n * ```sql\n * SELECT a, v FROM test.Foo WHERE a=:name_a AND b=:name_b\n * ```\n * Using \"name_a\" as the `indexOrName` will bind the provided value to `name_a` in the query. And the same goes for\n * using \"name_b\" and the `name_b` binding respectively.\n *\n * @see\n * - [ECSQL Parameters]($docs/learning/ECSQL.md#ecsql-parameters)\n * - [ECSQL Parameter Types]($docs/learning/ECSQLParameterTypes)\n * - [ECSQL Code Examples]($docs/learning/backend/ECSQLCodeExamples#parameter-bindings)\n *\n * @public\n */\nexport class QueryBinder {\n private _args = {};\n private verify(indexOrName: string | number) {\n if (typeof indexOrName === \"number\") {\n if (indexOrName < 1)\n throw new Error(\"expect index to be >= 1\");\n return;\n }\n if (!/^[a-zA-Z_]+\\w*$/i.test(indexOrName)) {\n throw new Error(\"expect named parameter to meet identifier specification\");\n }\n }\n\n /**\n * Bind boolean value to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val Boolean value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindBoolean(indexOrName: string | number, val: boolean) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true,\n value: {\n type: QueryParamType.Boolean,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind blob value to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val Blob value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindBlob(indexOrName: string | number, val: Uint8Array) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n const base64 = Base64.fromUint8Array(val);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Blob,\n value: base64,\n },\n });\n return this;\n }\n\n /**\n * Bind double value to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val Double value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindDouble(indexOrName: string | number, val: number) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Double,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind @typedef Id64String value to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val @typedef Id64String value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindId(indexOrName: string | number, val: Id64String) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Id,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind @type OrderedId64Iterable to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val @type OrderedId64Iterable value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindIdSet(indexOrName: string | number, val: OrderedId64Iterable) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n OrderedId64Iterable.uniqueIterator(val);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.IdSet,\n value: CompressedId64Set.sortAndCompress(OrderedId64Iterable.uniqueIterator(val)),\n },\n });\n return this;\n }\n\n /**\n * Bind integer to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val Integer value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindInt(indexOrName: string | number, val: number) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Integer,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind struct to ECSQL statement. Struct specified as object.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val struct value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindStruct(indexOrName: string | number, val: object) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Struct,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind long to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val Long value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindLong(indexOrName: string | number, val: number) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Long,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind string to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val String value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindString(indexOrName: string | number, val: string) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.String,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind null to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindNull(indexOrName: string | number) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Null,\n value: null,\n },\n });\n return this;\n }\n\n /**\n * Bind @type Point2d to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val @type Point2d value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindPoint2d(indexOrName: string | number, val: Point2d) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Point2d,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind @type Point3d to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val @type Point3d value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindPoint3d(indexOrName: string | number, val: Point3d) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Point3d,\n value: val,\n },\n });\n return this;\n }\n\n private static bind(params: QueryBinder, nameOrId: string | number, val: any) {\n if (typeof val === \"boolean\") {\n params.bindBoolean(nameOrId, val);\n } else if (typeof val === \"number\") {\n params.bindDouble(nameOrId, val);\n } else if (typeof val === \"string\") {\n params.bindString(nameOrId, val);\n } else if (val instanceof Uint8Array) {\n params.bindBlob(nameOrId, val);\n } else if (val instanceof Point2d) {\n params.bindPoint2d(nameOrId, val);\n } else if (val instanceof Point3d) {\n params.bindPoint3d(nameOrId, val);\n } else if (val instanceof Array && val.length > 0 && typeof val[0] === \"string\" && Id64.isValidId64(val[0])) {\n params.bindIdSet(nameOrId, val);\n } else if (typeof val === \"undefined\" || val === null) {\n params.bindNull(nameOrId);\n } else if (typeof val === \"object\" && !Array.isArray(val)) {\n params.bindStruct(nameOrId, val);\n } else {\n throw new Error(\"unsupported type\");\n }\n }\n\n /**\n * Allow bulk bind either parameters by index as value array or by parameter names as object.\n * @param args if array of values is provided then array index is used as index. If object is provided then object property name is used as parameter name of reach value.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public static from(args: any[] | object | undefined): QueryBinder {\n const params = new QueryBinder();\n if (typeof args === \"undefined\")\n return params;\n\n if (Array.isArray(args)) {\n let i = 1;\n for (const val of args) {\n this.bind(params, i++, val);\n }\n } else {\n for (const prop of Object.getOwnPropertyNames(args)) {\n this.bind(params, prop, (args as any)[prop]);\n }\n }\n return params;\n }\n\n public serialize(): object {\n return this._args;\n }\n}\n\n/** @internal */\nexport enum DbRequestKind {\n BlobIO = 0,\n ECSql = 1\n}\n\n/** @internal */\nexport enum DbResponseKind {\n BlobIO = DbRequestKind.BlobIO,\n ECSql = DbRequestKind.ECSql,\n NoResult = 2\n}\n\n/** @internal */\nexport enum DbResponseStatus {\n Done = 1, /* query ran to completion. */\n Cancel = 2, /* Requested by user.*/\n Partial = 3, /* query was running but ran out of quota.*/\n Timeout = 4, /* query time quota expired while it was in queue.*/\n QueueFull = 5, /* could not submit the query as queue was full.*/\n Error = 100, /* generic error*/\n Error_ECSql_PreparedFailed = Error + 1, /* ecsql prepared failed*/\n Error_ECSql_StepFailed = Error + 2, /* ecsql step failed*/\n Error_ECSql_RowToJsonFailed = Error + 3, /* ecsql failed to serialized row to json.*/\n Error_ECSql_BindingFailed = Error + 4, /* ecsql binding failed.*/\n Error_BlobIO_OpenFailed = Error + 5, /* class or property or instance specified was not found or property as not of type blob.*/\n Error_BlobIO_OutOfRange = Error + 6, /* range specified is invalid based on size of blob.*/\n}\n\n/** @internal */\nexport enum DbValueFormat {\n ECSqlNames = 0,\n JsNames = 1\n}\n\n/** @internal */\nexport interface DbRequest extends BaseReaderOptions {\n kind?: DbRequestKind;\n}\n\n/** @internal */\nexport interface DbQueryRequest extends DbRequest, QueryOptions {\n valueFormat?: DbValueFormat;\n query: string;\n args?: object;\n}\n\n/** @internal */\nexport interface DbBlobRequest extends DbRequest, BlobOptions {\n className: string;\n accessString: string;\n instanceId: Id64String;\n}\n\n/** @internal */\nexport interface DbResponse {\n stats: DbRuntimeStats;\n status: DbResponseStatus;\n kind: DbResponseKind;\n error?: string;\n}\n\n/** @internal */\nexport interface DbQueryResponse extends DbResponse {\n meta: QueryPropertyMetaData[];\n data: any[];\n rowCount: number;\n}\n\n/** @internal */\nexport interface DbBlobResponse extends DbResponse {\n data?: Uint8Array;\n rawBlobSize: number;\n}\n\n/** @public */\nexport class DbQueryError extends BentleyError {\n public constructor(public readonly response: any, public readonly request?: any, rc?: DbResult) {\n super(rc ?? DbResult.BE_SQLITE_ERROR, response.error, { response, request });\n }\n public static throwIfError(response: any, request?: any) {\n if ((response.status as number) >= (DbResponseStatus.Error as number)) {\n throw new DbQueryError(response, request);\n }\n if (response.status === DbResponseStatus.Cancel) {\n throw new DbQueryError(response, request, DbResult.BE_SQLITE_INTERRUPT);\n }\n }\n}\n\n/** @internal */\nexport interface DbRequestExecutor<TRequest extends DbRequest, TResponse extends DbResponse> {\n execute(request: TRequest): Promise<TResponse>;\n}\n\n/** @internal */\nexport interface DbQueryConfig {\n globalQuota?: QueryQuota;\n ignoreDelay?: boolean;\n ignorePriority?: boolean;\n requestQueueSize?: number;\n workerThreads?: number;\n}\n"]}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AAU,CAAA;IACV,6DAAW,CAAA;IACX,6DAAW,CAAA;IACX,iEAAa,CAAA;IACb,2DAAW,CAAA;IACX,qGAAsC,CAAA;IACtC,6FAAkC,CAAA;IAClC,uGAAuC,CAAA;IACvC,mGAAqC,CAAA;IACrC,+FAAmC,CAAA;IACnC,+FAAmC,CAAA;AACrC,CAAC,EAbW,gBAAgB,KAAhB,gBAAgB,QAa3B;AAED,gBAAgB;AAChB,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,6DAAc,CAAA;IACd,uDAAW,CAAA;AACb,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB;AA0CD,cAAc;AACd,MAAM,OAAO,YAAa,SAAQ,YAAY;IAC5C,YAAmC,QAAa,EAAkB,OAAa,EAAE,EAAa;QAC5F,KAAK,CAAC,EAAE,IAAI,QAAQ,CAAC,eAAe,EAAE,QAAQ,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC;QAD5C,aAAQ,GAAR,QAAQ,CAAK;QAAkB,YAAO,GAAP,OAAO,CAAM;IAE/E,CAAC;IACM,MAAM,CAAC,YAAY,CAAC,QAAa,EAAE,OAAa;QACrD,IAAK,QAAQ,CAAC,MAAiB,IAAK,gBAAgB,CAAC,KAAgB,EAAE,CAAC;YACtE,MAAM,IAAI,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC5C,CAAC;QACD,IAAI,QAAQ,CAAC,MAAM,KAAK,gBAAgB,CAAC,MAAM,EAAE,CAAC;YAChD,MAAM,IAAI,YAAY,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,CAAC,mBAAmB,CAAC,CAAC;QAC1E,CAAC;IACH,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module iModels\n */\nimport { BentleyError, CompressedId64Set, DbResult, Id64, Id64String, OrderedId64Iterable } from \"@itwin/core-bentley\";\nimport { Point2d, Point3d } from \"@itwin/core-geometry\";\nimport { Base64 } from \"js-base64\";\n\n/**\n * Specifies the format of the rows returned by the `query` and `restartQuery` methods of\n * [IModelConnection]($frontend), [IModelDb]($backend), and [ECDb]($backend).\n *\n * @public\n * @extensions\n */\nexport enum QueryRowFormat {\n /** Each row is an object in which each non-null column value can be accessed by its name as defined in the ECSql.\n * Null values are omitted.\n */\n UseECSqlPropertyNames,\n /** Each row is an array of values accessed by an index corresponding to the property's position in the ECSql SELECT statement.\n * Null values are included if they are followed by a non-null column, but trailing null values at the end of the array are omitted.\n */\n UseECSqlPropertyIndexes,\n /** Each row is an object in which each non-null column value can be accessed by a [remapped property name]($docs/learning/ECSqlRowFormat.md).\n * This format is backwards-compatible with the format produced by iTwin.js 2.x. Null values are omitted.\n */\n UseJsPropertyNames,\n}\n\n/**\n * Specify limit or range of rows to return\n * @public\n * @extensions\n * */\nexport interface QueryLimit {\n /** Number of rows to return */\n count?: number;\n /** Offset from which to return rows */\n offset?: number;\n}\n\n/** @public */\nexport interface QueryPropertyMetaData {\n /** The class name is set to empty if the property is a generated one, otherwise, it is the name of the ECClass that the property is contained within. */\n className: string;\n /** Access string is the property's alias if the property is a generated one, otherwise it is the ECSQL property path. */\n accessString?: string;\n /** True if the property is a generated one. False, if the property directly refers to one of the classes in the FROM or JOIN clauses.\n * Note: Using a column alias always generates a property. So in the ECSQL <c>SELECT AssetID, Length * Breadth AS Area FROM myschema.Cubicle</c> the first column (AssetID) would not be a generated property, but the second (Area) would be.\n */\n generated: boolean;\n /** The index of the property value if the result is formatted as an array */\n index: number;\n /** The JSON name is the property's alias if the property is a generated one, otherwise, it is the ECSQL property path for the system property.\n * The JSON names are unique and _%d is added for duplicate property JSON names to make them unique.\n */\n jsonName: string;\n /** The name is the property's alias if the property is a generated one, otherwise, it is the name of the property. */\n name: string;\n /** If this property is a PrimitiveECProperty, extend type is the extended type name of this property, if it is not defined locally will be inherited from base property if one exists, otherwise extend type is set to an empty string.\n * @deprecated in 4.11 Use extendedType instead\n */\n extendType: string;\n /** If this property is a PrimitiveECProperty, extended type is the extended type name of this property, if it is not defined locally will be inherited from base property if one exists, otherwise extended type will be undefined. */\n extendedType?: string;\n /** The type name is set to 'navigation' if the property is a navigation property, otherwise, it is the type name for the property. */\n typeName: string;\n}\n\n/** @beta */\nexport interface DbRuntimeStats {\n cpuTime: number;\n totalTime: number;\n timeLimit: number;\n memLimit: number;\n memUsed: number;\n}\n\n/**\n * Quota hint for the query.\n * @public\n * @extensions\n * */\nexport interface QueryQuota {\n /** Max time allowed in seconds. This is hint and may not be honoured but help in prioritize request */\n time?: number;\n /** Max memory allowed in bytes. This is hint and may not be honoured but help in prioritize request */\n memory?: number;\n}\n\n/**\n * Config for all request made to concurrent query engine.\n * @public\n * @extensions\n */\nexport interface BaseReaderOptions {\n /** Determine priority of this query default to 0, used as hint and can be overriden by backend. */\n priority?: number;\n /** If specified cancel last query (if any) with same restart token and queue the new query */\n restartToken?: string;\n /** For editing apps this can be set to true and all query will run on primary connection\n * his may cause slow queries execution but the most recent data changes will be visitable via query\n */\n usePrimaryConn?: boolean;\n /** Restrict time or memory for query but use as hint and may be changed base on backend settings */\n quota?: QueryQuota;\n /**\n * @internal\n * Allow query to be be deferred by milliseconds specified. This parameter is ignore by default unless\n * concurrent query is configure to honour it.\n */\n delay?: number;\n}\n\n/**\n * ECSql query config\n * @public\n * @extensions\n * */\nexport interface QueryOptions extends BaseReaderOptions {\n /**\n * default to false. It abbreviate blobs to single bytes. This help cases where wildcard is\n * used in select clause. Use BlobReader api to read individual blob specially if its of large size.\n * */\n abbreviateBlobs?: boolean;\n /**\n * default to false. It will suppress error and will not log it. Useful in cases where we expect query\n * can fail.\n */\n suppressLogErrors?: boolean;\n /** This is used internally. If true it query will return meta data about query. */\n includeMetaData?: boolean;\n /** Limit range of rows returned by query*/\n limit?: QueryLimit;\n /**\n * Convert ECClassId, SourceECClassId, TargetECClassId and RelClassId to respective name.\n * When true, XXXXClassId property will be returned as className.\n * */\n convertClassIdsToClassNames?: boolean;\n /**\n * Determine row format.\n */\n rowFormat?: QueryRowFormat;\n}\n/** @beta */\nexport type BlobRange = QueryLimit;\n\n/** @beta */\nexport interface BlobOptions extends BaseReaderOptions {\n range?: BlobRange;\n}\n\n/** @public */\nexport class QueryOptionsBuilder {\n public constructor(private _options: QueryOptions = {}) { }\n public getOptions(): QueryOptions { return this._options; }\n /**\n * @internal\n * Allow to set priority of query. Query will be inserted int queue base on priority value. This value will be ignored if concurrent query is configured with ignored priority is true.\n * @param val integer value which can be negative as well. By default its zero.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setPriority(val: number) {\n this._options.priority = val;\n return this;\n }\n /**\n * Allow to set restart token. If restart token is set then any other query(s) in queue with same token is cancelled if its not already executed.\n * @param val A string token identifying a use case in which previous query with same token is cancelled.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setRestartToken(val: string) {\n this._options.restartToken = val;\n return this;\n }\n /**\n * Allow to set quota restriction for query. Its a hint and may be overriden or ignored by concurrent query manager.\n * @param val @type QueryQuota Specify time and memory that can be used by a query.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setQuota(val: QueryQuota) {\n this._options.quota = val;\n return this;\n }\n /**\n * Force a query to be executed synchronously against primary connection. This option is ignored if provided by frontend.\n * @param val A boolean value to force use primary connection on main thread to execute query.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setUsePrimaryConnection(val: boolean) {\n this._options.usePrimaryConn = val;\n return this;\n }\n /**\n * By default all blobs are abbreviated to save memory and network bandwidth. If set to false, all blob data will be returned by query as is.\n * Use @type BlobReader to access blob data more efficiently.\n * @param val A boolean value, if set to false will return complete blob type property data. This could cost time and network bandwidth.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setAbbreviateBlobs(val: boolean) {\n this._options.abbreviateBlobs = val;\n return this;\n }\n /**\n * When query fail to prepare it will log error. This setting will suppress log errors in case where query come from user typing it and its expected to fail often.\n * @param val A boolean value, if set to true, any error logging will be suppressed.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setSuppressLogErrors(val: boolean) {\n this._options.suppressLogErrors = val;\n return this;\n }\n /**\n * If set ECClassId, SourceECClassId and TargetECClassId system properties will return qualified name of class instead of a @typedef Id64String.\n * @param val A boolean value.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setConvertClassIdsToNames(val: boolean) {\n this._options.convertClassIdsToClassNames = val;\n return this;\n }\n /**\n * Specify limit for query. Limit determine number of rows and offset in result-set.\n * @param val Specify count and offset from within the result-set of a ECSQL query.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setLimit(val: QueryLimit) {\n this._options.limit = val;\n return this;\n }\n /**\n * Specify row format returned by concurrent query manager.\n * @param val @enum QueryRowFormat specifying format for result.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setRowFormat(val: QueryRowFormat) {\n this._options.rowFormat = val;\n return this;\n }\n /**\n * @internal\n * Defers execution of query in queue by specified milliseconds. This parameter is ignored by default unless concurrent query is configure to not ignore it.\n * @param val Number of milliseconds.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setDelay(val: number) {\n this._options.delay = val;\n return this;\n }\n}\n/** @beta */\nexport class BlobOptionsBuilder {\n public constructor(private _options: BlobOptions = {}) { }\n public getOptions(): BlobOptions { return this._options; }\n /**\n * @internal\n * Allow to set priority of blob request. Blob request will be inserted int queue base on priority value. This value will be ignored if concurrent query is configured with ignored priority is true.\n * @param val integer value which can be negative as well. By default its zero.\n * @returns @type BlobOptionsBuilder for fluent interface.\n */\n public setPriority(val: number) {\n this._options.priority = val;\n return this;\n }\n /**\n * Allow to set restart token. If restart token is set then any other blob request in queue with same token is cancelled if its not already executed.\n * @param val A string token identifying a use case in which previous blob request with same token is cancelled.\n * @returns @type BlobOptionsBuilder for fluent interface.\n */\n public setRestartToken(val: string) {\n this._options.restartToken = val;\n return this;\n }\n /**\n * Allow to set quota restriction for blob request. Its a hint and may be overriden or ignored by concurrent query manager.\n * @param val @type QueryQuota Specify time and memory that can be used by a query.\n * @returns @type BlobOptionsBuilder for fluent interface.\n */\n public setQuota(val: QueryQuota) {\n this._options.quota = val;\n return this;\n }\n /**\n * Force a blob request to be executed synchronously against primary connection. This option is ignored if provided by frontend.\n * @param val A boolean value to force use primary connection on main thread to execute blob request.\n * @returns @type BlobOptionsBuilder for fluent interface.\n */\n public setUsePrimaryConnection(val: boolean) {\n this._options.usePrimaryConn = val;\n return this;\n }\n /**\n * Specify range with in the blob that need to be returned.\n * @param val Specify offset and count of bytes that need to be returned.\n * @returns @type BlobOptionsBuilder for fluent interface.\n */\n public setRange(val: BlobRange) {\n this._options.range = val;\n return this;\n }\n /**\n * @internal\n * Defers execution of blob request in queue by specified milliseconds. This parameter is ignored by default unless concurrent query is configure to not ignore it.\n * @param val Number of milliseconds.\n * @returns @type BlobOptionsBuilder for fluent interface.\n */\n public setDelay(val: number) {\n this._options.delay = val;\n return this;\n }\n}\n\n/** @internal */\nexport enum QueryParamType {\n Boolean = 0,\n Double = 1,\n Id = 2,\n IdSet = 3,\n Integer = 4,\n Long = 5,\n Null = 6,\n // eslint-disable-next-line @typescript-eslint/no-shadow\n Point2d = 7,\n // eslint-disable-next-line @typescript-eslint/no-shadow\n Point3d = 8,\n String = 9,\n Blob = 10,\n Struct = 11,\n}\n\n/**\n * Bind values to an ECSQL query.\n *\n * All binding class methods accept an `indexOrName` parameter as a `string | number` type and a value to bind to it.\n * A binding must be mapped either by a positional index or a string/name. See the examples below.\n *\n * @example\n * Parameter By Index:\n * ```sql\n * SELECT a, v FROM test.Foo WHERE a=? AND b=?\n * ```\n * The first `?` is index 1 and the second `?` is index 2. The parameter index starts with 1 and not 0.\n *\n * @example\n * Parameter By Name:\n * ```sql\n * SELECT a, v FROM test.Foo WHERE a=:name_a AND b=:name_b\n * ```\n * Using \"name_a\" as the `indexOrName` will bind the provided value to `name_a` in the query. And the same goes for\n * using \"name_b\" and the `name_b` binding respectively.\n *\n * @see\n * - [ECSQL Parameters]($docs/learning/ECSQL.md#ecsql-parameters)\n * - [ECSQL Parameter Types]($docs/learning/ECSQLParameterTypes)\n * - [ECSQL Code Examples]($docs/learning/backend/ECSQLCodeExamples#parameter-bindings)\n *\n * @public\n */\nexport class QueryBinder {\n private _args = {};\n private verify(indexOrName: string | number) {\n if (typeof indexOrName === \"number\") {\n if (indexOrName < 1)\n throw new Error(\"expect index to be >= 1\");\n return;\n }\n if (!/^[a-zA-Z_]+\\w*$/i.test(indexOrName)) {\n throw new Error(\"expect named parameter to meet identifier specification\");\n }\n }\n\n /**\n * Bind boolean value to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val Boolean value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindBoolean(indexOrName: string | number, val: boolean) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true,\n value: {\n type: QueryParamType.Boolean,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind blob value to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val Blob value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindBlob(indexOrName: string | number, val: Uint8Array) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n const base64 = Base64.fromUint8Array(val);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Blob,\n value: base64,\n },\n });\n return this;\n }\n\n /**\n * Bind double value to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val Double value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindDouble(indexOrName: string | number, val: number) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Double,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind @typedef Id64String value to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val @typedef Id64String value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindId(indexOrName: string | number, val: Id64String) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Id,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind @type OrderedId64Iterable to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val @type OrderedId64Iterable value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindIdSet(indexOrName: string | number, val: OrderedId64Iterable) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n OrderedId64Iterable.uniqueIterator(val);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.IdSet,\n value: CompressedId64Set.sortAndCompress(OrderedId64Iterable.uniqueIterator(val)),\n },\n });\n return this;\n }\n\n /**\n * Bind integer to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val Integer value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindInt(indexOrName: string | number, val: number) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Integer,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind struct to ECSQL statement. Struct specified as object.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val struct value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindStruct(indexOrName: string | number, val: object) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Struct,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind long to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val Long value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindLong(indexOrName: string | number, val: number) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Long,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind string to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val String value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindString(indexOrName: string | number, val: string) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.String,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind null to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindNull(indexOrName: string | number) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Null,\n value: null,\n },\n });\n return this;\n }\n\n /**\n * Bind @type Point2d to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val @type Point2d value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindPoint2d(indexOrName: string | number, val: Point2d) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Point2d,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind @type Point3d to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val @type Point3d value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindPoint3d(indexOrName: string | number, val: Point3d) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Point3d,\n value: val,\n },\n });\n return this;\n }\n\n private static bind(params: QueryBinder, nameOrId: string | number, val: any) {\n if (typeof val === \"boolean\") {\n params.bindBoolean(nameOrId, val);\n } else if (typeof val === \"number\") {\n params.bindDouble(nameOrId, val);\n } else if (typeof val === \"string\") {\n params.bindString(nameOrId, val);\n } else if (val instanceof Uint8Array) {\n params.bindBlob(nameOrId, val);\n } else if (val instanceof Point2d) {\n params.bindPoint2d(nameOrId, val);\n } else if (val instanceof Point3d) {\n params.bindPoint3d(nameOrId, val);\n } else if (val instanceof Array && val.length > 0 && typeof val[0] === \"string\" && Id64.isValidId64(val[0])) {\n params.bindIdSet(nameOrId, val);\n } else if (typeof val === \"undefined\" || val === null) {\n params.bindNull(nameOrId);\n } else if (typeof val === \"object\" && !Array.isArray(val)) {\n params.bindStruct(nameOrId, val);\n } else {\n throw new Error(\"unsupported type\");\n }\n }\n\n /**\n * Allow bulk bind either parameters by index as value array or by parameter names as object.\n * @param args if array of values is provided then array index is used as index. If object is provided then object property name is used as parameter name of reach value.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public static from(args: any[] | object | undefined): QueryBinder {\n const params = new QueryBinder();\n if (typeof args === \"undefined\")\n return params;\n\n if (Array.isArray(args)) {\n let i = 1;\n for (const val of args) {\n this.bind(params, i++, val);\n }\n } else {\n for (const prop of Object.getOwnPropertyNames(args)) {\n this.bind(params, prop, (args as any)[prop]);\n }\n }\n return params;\n }\n\n public serialize(): object {\n return this._args;\n }\n}\n\n/** @internal */\nexport enum DbRequestKind {\n BlobIO = 0,\n ECSql = 1\n}\n\n/** @internal */\nexport enum DbResponseKind {\n BlobIO = DbRequestKind.BlobIO,\n ECSql = DbRequestKind.ECSql,\n NoResult = 2\n}\n\n/** @internal */\nexport enum DbResponseStatus {\n Done = 1, /* query ran to completion. */\n Cancel = 2, /* Requested by user.*/\n Partial = 3, /* query was running but ran out of quota.*/\n Timeout = 4, /* query time quota expired while it was in queue.*/\n QueueFull = 5, /* could not submit the query as queue was full.*/\n Error = 100, /* generic error*/\n Error_ECSql_PreparedFailed = Error + 1, /* ecsql prepared failed*/\n Error_ECSql_StepFailed = Error + 2, /* ecsql step failed*/\n Error_ECSql_RowToJsonFailed = Error + 3, /* ecsql failed to serialized row to json.*/\n Error_ECSql_BindingFailed = Error + 4, /* ecsql binding failed.*/\n Error_BlobIO_OpenFailed = Error + 5, /* class or property or instance specified was not found or property as not of type blob.*/\n Error_BlobIO_OutOfRange = Error + 6, /* range specified is invalid based on size of blob.*/\n}\n\n/** @internal */\nexport enum DbValueFormat {\n ECSqlNames = 0,\n JsNames = 1\n}\n\n/** @internal */\nexport interface DbRequest extends BaseReaderOptions {\n kind?: DbRequestKind;\n}\n\n/** @internal */\nexport interface DbQueryRequest extends DbRequest, QueryOptions {\n valueFormat?: DbValueFormat;\n query: string;\n args?: object;\n}\n\n/** @internal */\nexport interface DbBlobRequest extends DbRequest, BlobOptions {\n className: string;\n accessString: string;\n instanceId: Id64String;\n}\n\n/** @internal */\nexport interface DbResponse {\n stats: DbRuntimeStats;\n status: DbResponseStatus;\n kind: DbResponseKind;\n error?: string;\n}\n\n/** @internal */\nexport interface DbQueryResponse extends DbResponse {\n meta: QueryPropertyMetaData[];\n data: any[];\n rowCount: number;\n}\n\n/** @internal */\nexport interface DbBlobResponse extends DbResponse {\n data?: Uint8Array;\n rawBlobSize: number;\n}\n\n/** @public */\nexport class DbQueryError extends BentleyError {\n public constructor(public readonly response: any, public readonly request?: any, rc?: DbResult) {\n super(rc ?? DbResult.BE_SQLITE_ERROR, response.error, { response, request });\n }\n public static throwIfError(response: any, request?: any) {\n if ((response.status as number) >= (DbResponseStatus.Error as number)) {\n throw new DbQueryError(response, request);\n }\n if (response.status === DbResponseStatus.Cancel) {\n throw new DbQueryError(response, request, DbResult.BE_SQLITE_INTERRUPT);\n }\n }\n}\n\n/** @internal */\nexport interface DbRequestExecutor<TRequest extends DbRequest, TResponse extends DbResponse> {\n execute(request: TRequest): Promise<TResponse>;\n}\n\n/** @internal */\nexport interface DbQueryConfig {\n globalQuota?: QueryQuota;\n ignoreDelay?: boolean;\n ignorePriority?: boolean;\n requestQueueSize?: number;\n workerThreads?: number;\n}\n"]}
@@ -85,6 +85,7 @@ export class ContourStyle {
85
85
  * @public
86
86
  */
87
87
  export class Contour {
88
+ static { this.defaults = new Contour({}); }
88
89
  equals(other) {
89
90
  if (!this.majorStyle.equals(other.majorStyle) || !this.minorStyle.equals(other.minorStyle) || this.minorInterval !== other.minorInterval || this.majorIntervalCount !== other.majorIntervalCount || this.showGeometry !== other.showGeometry) {
90
91
  return false;
@@ -148,7 +149,6 @@ export class Contour {
148
149
  return Contour.create({ ...this, ...changedProps });
149
150
  }
150
151
  }
151
- Contour.defaults = new Contour({});
152
152
  /** Defines a group of objects to which to apply [[Contour]] lines in a particular style.
153
153
  * The [[ContourDisplay]] settings can contain multiple groups.
154
154
  * Each group is described by a set of [SubCategory]($backend)'s; all geometry belonging to any of those subcategories belongs to the group.
@@ -229,6 +229,10 @@ export class ContourGroup {
229
229
  * @public
230
230
  */
231
231
  export class ContourDisplay {
232
+ /** The maximum number of contour groups that the system will allow. Any contour groups added to the [[groups]] array beyond this number will be ignored
233
+ * for display purposes.
234
+ */
235
+ static { this.maxContourGroups = 5; }
232
236
  /** Returns true if `this` and `other` are logically equivalent, having the same groups and styling. */
233
237
  equals(other) {
234
238
  if (this.displayContours !== other.displayContours)
@@ -286,8 +290,4 @@ export class ContourDisplay {
286
290
  return ContourDisplay.create({ ...this, ...changedProps });
287
291
  }
288
292
  }
289
- /** The maximum number of contour groups that the system will allow. Any contour groups added to the [[groups]] array beyond this number will be ignored
290
- * for display purposes.
291
- */
292
- ContourDisplay.maxContourGroups = 5;
293
293
  //# sourceMappingURL=ContourDisplay.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContourDisplay.js","sourceRoot":"","sources":["../../src/ContourDisplay.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,iB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AAG,IAAI,CAAC,eAAe,CAAC;QAC7C,OAAO,KAAK,CAAC;IACf,CAAC;IAED,wHAAwH;IACjH,MAAM,CAAC,MAAM,CAAC,KAAyC;QAC5D,OAAO,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,cAAc,EAAE,CAAC;IACxD,CAAC;IAED,yFAAyF;IAClF,mBAAmB,CAAC,eAAwB;QACjD,OAAO,eAAe,KAAK,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,GAAG,IAAI,EAAE,eAAe,EAAE,CAAC,CAAC;IAC/G,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,YAAgD;QAC3D,IAAI,CAAC,YAAY;YACf,OAAO,IAAI,CAAC;QAEd,OAAO,cAAc,CAAC,MAAM,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,YAAY,EAAE,CAAC,CAAC;IAC7D,CAAC;;AAvED;;GAEG;AACoB,+BAAgB,GAAG,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Symbology\n */\n\nimport { compareBooleans, compareNumbers, CompressedId64Set, NonFunctionPropertiesOf, OrderedId64Iterable } from \"@itwin/core-bentley\";\nimport { LinePixels } from \"./LinePixels\";\nimport { RgbColor, RgbColorProps } from \"./RgbColor\";\n\n/** JSON representation of a [[ContourStyle]].\n * @public\n */\nexport interface ContourStyleProps {\n /** See [[ContourStyle.color]]. */\n color?: RgbColorProps;\n /** See [[ContourStyle.pixelWidth]]. */\n pixelWidth?: number;\n /** See [[ContourStyle.pattern]]. */\n pattern?: LinePixels;\n}\n\n/** A type containing all of the properties of [[ContourStyle]] with none of the methods and with the `readonly` modifiers removed.\n * Used by [[ContourStyle.create]] and [[ContourStyle.clone]].\n * @public\n */\nexport type ContourStyleProperties = NonFunctionPropertiesOf<ContourStyle>;\n\n/** The style settings used by either a minor or major contour.\n * @see [[Contour.majorStyle]]\n * @see [[Contour.minorStyle]]\n * @public\n */\nexport class ContourStyle {\n /** The color in which to draw the contour lines. Default: black. */\n public readonly color: RgbColor;\n /** The width in screen pixels of the contour lines.\n * Useful values range between 1 and 8.5, in increments of 0.5. Other values will be rounded to meet these criteria.\n * Default: 1.0.\n */\n public readonly pixelWidth: number;\n /** The pattern for a major or minor contour line. Defaults to [[LinePixels.Solid]]. */\n public readonly pattern: LinePixels;\n\n /** Returns true if `this` and `other` are logically equivalent. */\n public equals(other: ContourStyle): boolean {\n if (!this.color.equals(other.color) || this.pixelWidth !== other.pixelWidth || this.pattern !== other.pattern) {\n return false;\n }\n return true;\n }\n\n /** Performs ordered comparison of two contour styles.\n * @param lhs First contour style to compare\n * @param rhs Second contour style to compare\n * @returns 0 if lhs is equivalent to rhs, a negative number if lhs compares less than rhs, or a positive number if lhs compares greater than rhs.\n * @public\n */\n public static compare(lhs: ContourStyle, rhs: ContourStyle): number {\n let diff = 0;\n if ((diff = lhs.color.compareTo(rhs.color)) !== 0)\n return diff;\n if ((diff = compareNumbers(lhs.pixelWidth, rhs.pixelWidth)) !== 0)\n return diff;\n if ((diff = compareNumbers(lhs.pattern, rhs.pattern)) !== 0)\n return diff;\n\n return diff;\n }\n\n private constructor(props?: Partial<ContourStyleProperties>) {\n this.color = props?.color ?? RgbColor.fromJSON({r: 0, g: 0, b: 0});\n this.pixelWidth = props?.pixelWidth ?? 1;\n this.pattern = props?.pattern ?? LinePixels.Solid;\n }\n\n public static fromJSON(props?: ContourStyleProps) {\n if (!props)\n return new ContourStyle();\n\n return new this({\n color: props?.color ? RgbColor.fromJSON(props.color) : undefined,\n pixelWidth: props?.pixelWidth,\n pattern: props?.pattern,\n });\n }\n\n public toJSON(): ContourStyleProps {\n const props: ContourStyleProps = {};\n\n if (!this.color.equals(RgbColor.fromJSON({r: 0, g: 0, b: 0})))\n props.color = this.color.toJSON();\n\n if (1 !== this.pixelWidth)\n props.pixelWidth = this.pixelWidth;\n\n if (0 !== this.pattern)\n props.pattern = this.pattern;\n\n return props;\n }\n\n /** Create a new ContourStyle. Any properties not specified by `props` will be initialized to their default values. */\n public static create(props?: Partial<ContourStyleProperties>): ContourStyle {\n return props ? new this(props) : new ContourStyle();\n }\n\n /** Create a copy of this ContourStyle, identical except for any properties specified by `changedProps`.\n * Any properties of `changedProps` explicitly set to `undefined` will be reset to their default values.\n */\n public clone(changedProps?: Partial<ContourStyleProperties>): ContourStyle {\n if (!changedProps)\n return this;\n\n return ContourStyle.create({ ...this, ...changedProps });\n }\n}\n\n/** JSON representation of a [[Contour]].\n * @public\n */\nexport interface ContourProps {\n /** See [[Contour.majorStyle]]. */\n majorStyle?: ContourStyleProps;\n /** See [[Contour.minor]]. */\n minorStyle?: ContourStyleProps;\n /** See [[Contour.minorInterval]]. */\n minorInterval?: number;\n /** See [[Contour.majorIntervalCount]]. */\n majorIntervalCount?: number;\n /** See [[Contour.showGeometry]] */\n showGeometry?: boolean;\n}\n\n/** A type containing all of the properties of [[Contour]] with none of the methods and with the `readonly` modifiers removed.\n * Used by [[Contour.create]] and [[Contour.clone]].\n * @public\n */\nexport type ContourProperties = NonFunctionPropertiesOf<Contour>;\n\n/** Describes how to generate and style contour lines for geometry within a single [[ContourGroup]].\n * Contours provide a way to visualize elevation within a 3d scene by drawing lines at fixed intervals along the z-axis.\n * There are actually 2 kinds of contour lines: major and minor. Each kind can be styled independently.\n * A contour line is generated every [[minorInterval]] meters. Every `nth` line will be a *major* contour, where `n` = [[majorIntervalCount]]; the intervening lines will\n * all be *minor* contours.\n * For example, with a [[majorIntervalCount]] of `1`, every contour will be major; of `2`, every other contour will be major; and of `3`, there will be two minor contours in between\n * each major contour.\n *\n * @public\n */\nexport class Contour {\n /** Settings that describe how a major contour is styled. Defaults to an instantation of [[ContourStyle]] using `pixelWidth` of 2 and default values for the other properties. */\n public readonly majorStyle: ContourStyle;\n /** Settings that describe how a minor contour is styled. Defaults to an instantation of [[ContourStyle]] using default values for the properties. */\n public readonly minorStyle: ContourStyle;\n /** The interval for the minor contour occurrence in meters; these can be specified as fractional. Defaults to 1. If a value <= 0 is specified, this will be treated as 1 meter. */\n public readonly minorInterval: number;\n /** The count of minor contour intervals that define a major interval (integer > 0). A value of 1 means no minor contours will be shown, only major contours. Defaults to 5. If a value < 1 is specified, this will be treated as 1. If a non-integer value is specified, it will be treated as if it were rounded to the nearest integer. */\n public readonly majorIntervalCount: number;\n /** If true, show underlying geometry along with the associated contours. If false, only show the contours, not the underlying geometry. Defaults to true. */\n public readonly showGeometry: boolean;\n\n public static readonly defaults = new Contour({});\n\n public equals(other: Contour): boolean {\n if (!this.majorStyle.equals(other.majorStyle) || !this.minorStyle.equals(other.minorStyle) || this.minorInterval !== other.minorInterval || this.majorIntervalCount !== other.majorIntervalCount || this.showGeometry !== other.showGeometry) {\n return false;\n }\n return true;\n }\n\n /** Performs ordered comparison of two contours.\n * @param lhs First contour to compare\n * @param rhs Second contour to compare\n * @returns 0 if lhs is equivalent to rhs, a negative number if lhs compares less than rhs, or a positive number if lhs compares greater than rhs.\n */\n public static compare(lhs: Contour, rhs: Contour): number {\n return ContourStyle.compare(lhs.majorStyle, rhs.majorStyle)\n || ContourStyle.compare(lhs.minorStyle, rhs.minorStyle)\n || compareNumbers(lhs.minorInterval, rhs.minorInterval)\n || compareNumbers(lhs.majorIntervalCount, rhs.majorIntervalCount)\n || compareBooleans(lhs.showGeometry, rhs.showGeometry);\n }\n\n private constructor(props?: Partial<ContourProperties>) {\n this.majorStyle = props?.majorStyle ?? ContourStyle.fromJSON({ pixelWidth: 2 });\n this.minorStyle = props?.minorStyle ?? ContourStyle.fromJSON();\n this.minorInterval = props?.minorInterval ?? 1;\n this.majorIntervalCount = props?.majorIntervalCount ?? 5;\n this.showGeometry = props?.showGeometry ?? true;\n }\n\n public static fromJSON(props?: ContourProps) {\n if (!props)\n return new Contour();\n\n return new this({\n majorStyle: props?.majorStyle ? ContourStyle.fromJSON(props.majorStyle) : undefined,\n minorStyle: props?.minorStyle ? ContourStyle.fromJSON(props.minorStyle) : undefined,\n minorInterval: props?.minorInterval,\n majorIntervalCount: props?.majorIntervalCount,\n showGeometry: props?.showGeometry,\n });\n }\n\n public toJSON(): ContourProps {\n const props: ContourProps = {};\n\n if (!this.majorStyle.equals(ContourStyle.fromJSON({ pixelWidth: 2 })))\n props.majorStyle = this.majorStyle.toJSON();\n\n if (!this.minorStyle.equals(ContourStyle.fromJSON()))\n props.minorStyle = this.minorStyle.toJSON();\n\n if (1 !== this.minorInterval)\n props.minorInterval = this.minorInterval;\n\n if (5 !== this.majorIntervalCount)\n props.majorIntervalCount = this.majorIntervalCount;\n\n if (true !== this.showGeometry)\n props.showGeometry = this.showGeometry;\n\n return props;\n }\n\n /** Create a new Contour. Any properties not specified by `props` will be initialized to their default values. */\n public static create(props?: Partial<ContourProperties>): Contour {\n return props ? new this(props) : new Contour();\n }\n\n /** Create a copy of this Contour, identical except for any properties specified by `changedProps`.\n * Any properties of `changedProps` explicitly set to `undefined` will be reset to their default values.\n */\n public clone(changedProps?: Partial<ContourProperties>): Contour {\n if (!changedProps)\n return this;\n\n return Contour.create({ ...this, ...changedProps });\n }\n}\n\n/** JSON representation of a [[ContourGroup]].\n * @public\n */\nexport interface ContourGroupProps {\n /** See [[ContourGroup.contourDef]]. */\n contourDef?: ContourProps;\n /** See [[ContourGroup.subCategories]]. */\n subCategories?: CompressedId64Set;\n /** See [[ContourGroup.name]]. */\n name?: string;\n}\n\n/** A type containing all of the properties of [[ContourGroup]] with none of the methods and with the `readonly` modifiers removed.\n * Used by [[ContourGroup.create]] and [[ContourGroup.clone]].\n * @public\n */\nexport type ContourGroupProperties = NonFunctionPropertiesOf<ContourGroup>;\n\n/** Defines a group of objects to which to apply [[Contour]] lines in a particular style.\n * The [[ContourDisplay]] settings can contain multiple groups.\n * Each group is described by a set of [SubCategory]($backend)'s; all geometry belonging to any of those subcategories belongs to the group.\n * An empty set of subcategories indicates that this is a default group, implicitly containing all subcategories that are not explicitly included in another group.\n * Each group has an optional, non-user-facing name that applications can use to assign semantics to particular groups.\n * @public\n */\nexport class ContourGroup {\n private _subCategories: CompressedId64Set;\n\n /** Describes the appearance of all of the contours applied to geometry belonging to this group. */\n public readonly contourDef: Contour;\n /** An optional, non-user-facing name that applications can use to assign semantics to particular groups.\n * Default: an empty string.\n */\n public readonly name: string;\n\n /** The set of subcategories belonging to this group, or an empty set if this is a default group. If more than one empty set exists in the [[ContourDisplay]] object's `groups` array, the last entry in that array is used for rendering the default styling.\n * @see [[isDefaultGroup]] to test if this is a default group.\n */\n public get subCategories(): OrderedId64Iterable {\n return CompressedId64Set.iterable(this._subCategories);\n }\n\n /** Returns true if [[subCategories]] is an empty set, indicating that any subcategory not included in any other [[ContourGroup]] is implicitly\n * included in this group.\n */\n public get isDefaultGroup(): boolean {\n return OrderedId64Iterable.isEmptySet(this._subCategories);\n }\n\n /** Returns true if `this` and `other` contain the exact same set of subcategories. */\n public subCategoriesEqual(other: ContourGroup): boolean {\n return this._subCategories === other._subCategories;\n }\n\n /** Returns true if `this` and `other` are logically equivalent, having the same styling, name, and set of subcategories. */\n public equals(other: ContourGroup | undefined): boolean {\n if (this === undefined && other === undefined)\n return true;\n if (this === undefined || other === undefined)\n return false;\n if (!this.contourDef.equals(other.contourDef))\n return false;\n if (this._subCategories !== other._subCategories)\n return false;\n if (this.name !== other.name)\n return false;\n return true;\n }\n\n private constructor(props?: Partial<ContourGroupProperties>) {\n this.contourDef = props?.contourDef ?? Contour.fromJSON();\n this._subCategories = props?.subCategories ? CompressedId64Set.sortAndCompress(props.subCategories) : \"\";\n this.name = props?.name ?? \"\";\n }\n\n public static fromJSON(props?: ContourGroupProps) {\n if (!props)\n return new ContourGroup();\n\n return new this({\n contourDef: props?.contourDef ? Contour.fromJSON(props.contourDef) : undefined,\n name: props?.name,\n subCategories: props?.subCategories ? CompressedId64Set.iterable(props.subCategories) : undefined,\n });\n }\n\n public toJSON(): ContourGroupProps {\n const props: ContourGroupProps = {};\n\n if (!this.contourDef.equals(Contour.defaults))\n props.contourDef = this.contourDef.toJSON();\n\n if (this.name)\n props.name = this.name;\n\n props.subCategories = this._subCategories;\n return props;\n }\n\n /** Create a new ContourGroup. Any properties not specified by `props` will be initialized to their default values. */\n public static create(props?: Partial<ContourGroupProperties>): ContourGroup {\n return props ? new this(props) : new ContourGroup();\n }\n\n /** Create a copy of this ContourGroup, identical except for any properties specified by `changedProps`.\n * Any properties of `changedProps` explicitly set to `undefined` will be reset to their default values.\n */\n public clone(changedProps?: Partial<ContourGroupProperties>): ContourGroup {\n if (!changedProps)\n return this;\n\n return ContourGroup.create({ ...this, ...changedProps });\n }\n}\n\n/** JSON representation of [[ContourDisplay]] settings.\n * @public\n */\nexport interface ContourDisplayProps {\n /** See [[ContourDisplay.groups]]. */\n groups?: ContourGroupProps[];\n /** See [[ContourDisplay.displayContours]]. */\n displayContours?: boolean;\n}\n\n/** A type containing all of the properties of [[ContourDisplay]] with none of the methods and with the `readonly` modifiers removed.\n * Used by [[ContourDisplay.create]] and [[ContourDisplay.clone]].\n * @public\n */\nexport type ContourDisplayProperties = NonFunctionPropertiesOf<ContourDisplay>;\n\n/** Settings that specify how to apply [contour lines]($docs/learning/display/ContourDisplay.md) to groups of geometry\n * within a 3d scene.\n * @see [[DisplayStyle3dSettings.contours]] to associate contour settings with a display style.\n * @public\n */\nexport class ContourDisplay {\n /** A list of the groups, each describing their own specific contour display settings. Defaults to an empty array.\n * @note The display system supports no more than [[ContourDisplay.maxContourGroups]]. Entries in this array exceeding that maximum will\n * have no effect on the display of contour lines.\n */\n public readonly groups: ContourGroup[];\n /** Whether to display the contour lines described by these settings. Default: false.\n * @see [[withDisplayContours]] to change this flag.\n */\n public readonly displayContours: boolean;\n /** The maximum number of contour groups that the system will allow. Any contour groups added to the [[groups]] array beyond this number will be ignored\n * for display purposes.\n */\n public static readonly maxContourGroups = 5;\n\n /** Returns true if `this` and `other` are logically equivalent, having the same groups and styling. */\n public equals(other: ContourDisplay): boolean {\n if (this.displayContours !== other.displayContours)\n return false;\n if (this.groups.length !== other.groups.length)\n return false;\n for (let index = 0, len = this.groups.length; index < len && index < ContourDisplay.maxContourGroups; ++index) {\n const match = this.groups[index].equals(other.groups[index]);\n if (!match)\n return false;\n }\n return true;\n }\n\n private constructor(props?: Partial<ContourDisplayProperties>) {\n this.displayContours = props?.displayContours ?? false;\n this.groups = props?.groups ?? [];\n }\n\n public static fromJSON(props?: ContourDisplayProps) {\n if (!props)\n return new ContourDisplay();\n\n const groups: ContourGroup[] = [];\n if (undefined !== props && undefined !== props.groups) {\n for (let n = 0; n < props.groups.length; n++) {\n groups[n] = ContourGroup.fromJSON(props.groups[n]);\n }\n }\n\n return new this({\n displayContours: props?.displayContours,\n groups: props.groups ? groups : undefined,\n });\n }\n\n public toJSON(): ContourDisplayProps {\n const props: ContourDisplayProps = {};\n\n props.groups = [];\n for (let n = 0; n < this.groups.length; n++) {\n props.groups[n] = this.groups[n].toJSON();\n }\n\n props.displayContours = this.displayContours;\n return props;\n }\n\n /** Create a new ContourDisplay. Any properties not specified by `props` will be initialized to their default values. */\n public static create(props?: Partial<ContourDisplayProperties>): ContourDisplay {\n return props ? new this(props) : new ContourDisplay();\n }\n\n /** Create a copy of these settings, changing the `displayContours` flag as specified. */\n public withDisplayContours(displayContours: boolean): ContourDisplay {\n return displayContours === this.displayContours ? this : ContourDisplay.create({ ...this, displayContours });\n }\n\n /** Create a copy of this ContourDisplay, identical except for any properties specified by `changedProps`.\n * Any properties of `changedProps` explicitly set to `undefined` will be reset to their default values.\n */\n public clone(changedProps?: Partial<ContourDisplayProperties>): ContourDisplay {\n if (!changedProps)\n return this;\n\n return ContourDisplay.create({ ...this, ...changedProps });\n }\n}\n"]}
1
+ {"version":3,"file":"ContourDisplay.js","sourceRoot":"","sources":["../../src/ContourDisplay.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AK,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;QAC5C,CAAC;QAED,KAAK,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC;QAC7C,OAAO,KAAK,CAAC;IACf,CAAC;IAED,wHAAwH;IACjH,MAAM,CAAC,MAAM,CAAC,KAAyC;QAC5D,OAAO,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,cAAc,EAAE,CAAC;IACxD,CAAC;IAED,yFAAyF;IAClF,mBAAmB,CAAC,eAAwB;QACjD,OAAO,eAAe,KAAK,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,GAAG,IAAI,EAAE,eAAe,EAAE,CAAC,CAAC;IAC/G,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,YAAgD;QAC3D,IAAI,CAAC,YAAY;YACf,OAAO,IAAI,CAAC;QAEd,OAAO,cAAc,CAAC,MAAM,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,YAAY,EAAE,CAAC,CAAC;IAC7D,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Symbology\n */\n\nimport { compareBooleans, compareNumbers, CompressedId64Set, NonFunctionPropertiesOf, OrderedId64Iterable } from \"@itwin/core-bentley\";\nimport { LinePixels } from \"./LinePixels\";\nimport { RgbColor, RgbColorProps } from \"./RgbColor\";\n\n/** JSON representation of a [[ContourStyle]].\n * @public\n */\nexport interface ContourStyleProps {\n /** See [[ContourStyle.color]]. */\n color?: RgbColorProps;\n /** See [[ContourStyle.pixelWidth]]. */\n pixelWidth?: number;\n /** See [[ContourStyle.pattern]]. */\n pattern?: LinePixels;\n}\n\n/** A type containing all of the properties of [[ContourStyle]] with none of the methods and with the `readonly` modifiers removed.\n * Used by [[ContourStyle.create]] and [[ContourStyle.clone]].\n * @public\n */\nexport type ContourStyleProperties = NonFunctionPropertiesOf<ContourStyle>;\n\n/** The style settings used by either a minor or major contour.\n * @see [[Contour.majorStyle]]\n * @see [[Contour.minorStyle]]\n * @public\n */\nexport class ContourStyle {\n /** The color in which to draw the contour lines. Default: black. */\n public readonly color: RgbColor;\n /** The width in screen pixels of the contour lines.\n * Useful values range between 1 and 8.5, in increments of 0.5. Other values will be rounded to meet these criteria.\n * Default: 1.0.\n */\n public readonly pixelWidth: number;\n /** The pattern for a major or minor contour line. Defaults to [[LinePixels.Solid]]. */\n public readonly pattern: LinePixels;\n\n /** Returns true if `this` and `other` are logically equivalent. */\n public equals(other: ContourStyle): boolean {\n if (!this.color.equals(other.color) || this.pixelWidth !== other.pixelWidth || this.pattern !== other.pattern) {\n return false;\n }\n return true;\n }\n\n /** Performs ordered comparison of two contour styles.\n * @param lhs First contour style to compare\n * @param rhs Second contour style to compare\n * @returns 0 if lhs is equivalent to rhs, a negative number if lhs compares less than rhs, or a positive number if lhs compares greater than rhs.\n * @public\n */\n public static compare(lhs: ContourStyle, rhs: ContourStyle): number {\n let diff = 0;\n if ((diff = lhs.color.compareTo(rhs.color)) !== 0)\n return diff;\n if ((diff = compareNumbers(lhs.pixelWidth, rhs.pixelWidth)) !== 0)\n return diff;\n if ((diff = compareNumbers(lhs.pattern, rhs.pattern)) !== 0)\n return diff;\n\n return diff;\n }\n\n private constructor(props?: Partial<ContourStyleProperties>) {\n this.color = props?.color ?? RgbColor.fromJSON({r: 0, g: 0, b: 0});\n this.pixelWidth = props?.pixelWidth ?? 1;\n this.pattern = props?.pattern ?? LinePixels.Solid;\n }\n\n public static fromJSON(props?: ContourStyleProps) {\n if (!props)\n return new ContourStyle();\n\n return new this({\n color: props?.color ? RgbColor.fromJSON(props.color) : undefined,\n pixelWidth: props?.pixelWidth,\n pattern: props?.pattern,\n });\n }\n\n public toJSON(): ContourStyleProps {\n const props: ContourStyleProps = {};\n\n if (!this.color.equals(RgbColor.fromJSON({r: 0, g: 0, b: 0})))\n props.color = this.color.toJSON();\n\n if (1 !== this.pixelWidth)\n props.pixelWidth = this.pixelWidth;\n\n if (0 !== this.pattern)\n props.pattern = this.pattern;\n\n return props;\n }\n\n /** Create a new ContourStyle. Any properties not specified by `props` will be initialized to their default values. */\n public static create(props?: Partial<ContourStyleProperties>): ContourStyle {\n return props ? new this(props) : new ContourStyle();\n }\n\n /** Create a copy of this ContourStyle, identical except for any properties specified by `changedProps`.\n * Any properties of `changedProps` explicitly set to `undefined` will be reset to their default values.\n */\n public clone(changedProps?: Partial<ContourStyleProperties>): ContourStyle {\n if (!changedProps)\n return this;\n\n return ContourStyle.create({ ...this, ...changedProps });\n }\n}\n\n/** JSON representation of a [[Contour]].\n * @public\n */\nexport interface ContourProps {\n /** See [[Contour.majorStyle]]. */\n majorStyle?: ContourStyleProps;\n /** See [[Contour.minor]]. */\n minorStyle?: ContourStyleProps;\n /** See [[Contour.minorInterval]]. */\n minorInterval?: number;\n /** See [[Contour.majorIntervalCount]]. */\n majorIntervalCount?: number;\n /** See [[Contour.showGeometry]] */\n showGeometry?: boolean;\n}\n\n/** A type containing all of the properties of [[Contour]] with none of the methods and with the `readonly` modifiers removed.\n * Used by [[Contour.create]] and [[Contour.clone]].\n * @public\n */\nexport type ContourProperties = NonFunctionPropertiesOf<Contour>;\n\n/** Describes how to generate and style contour lines for geometry within a single [[ContourGroup]].\n * Contours provide a way to visualize elevation within a 3d scene by drawing lines at fixed intervals along the z-axis.\n * There are actually 2 kinds of contour lines: major and minor. Each kind can be styled independently.\n * A contour line is generated every [[minorInterval]] meters. Every `nth` line will be a *major* contour, where `n` = [[majorIntervalCount]]; the intervening lines will\n * all be *minor* contours.\n * For example, with a [[majorIntervalCount]] of `1`, every contour will be major; of `2`, every other contour will be major; and of `3`, there will be two minor contours in between\n * each major contour.\n *\n * @public\n */\nexport class Contour {\n /** Settings that describe how a major contour is styled. Defaults to an instantation of [[ContourStyle]] using `pixelWidth` of 2 and default values for the other properties. */\n public readonly majorStyle: ContourStyle;\n /** Settings that describe how a minor contour is styled. Defaults to an instantation of [[ContourStyle]] using default values for the properties. */\n public readonly minorStyle: ContourStyle;\n /** The interval for the minor contour occurrence in meters; these can be specified as fractional. Defaults to 1. If a value <= 0 is specified, this will be treated as 1 meter. */\n public readonly minorInterval: number;\n /** The count of minor contour intervals that define a major interval (integer > 0). A value of 1 means no minor contours will be shown, only major contours. Defaults to 5. If a value < 1 is specified, this will be treated as 1. If a non-integer value is specified, it will be treated as if it were rounded to the nearest integer. */\n public readonly majorIntervalCount: number;\n /** If true, show underlying geometry along with the associated contours. If false, only show the contours, not the underlying geometry. Defaults to true. */\n public readonly showGeometry: boolean;\n\n public static readonly defaults = new Contour({});\n\n public equals(other: Contour): boolean {\n if (!this.majorStyle.equals(other.majorStyle) || !this.minorStyle.equals(other.minorStyle) || this.minorInterval !== other.minorInterval || this.majorIntervalCount !== other.majorIntervalCount || this.showGeometry !== other.showGeometry) {\n return false;\n }\n return true;\n }\n\n /** Performs ordered comparison of two contours.\n * @param lhs First contour to compare\n * @param rhs Second contour to compare\n * @returns 0 if lhs is equivalent to rhs, a negative number if lhs compares less than rhs, or a positive number if lhs compares greater than rhs.\n */\n public static compare(lhs: Contour, rhs: Contour): number {\n return ContourStyle.compare(lhs.majorStyle, rhs.majorStyle)\n || ContourStyle.compare(lhs.minorStyle, rhs.minorStyle)\n || compareNumbers(lhs.minorInterval, rhs.minorInterval)\n || compareNumbers(lhs.majorIntervalCount, rhs.majorIntervalCount)\n || compareBooleans(lhs.showGeometry, rhs.showGeometry);\n }\n\n private constructor(props?: Partial<ContourProperties>) {\n this.majorStyle = props?.majorStyle ?? ContourStyle.fromJSON({ pixelWidth: 2 });\n this.minorStyle = props?.minorStyle ?? ContourStyle.fromJSON();\n this.minorInterval = props?.minorInterval ?? 1;\n this.majorIntervalCount = props?.majorIntervalCount ?? 5;\n this.showGeometry = props?.showGeometry ?? true;\n }\n\n public static fromJSON(props?: ContourProps) {\n if (!props)\n return new Contour();\n\n return new this({\n majorStyle: props?.majorStyle ? ContourStyle.fromJSON(props.majorStyle) : undefined,\n minorStyle: props?.minorStyle ? ContourStyle.fromJSON(props.minorStyle) : undefined,\n minorInterval: props?.minorInterval,\n majorIntervalCount: props?.majorIntervalCount,\n showGeometry: props?.showGeometry,\n });\n }\n\n public toJSON(): ContourProps {\n const props: ContourProps = {};\n\n if (!this.majorStyle.equals(ContourStyle.fromJSON({ pixelWidth: 2 })))\n props.majorStyle = this.majorStyle.toJSON();\n\n if (!this.minorStyle.equals(ContourStyle.fromJSON()))\n props.minorStyle = this.minorStyle.toJSON();\n\n if (1 !== this.minorInterval)\n props.minorInterval = this.minorInterval;\n\n if (5 !== this.majorIntervalCount)\n props.majorIntervalCount = this.majorIntervalCount;\n\n if (true !== this.showGeometry)\n props.showGeometry = this.showGeometry;\n\n return props;\n }\n\n /** Create a new Contour. Any properties not specified by `props` will be initialized to their default values. */\n public static create(props?: Partial<ContourProperties>): Contour {\n return props ? new this(props) : new Contour();\n }\n\n /** Create a copy of this Contour, identical except for any properties specified by `changedProps`.\n * Any properties of `changedProps` explicitly set to `undefined` will be reset to their default values.\n */\n public clone(changedProps?: Partial<ContourProperties>): Contour {\n if (!changedProps)\n return this;\n\n return Contour.create({ ...this, ...changedProps });\n }\n}\n\n/** JSON representation of a [[ContourGroup]].\n * @public\n */\nexport interface ContourGroupProps {\n /** See [[ContourGroup.contourDef]]. */\n contourDef?: ContourProps;\n /** See [[ContourGroup.subCategories]]. */\n subCategories?: CompressedId64Set;\n /** See [[ContourGroup.name]]. */\n name?: string;\n}\n\n/** A type containing all of the properties of [[ContourGroup]] with none of the methods and with the `readonly` modifiers removed.\n * Used by [[ContourGroup.create]] and [[ContourGroup.clone]].\n * @public\n */\nexport type ContourGroupProperties = NonFunctionPropertiesOf<ContourGroup>;\n\n/** Defines a group of objects to which to apply [[Contour]] lines in a particular style.\n * The [[ContourDisplay]] settings can contain multiple groups.\n * Each group is described by a set of [SubCategory]($backend)'s; all geometry belonging to any of those subcategories belongs to the group.\n * An empty set of subcategories indicates that this is a default group, implicitly containing all subcategories that are not explicitly included in another group.\n * Each group has an optional, non-user-facing name that applications can use to assign semantics to particular groups.\n * @public\n */\nexport class ContourGroup {\n private _subCategories: CompressedId64Set;\n\n /** Describes the appearance of all of the contours applied to geometry belonging to this group. */\n public readonly contourDef: Contour;\n /** An optional, non-user-facing name that applications can use to assign semantics to particular groups.\n * Default: an empty string.\n */\n public readonly name: string;\n\n /** The set of subcategories belonging to this group, or an empty set if this is a default group. If more than one empty set exists in the [[ContourDisplay]] object's `groups` array, the last entry in that array is used for rendering the default styling.\n * @see [[isDefaultGroup]] to test if this is a default group.\n */\n public get subCategories(): OrderedId64Iterable {\n return CompressedId64Set.iterable(this._subCategories);\n }\n\n /** Returns true if [[subCategories]] is an empty set, indicating that any subcategory not included in any other [[ContourGroup]] is implicitly\n * included in this group.\n */\n public get isDefaultGroup(): boolean {\n return OrderedId64Iterable.isEmptySet(this._subCategories);\n }\n\n /** Returns true if `this` and `other` contain the exact same set of subcategories. */\n public subCategoriesEqual(other: ContourGroup): boolean {\n return this._subCategories === other._subCategories;\n }\n\n /** Returns true if `this` and `other` are logically equivalent, having the same styling, name, and set of subcategories. */\n public equals(other: ContourGroup | undefined): boolean {\n if (this === undefined && other === undefined)\n return true;\n if (this === undefined || other === undefined)\n return false;\n if (!this.contourDef.equals(other.contourDef))\n return false;\n if (this._subCategories !== other._subCategories)\n return false;\n if (this.name !== other.name)\n return false;\n return true;\n }\n\n private constructor(props?: Partial<ContourGroupProperties>) {\n this.contourDef = props?.contourDef ?? Contour.fromJSON();\n this._subCategories = props?.subCategories ? CompressedId64Set.sortAndCompress(props.subCategories) : \"\";\n this.name = props?.name ?? \"\";\n }\n\n public static fromJSON(props?: ContourGroupProps) {\n if (!props)\n return new ContourGroup();\n\n return new this({\n contourDef: props?.contourDef ? Contour.fromJSON(props.contourDef) : undefined,\n name: props?.name,\n subCategories: props?.subCategories ? CompressedId64Set.iterable(props.subCategories) : undefined,\n });\n }\n\n public toJSON(): ContourGroupProps {\n const props: ContourGroupProps = {};\n\n if (!this.contourDef.equals(Contour.defaults))\n props.contourDef = this.contourDef.toJSON();\n\n if (this.name)\n props.name = this.name;\n\n props.subCategories = this._subCategories;\n return props;\n }\n\n /** Create a new ContourGroup. Any properties not specified by `props` will be initialized to their default values. */\n public static create(props?: Partial<ContourGroupProperties>): ContourGroup {\n return props ? new this(props) : new ContourGroup();\n }\n\n /** Create a copy of this ContourGroup, identical except for any properties specified by `changedProps`.\n * Any properties of `changedProps` explicitly set to `undefined` will be reset to their default values.\n */\n public clone(changedProps?: Partial<ContourGroupProperties>): ContourGroup {\n if (!changedProps)\n return this;\n\n return ContourGroup.create({ ...this, ...changedProps });\n }\n}\n\n/** JSON representation of [[ContourDisplay]] settings.\n * @public\n */\nexport interface ContourDisplayProps {\n /** See [[ContourDisplay.groups]]. */\n groups?: ContourGroupProps[];\n /** See [[ContourDisplay.displayContours]]. */\n displayContours?: boolean;\n}\n\n/** A type containing all of the properties of [[ContourDisplay]] with none of the methods and with the `readonly` modifiers removed.\n * Used by [[ContourDisplay.create]] and [[ContourDisplay.clone]].\n * @public\n */\nexport type ContourDisplayProperties = NonFunctionPropertiesOf<ContourDisplay>;\n\n/** Settings that specify how to apply [contour lines]($docs/learning/display/ContourDisplay.md) to groups of geometry\n * within a 3d scene.\n * @see [[DisplayStyle3dSettings.contours]] to associate contour settings with a display style.\n * @public\n */\nexport class ContourDisplay {\n /** A list of the groups, each describing their own specific contour display settings. Defaults to an empty array.\n * @note The display system supports no more than [[ContourDisplay.maxContourGroups]]. Entries in this array exceeding that maximum will\n * have no effect on the display of contour lines.\n */\n public readonly groups: ContourGroup[];\n /** Whether to display the contour lines described by these settings. Default: false.\n * @see [[withDisplayContours]] to change this flag.\n */\n public readonly displayContours: boolean;\n /** The maximum number of contour groups that the system will allow. Any contour groups added to the [[groups]] array beyond this number will be ignored\n * for display purposes.\n */\n public static readonly maxContourGroups = 5;\n\n /** Returns true if `this` and `other` are logically equivalent, having the same groups and styling. */\n public equals(other: ContourDisplay): boolean {\n if (this.displayContours !== other.displayContours)\n return false;\n if (this.groups.length !== other.groups.length)\n return false;\n for (let index = 0, len = this.groups.length; index < len && index < ContourDisplay.maxContourGroups; ++index) {\n const match = this.groups[index].equals(other.groups[index]);\n if (!match)\n return false;\n }\n return true;\n }\n\n private constructor(props?: Partial<ContourDisplayProperties>) {\n this.displayContours = props?.displayContours ?? false;\n this.groups = props?.groups ?? [];\n }\n\n public static fromJSON(props?: ContourDisplayProps) {\n if (!props)\n return new ContourDisplay();\n\n const groups: ContourGroup[] = [];\n if (undefined !== props && undefined !== props.groups) {\n for (let n = 0; n < props.groups.length; n++) {\n groups[n] = ContourGroup.fromJSON(props.groups[n]);\n }\n }\n\n return new this({\n displayContours: props?.displayContours,\n groups: props.groups ? groups : undefined,\n });\n }\n\n public toJSON(): ContourDisplayProps {\n const props: ContourDisplayProps = {};\n\n props.groups = [];\n for (let n = 0; n < this.groups.length; n++) {\n props.groups[n] = this.groups[n].toJSON();\n }\n\n props.displayContours = this.displayContours;\n return props;\n }\n\n /** Create a new ContourDisplay. Any properties not specified by `props` will be initialized to their default values. */\n public static create(props?: Partial<ContourDisplayProperties>): ContourDisplay {\n return props ? new this(props) : new ContourDisplay();\n }\n\n /** Create a copy of these settings, changing the `displayContours` flag as specified. */\n public withDisplayContours(displayContours: boolean): ContourDisplay {\n return displayContours === this.displayContours ? this : ContourDisplay.create({ ...this, displayContours });\n }\n\n /** Create a copy of this ContourDisplay, identical except for any properties specified by `changedProps`.\n * Any properties of `changedProps` explicitly set to `undefined` will be reset to their default values.\n */\n public clone(changedProps?: Partial<ContourDisplayProperties>): ContourDisplay {\n if (!changedProps)\n return this;\n\n return ContourDisplay.create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AAC,IAAI,qBAAqB,CAAC,aAAa,CAAC;IAIrE;;;;;;OAMG;IACU,IAAI,IAAI,OAAO,CAAC,cAAc,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC;CAajE"}
@@ -15,6 +15,8 @@ export class PropertyMetaDataMap {
15
15
  this._byJsonName = new Map();
16
16
  this._byNoCase = new Map();
17
17
  for (const property of this.properties) {
18
+ property.extendType = property.extendedType !== undefined ? property.extendedType : ""; // eslint-disable-line @typescript-eslint/no-deprecated
19
+ property.extendedType = property.extendedType === "" ? undefined : property.extendedType;
18
20
  this._byPropName.set(property.name, property.index);
19
21
  this._byJsonName.set(property.jsonName, property.index);
20
22
  this._byNoCase.set(property.name.toLowerCase(), property.index);
@@ -72,6 +74,7 @@ export class PropertyMetaDataMap {
72
74
  * @public
73
75
  */
74
76
  export class ECSqlReader {
77
+ static { this._maxRetryCount = 10; }
75
78
  /**
76
79
  * @internal
77
80
  */
@@ -400,5 +403,4 @@ export class ECSqlReader {
400
403
  }
401
404
  }
402
405
  }
403
- ECSqlReader._maxRetryCount = 10;
404
406
  //# sourceMappingURL=ECSqlReader.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ECSqlReader.js","sourceRoot":"","sources":["../../src/ECSqlReader.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,YAAY,EAAsD,aAAa,EAAE,gBAAgB,EAAE,aAAa,EAAE,WAAW,EAAgB,mBAAmB,EACzI,cAAc,GACtC,MAAM,mBAAmB,CAAC;AAE3B,cAAc;AACd,MAAM,OAAO,mBAAmB;IAK9B,YAAmC,UAAmC;QAAnC,eAAU,GAAV,UAAU,CAAyB;QAJ9D,gBAAW,GAAG,IAAI,GAAG,EAAkB,CAAC;QACxC,gBAAW,GAAG,IAAI,GAAG,EAAkB,CAAC;QACxC,cAAS,GAAG,IAAI,GAAG,EAAkB,CAAC;QAG5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------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module iModels\n */\nimport { Base64EncodedString } from \"./Base64EncodedString\";\nimport {\n DbQueryError, DbQueryRequest, DbQueryResponse, DbRequestExecutor, DbRequestKind, DbResponseStatus, DbValueFormat, QueryBinder, QueryOptions, QueryOptionsBuilder,\n QueryPropertyMetaData, QueryRowFormat,\n} from \"./ConcurrentQuery\";\n\n/** @public */\nexport class PropertyMetaDataMap implements Iterable<QueryPropertyMetaData> {\n private _byPropName = new Map<string, number>();\n private _byJsonName = new Map<string, number>();\n private _byNoCase = new Map<string, number>();\n\n public constructor(public readonly properties: QueryPropertyMetaData[]) {\n for (const property of this.properties) {\n this._byPropName.set(property.name, property.index);\n this._byJsonName.set(property.jsonName, property.index);\n this._byNoCase.set(property.name.toLowerCase(), property.index);\n this._byNoCase.set(property.jsonName.toLowerCase(), property.index);\n }\n }\n\n public get length(): number {\n return this.properties.length;\n }\n\n public [Symbol.iterator](): Iterator<QueryPropertyMetaData, any, undefined> {\n return this.properties[Symbol.iterator]();\n }\n\n public findByName(name: string): QueryPropertyMetaData | undefined {\n const index = this._byPropName.get(name);\n if (typeof index === \"number\") {\n return this.properties[index];\n }\n return undefined;\n }\n\n public findByJsonName(name: string): QueryPropertyMetaData | undefined {\n const index = this._byJsonName.get(name);\n if (typeof index === \"number\") {\n return this.properties[index];\n }\n return undefined;\n }\n\n public findByNoCase(name: string): QueryPropertyMetaData | undefined {\n const index = this._byNoCase.get(name.toLowerCase());\n if (typeof index === \"number\") {\n return this.properties[index];\n }\n return undefined;\n }\n}\n\n/**\n * The format for rows returned by [[ECSqlReader]].\n * @public\n */\nexport type QueryValueType = any;\n\n/**\n * Methods and ways of accessing values from rows returned by [[ECSqlReader]].\n * @public\n */\nexport interface QueryRowProxy {\n /**\n * Get the current row as a JavaScript `object`.\n *\n * @returns The current row as a JavaScript `object`.\n */\n toRow(): any;\n\n /**\n * Get all remaining rows from the query result.\n * If called on the current row ([[ECSqlReader.current]]), only that row is returned.\n *\n * @returns All remaining rows from the query result.\n */\n toArray(): QueryValueType[];\n\n /**\n * Get the metadata for each column in the query result.\n *\n * @returns The metadata for each column in the query result.\n */\n getMetaData(): QueryPropertyMetaData[];\n\n /**\n * Access a property using its name.\n *\n * @returns The value from the row whose key (ECSQL column name) is `propertyName`.\n *\n * @example\n * The following lines will all return the same result:\n * ```ts\n * reader.current.ECInstanceId;\n * reader.current.ecinstanceid;\n * reader.current.[\"ECInstanceId\"];\n * ```\n */\n [propertyName: string]: QueryValueType;\n\n /**\n * Access a property using its index.\n * The index is relative to the order of the columns returned by the query that produced the row.\n *\n * @returns The value from the column at `propertyIndex`.\n *\n * @example reader.current[0]\n */\n [propertyIndex: number]: QueryValueType;\n}\n\n/**\n * Performance-related statistics for [[ECSqlReader]].\n * @public\n */\nexport interface QueryStats {\n /** Time spent running the query; not including time spent queued. Time is in microseconds */\n backendCpuTime: number;\n /** Total time it took the backend to run the query. Time is in milliseconds. */\n backendTotalTime: number;\n /** Estimated memory used for the query. */\n backendMemUsed: number;\n /** Total number of rows returned by the backend. */\n backendRowsReturned: number;\n /** The total round trip time from the client's perspective. Time is in milliseconds. */\n totalTime: number;\n /** The number of retries attempted to execute the query. */\n retryCount: number;\n}\n\n/**\n * Execute ECSQL statements and read the results.\n *\n * The query results are returned one row at a time. The format of the row is dictated by the\n * [[QueryOptions.rowFormat]] specified in the `options` parameter of the constructed ECSqlReader object. Defaults to\n * [[QueryRowFormat.UseECSqlPropertyIndexes]] when no `rowFormat` is defined.\n *\n * There are three primary ways to interact with and read the results:\n * - Stream them using ECSqlReader as an asynchronous iterator.\n * - Iterator over them manually using [[ECSqlReader.step]].\n * - Capture all of the results at once in an array using [[QueryRowProxy.toArray]].\n *\n * @see\n * - [ECSQL Overview]($docs/learning/backend/ExecutingECSQL)\n * - [ECSQL Row Formats]($docs/learning/ECSQLRowFormat) for more details on how rows are formatted.\n * - [ECSQL Code Examples]($docs/learning/ECSQLCodeExamples#iterating-over-query-results) for examples of each\n * of the above ways of interacting with ECSqlReader.\n *\n * @note When iterating over the results, the current row will be a [[QueryRowProxy]] object. To get the row as a basic\n * JavaScript object, call [[QueryRowProxy.toRow]] on it.\n * @public\n */\nexport class ECSqlReader implements AsyncIterableIterator<QueryRowProxy> {\n private static readonly _maxRetryCount = 10;\n\n private _localRows: any[] = [];\n private _localOffset: number = 0;\n private _globalOffset: number = -1;\n private _globalCount: number = -1;\n private _done: boolean = false;\n private _globalDone: boolean = false;\n private _props = new PropertyMetaDataMap([]);\n private _param = new QueryBinder().serialize();\n private _lockArgs: boolean = false;\n private _stats = { backendCpuTime: 0, backendTotalTime: 0, backendMemUsed: 0, backendRowsReturned: 0, totalTime: 0, retryCount: 0 };\n private _options: QueryOptions = new QueryOptionsBuilder().getOptions();\n\n private _rowProxy = new Proxy<ECSqlReader>(this, {\n get: (target: ECSqlReader, key: string | symbol) => {\n if (typeof key === \"string\") {\n const idx = Number.parseInt(key, 10);\n if (!Number.isNaN(idx)) {\n return target.getRowInternal()[idx];\n }\n const prop = target._props.findByNoCase(key);\n if (prop) {\n return target.getRowInternal()[prop.index];\n }\n if (key === \"getMetaData\") {\n return () => target._props.properties;\n }\n if (key === \"toRow\") {\n return () => target.formatCurrentRow(true);\n }\n if (key === \"toArray\") {\n return () => this.getRowInternal();\n }\n }\n return undefined;\n },\n has: (target: ECSqlReader, p: string | symbol) => {\n return !target._props.findByNoCase(p as string);\n },\n ownKeys: (target: ECSqlReader) => {\n const keys = [];\n for (const prop of target._props) {\n keys.push(prop.name);\n }\n return keys;\n },\n });\n\n /**\n * @internal\n */\n public constructor(private _executor: DbRequestExecutor<DbQueryRequest, DbQueryResponse>, public readonly query: string, param?: QueryBinder, options?: QueryOptions) {\n if (query.trim().length === 0) {\n throw new Error(\"expecting non-empty ecsql statement\");\n }\n if (param) {\n this._param = param.serialize();\n }\n this.reset(options);\n }\n\n private static replaceBase64WithUint8Array(row: any) {\n for (const key of Object.keys(row)) {\n const val = row[key];\n if (typeof val === \"string\") {\n if (Base64EncodedString.hasPrefix(val)) {\n row[key] = Base64EncodedString.toUint8Array(val);\n }\n } else if (typeof val === \"object\" && val !== null) {\n this.replaceBase64WithUint8Array(val);\n }\n }\n }\n\n public setParams(param: QueryBinder) {\n if (this._lockArgs) {\n throw new Error(\"call resetBindings() before setting or changing parameters\");\n }\n this._param = param.serialize();\n }\n\n public reset(options?: QueryOptions) {\n if (options) {\n this._options = options;\n }\n this._props = new PropertyMetaDataMap([]);\n this._localRows = [];\n this._globalDone = false;\n this._globalOffset = 0;\n this._globalCount = -1;\n if (typeof this._options.rowFormat === \"undefined\")\n this._options.rowFormat = QueryRowFormat.UseECSqlPropertyIndexes;\n if (this._options.limit) {\n if (typeof this._options.limit.offset === \"number\" && this._options.limit.offset > 0)\n this._globalOffset = this._options.limit.offset;\n if (typeof this._options.limit.count === \"number\" && this._options.limit.count > 0)\n this._globalCount = this._options.limit.count;\n }\n this._done = false;\n }\n\n /**\n * Get the current row from the query result. The current row is the one most recently stepped-to\n * (by step() or during iteration).\n *\n * Each value from the row can be accessed by index or by name.\n *\n * The format of the row is dictated by the [[QueryOptions.rowFormat]] specified in the `options` parameter of the\n * constructed ECSqlReader object.\n *\n * @see\n * - [[QueryRowFormat]]\n * - [ECSQL Row Formats]($docs/learning/ECSQLRowFormat)\n *\n * @note The current row is be a [[QueryRowProxy]] object. To get the row as a basic JavaScript object, call\n * [[QueryRowProxy.toRow]] on it.\n *\n * @example\n * ```ts\n * const reader = iModel.createQueryReader(\"SELECT ECInstanceId FROM bis.Element\");\n * while (await reader.step()) {\n * // Both lines below print the same value\n * console.log(reader.current[0]);\n * console.log(reader.current.ecinstanceid);\n * }\n * ```\n *\n * @return The current row as a [[QueryRowProxy]].\n */\n public get current(): QueryRowProxy {\n return this._rowProxy as any;\n }\n\n /**\n * Clear all bindings.\n */\n public resetBindings() {\n this._param = new QueryBinder().serialize();\n this._lockArgs = false;\n }\n\n /**\n * Returns if there are more rows available.\n *\n * @returns `true` if all rows have been stepped through already.<br/>\n * `false` if there are any yet unaccessed rows.\n */\n public get done(): boolean {\n return this._done;\n }\n\n /**\n * @internal\n */\n public getRowInternal(): any[] {\n if (this._localRows.length <= this._localOffset)\n throw new Error(\"no current row\");\n return this._localRows[this._localOffset] as any[];\n }\n\n /**\n * Get performance-related statistics for the current query.\n */\n public get stats(): QueryStats {\n return this._stats;\n }\n\n /**\n *\n */\n private async readRows(): Promise<any[]> {\n if (this._globalDone) {\n return [];\n }\n this._lockArgs = true;\n this._globalOffset += this._localRows.length;\n this._globalCount -= this._localRows.length;\n if (this._globalCount === 0) {\n return [];\n }\n const valueFormat = this._options.rowFormat === QueryRowFormat.UseJsPropertyNames ? DbValueFormat.JsNames : DbValueFormat.ECSqlNames;\n const request: DbQueryRequest = {\n ... this._options,\n kind: DbRequestKind.ECSql,\n valueFormat,\n query: this.query,\n args: this._param,\n };\n request.includeMetaData = this._props.length > 0 ? false : true;\n request.limit = { offset: this._globalOffset, count: this._globalCount < 1 ? -1 : this._globalCount };\n const resp = await this.runWithRetry(request);\n this._globalDone = resp.status === DbResponseStatus.Done;\n if (this._props.length === 0 && resp.meta.length > 0) {\n this._props = new PropertyMetaDataMap(resp.meta);\n }\n for (const row of resp.data) {\n ECSqlReader.replaceBase64WithUint8Array(row);\n }\n return resp.data;\n }\n\n /**\n * @internal\n */\n protected async runWithRetry(request: DbQueryRequest) {\n const needRetry = (rs: DbQueryResponse) => (rs.status === DbResponseStatus.Partial || rs.status === DbResponseStatus.QueueFull || rs.status === DbResponseStatus.Timeout) && (rs.data === undefined || rs.data.length === 0);\n const updateStats = (rs: DbQueryResponse) => {\n this._stats.backendCpuTime += rs.stats.cpuTime;\n this._stats.backendTotalTime += rs.stats.totalTime;\n this._stats.backendMemUsed += rs.stats.memUsed;\n this._stats.backendRowsReturned += (rs.data === undefined) ? 0 : rs.data.length;\n };\n const execQuery = async (req: DbQueryRequest) => {\n const startTime = Date.now();\n const rs = await this._executor.execute(req);\n this.stats.totalTime += (Date.now() - startTime);\n return rs;\n };\n let retry = ECSqlReader._maxRetryCount;\n let resp = await execQuery(request);\n DbQueryError.throwIfError(resp, request);\n while (--retry > 0 && needRetry(resp)) {\n resp = await execQuery(request);\n this._stats.retryCount += 1;\n if (needRetry(resp)) {\n updateStats(resp);\n }\n }\n if (retry === 0 && needRetry(resp)) {\n throw new Error(\"query too long to execute or server is too busy\");\n }\n updateStats(resp);\n return resp;\n }\n\n /**\n * @internal\n */\n public formatCurrentRow(onlyReturnObject: boolean = false): any[] | object {\n if (!onlyReturnObject && this._options.rowFormat === QueryRowFormat.UseECSqlPropertyIndexes) {\n return this.getRowInternal();\n }\n const formattedRow = {};\n for (const prop of this._props) {\n const propName = this._options.rowFormat === QueryRowFormat.UseJsPropertyNames ? prop.jsonName : prop.name;\n const val = this.getRowInternal()[prop.index];\n if (typeof val !== \"undefined\" && val !== null) {\n Object.defineProperty(formattedRow, propName, {\n value: val,\n enumerable: true,\n });\n }\n }\n return formattedRow;\n }\n\n /**\n * Get the metadata for each column in the query result.\n *\n * @returns An array of [[QueryPropertyMetaData]].\n */\n public async getMetaData(): Promise<QueryPropertyMetaData[]> {\n if (this._props.length === 0) {\n await this.fetchRows();\n }\n return this._props.properties;\n }\n\n /**\n *\n */\n private async fetchRows() {\n this._localOffset = -1;\n this._localRows = await this.readRows();\n if (this._localRows.length === 0) {\n this._done = true;\n }\n }\n\n /**\n * Step to the next row of the query result.\n *\n * @returns `true` if a row can be read from `current`.<br/>\n * `false` if there are no more rows; i.e., all rows have been stepped through already.\n */\n public async step(): Promise<boolean> {\n if (this._done) {\n return false;\n }\n const cachedRows = this._localRows.length;\n if (this._localOffset < cachedRows - 1) {\n ++this._localOffset;\n } else {\n await this.fetchRows();\n this._localOffset = 0;\n return !this._done;\n }\n return true;\n }\n\n /**\n * Get all remaining rows from the query result.\n *\n * @returns An array of all remaining rows from the query result.\n */\n public async toArray(): Promise<any[]> {\n const rows = [];\n while (await this.step()) {\n rows.push(this.formatCurrentRow());\n }\n return rows;\n }\n\n /**\n * Accessor for using ECSqlReader as an asynchronous iterator.\n *\n * @returns An asynchronous iterator over the rows returned by the executed ECSQL query.\n */\n public [Symbol.asyncIterator](): AsyncIterableIterator<QueryRowProxy> {\n return this;\n }\n\n /**\n * Calls step when called as an iterator.\n *\n * Returns the row alongside a `done` boolean to indicate if there are any more rows for an iterator to step to.\n *\n * @returns An object with the keys: `value` which contains the row and `done` which contains a boolean.\n */\n public async next(): Promise<IteratorResult<QueryRowProxy, any>> {\n if (await this.step()) {\n return {\n done: false,\n value: this.current,\n };\n } else {\n return {\n done: true,\n value: this.current,\n };\n }\n }\n}\n\n"]}
1
+ {"version":3,"file":"ECSqlReader.js","sourceRoot":"","sources":["../../src/ECSqlReader.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,YAAY,EAAsD,aAAa,EAAE,gBAAgB,EAAE,aAAa,EAAE,WAAW,EAAgB,mBAAmB,EACzI,cAAc,GACtC,MAAM,mBAAmB,CAAC;AAE3B,cAAc;AACd,MAAM,OAAO,mBAAmB;IAK9B,YAAmC,UAAmC;QAAnC,eAAU,GAAV,UAAU,CAAyB;QAJ9D,gBAAW,GAAG,IAAI,GAAG,EAAkB,CAAC;QACxC,gBAAW,GAAG,IAAI,GAAG,EAAkB,CAAC;QACxC,cAAS,GAAG,IAAI,GAAG,EAAkB,CAAC;QAG5C,KAAK,MAAM,QAAQ,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACvC,QAAQ,CAAC,UAAU,GAAG,QAAQ,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,CAAG,uDAAuD;YACjJ,QAAQ,CAAC,YA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;QACJ,CAAC;IACH,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module iModels\n */\nimport { Base64EncodedString } from \"./Base64EncodedString\";\nimport {\n DbQueryError, DbQueryRequest, DbQueryResponse, DbRequestExecutor, DbRequestKind, DbResponseStatus, DbValueFormat, QueryBinder, QueryOptions, QueryOptionsBuilder,\n QueryPropertyMetaData, QueryRowFormat,\n} from \"./ConcurrentQuery\";\n\n/** @public */\nexport class PropertyMetaDataMap implements Iterable<QueryPropertyMetaData> {\n private _byPropName = new Map<string, number>();\n private _byJsonName = new Map<string, number>();\n private _byNoCase = new Map<string, number>();\n\n public constructor(public readonly properties: QueryPropertyMetaData[]) {\n for (const property of this.properties) {\n property.extendType = property.extendedType !== undefined ? property.extendedType : \"\"; // eslint-disable-line @typescript-eslint/no-deprecated\n property.extendedType = property.extendedType === \"\" ? undefined : property.extendedType;\n this._byPropName.set(property.name, property.index);\n this._byJsonName.set(property.jsonName, property.index);\n this._byNoCase.set(property.name.toLowerCase(), property.index);\n this._byNoCase.set(property.jsonName.toLowerCase(), property.index);\n }\n }\n\n public get length(): number {\n return this.properties.length;\n }\n\n public [Symbol.iterator](): Iterator<QueryPropertyMetaData, any, undefined> {\n return this.properties[Symbol.iterator]();\n }\n\n public findByName(name: string): QueryPropertyMetaData | undefined {\n const index = this._byPropName.get(name);\n if (typeof index === \"number\") {\n return this.properties[index];\n }\n return undefined;\n }\n\n public findByJsonName(name: string): QueryPropertyMetaData | undefined {\n const index = this._byJsonName.get(name);\n if (typeof index === \"number\") {\n return this.properties[index];\n }\n return undefined;\n }\n\n public findByNoCase(name: string): QueryPropertyMetaData | undefined {\n const index = this._byNoCase.get(name.toLowerCase());\n if (typeof index === \"number\") {\n return this.properties[index];\n }\n return undefined;\n }\n}\n\n/**\n * The format for rows returned by [[ECSqlReader]].\n * @public\n */\nexport type QueryValueType = any;\n\n/**\n * Methods and ways of accessing values from rows returned by [[ECSqlReader]].\n * @public\n */\nexport interface QueryRowProxy {\n /**\n * Get the current row as a JavaScript `object`.\n *\n * @returns The current row as a JavaScript `object`.\n */\n toRow(): any;\n\n /**\n * Get all remaining rows from the query result.\n * If called on the current row ([[ECSqlReader.current]]), only that row is returned.\n *\n * @returns All remaining rows from the query result.\n */\n toArray(): QueryValueType[];\n\n /**\n * Get the metadata for each column in the query result.\n *\n * @returns The metadata for each column in the query result.\n */\n getMetaData(): QueryPropertyMetaData[];\n\n /**\n * Access a property using its name.\n *\n * @returns The value from the row whose key (ECSQL column name) is `propertyName`.\n *\n * @example\n * The following lines will all return the same result:\n * ```ts\n * reader.current.ECInstanceId;\n * reader.current.ecinstanceid;\n * reader.current.[\"ECInstanceId\"];\n * ```\n */\n [propertyName: string]: QueryValueType;\n\n /**\n * Access a property using its index.\n * The index is relative to the order of the columns returned by the query that produced the row.\n *\n * @returns The value from the column at `propertyIndex`.\n *\n * @example reader.current[0]\n */\n [propertyIndex: number]: QueryValueType;\n}\n\n/**\n * Performance-related statistics for [[ECSqlReader]].\n * @public\n */\nexport interface QueryStats {\n /** Time spent running the query; not including time spent queued. Time is in microseconds */\n backendCpuTime: number;\n /** Total time it took the backend to run the query. Time is in milliseconds. */\n backendTotalTime: number;\n /** Estimated memory used for the query. */\n backendMemUsed: number;\n /** Total number of rows returned by the backend. */\n backendRowsReturned: number;\n /** The total round trip time from the client's perspective. Time is in milliseconds. */\n totalTime: number;\n /** The number of retries attempted to execute the query. */\n retryCount: number;\n}\n\n/**\n * Execute ECSQL statements and read the results.\n *\n * The query results are returned one row at a time. The format of the row is dictated by the\n * [[QueryOptions.rowFormat]] specified in the `options` parameter of the constructed ECSqlReader object. Defaults to\n * [[QueryRowFormat.UseECSqlPropertyIndexes]] when no `rowFormat` is defined.\n *\n * There are three primary ways to interact with and read the results:\n * - Stream them using ECSqlReader as an asynchronous iterator.\n * - Iterator over them manually using [[ECSqlReader.step]].\n * - Capture all of the results at once in an array using [[QueryRowProxy.toArray]].\n *\n * @see\n * - [ECSQL Overview]($docs/learning/backend/ExecutingECSQL)\n * - [ECSQL Row Formats]($docs/learning/ECSQLRowFormat) for more details on how rows are formatted.\n * - [ECSQL Code Examples]($docs/learning/ECSQLCodeExamples#iterating-over-query-results) for examples of each\n * of the above ways of interacting with ECSqlReader.\n *\n * @note When iterating over the results, the current row will be a [[QueryRowProxy]] object. To get the row as a basic\n * JavaScript object, call [[QueryRowProxy.toRow]] on it.\n * @public\n */\nexport class ECSqlReader implements AsyncIterableIterator<QueryRowProxy> {\n private static readonly _maxRetryCount = 10;\n\n private _localRows: any[] = [];\n private _localOffset: number = 0;\n private _globalOffset: number = -1;\n private _globalCount: number = -1;\n private _done: boolean = false;\n private _globalDone: boolean = false;\n private _props = new PropertyMetaDataMap([]);\n private _param = new QueryBinder().serialize();\n private _lockArgs: boolean = false;\n private _stats = { backendCpuTime: 0, backendTotalTime: 0, backendMemUsed: 0, backendRowsReturned: 0, totalTime: 0, retryCount: 0 };\n private _options: QueryOptions = new QueryOptionsBuilder().getOptions();\n\n private _rowProxy = new Proxy<ECSqlReader>(this, {\n get: (target: ECSqlReader, key: string | symbol) => {\n if (typeof key === \"string\") {\n const idx = Number.parseInt(key, 10);\n if (!Number.isNaN(idx)) {\n return target.getRowInternal()[idx];\n }\n const prop = target._props.findByNoCase(key);\n if (prop) {\n return target.getRowInternal()[prop.index];\n }\n if (key === \"getMetaData\") {\n return () => target._props.properties;\n }\n if (key === \"toRow\") {\n return () => target.formatCurrentRow(true);\n }\n if (key === \"toArray\") {\n return () => this.getRowInternal();\n }\n }\n return undefined;\n },\n has: (target: ECSqlReader, p: string | symbol) => {\n return !target._props.findByNoCase(p as string);\n },\n ownKeys: (target: ECSqlReader) => {\n const keys = [];\n for (const prop of target._props) {\n keys.push(prop.name);\n }\n return keys;\n },\n });\n\n /**\n * @internal\n */\n public constructor(private _executor: DbRequestExecutor<DbQueryRequest, DbQueryResponse>, public readonly query: string, param?: QueryBinder, options?: QueryOptions) {\n if (query.trim().length === 0) {\n throw new Error(\"expecting non-empty ecsql statement\");\n }\n if (param) {\n this._param = param.serialize();\n }\n this.reset(options);\n }\n\n private static replaceBase64WithUint8Array(row: any) {\n for (const key of Object.keys(row)) {\n const val = row[key];\n if (typeof val === \"string\") {\n if (Base64EncodedString.hasPrefix(val)) {\n row[key] = Base64EncodedString.toUint8Array(val);\n }\n } else if (typeof val === \"object\" && val !== null) {\n this.replaceBase64WithUint8Array(val);\n }\n }\n }\n\n public setParams(param: QueryBinder) {\n if (this._lockArgs) {\n throw new Error(\"call resetBindings() before setting or changing parameters\");\n }\n this._param = param.serialize();\n }\n\n public reset(options?: QueryOptions) {\n if (options) {\n this._options = options;\n }\n this._props = new PropertyMetaDataMap([]);\n this._localRows = [];\n this._globalDone = false;\n this._globalOffset = 0;\n this._globalCount = -1;\n if (typeof this._options.rowFormat === \"undefined\")\n this._options.rowFormat = QueryRowFormat.UseECSqlPropertyIndexes;\n if (this._options.limit) {\n if (typeof this._options.limit.offset === \"number\" && this._options.limit.offset > 0)\n this._globalOffset = this._options.limit.offset;\n if (typeof this._options.limit.count === \"number\" && this._options.limit.count > 0)\n this._globalCount = this._options.limit.count;\n }\n this._done = false;\n }\n\n /**\n * Get the current row from the query result. The current row is the one most recently stepped-to\n * (by step() or during iteration).\n *\n * Each value from the row can be accessed by index or by name.\n *\n * The format of the row is dictated by the [[QueryOptions.rowFormat]] specified in the `options` parameter of the\n * constructed ECSqlReader object.\n *\n * @see\n * - [[QueryRowFormat]]\n * - [ECSQL Row Formats]($docs/learning/ECSQLRowFormat)\n *\n * @note The current row is be a [[QueryRowProxy]] object. To get the row as a basic JavaScript object, call\n * [[QueryRowProxy.toRow]] on it.\n *\n * @example\n * ```ts\n * const reader = iModel.createQueryReader(\"SELECT ECInstanceId FROM bis.Element\");\n * while (await reader.step()) {\n * // Both lines below print the same value\n * console.log(reader.current[0]);\n * console.log(reader.current.ecinstanceid);\n * }\n * ```\n *\n * @return The current row as a [[QueryRowProxy]].\n */\n public get current(): QueryRowProxy {\n return this._rowProxy as any;\n }\n\n /**\n * Clear all bindings.\n */\n public resetBindings() {\n this._param = new QueryBinder().serialize();\n this._lockArgs = false;\n }\n\n /**\n * Returns if there are more rows available.\n *\n * @returns `true` if all rows have been stepped through already.<br/>\n * `false` if there are any yet unaccessed rows.\n */\n public get done(): boolean {\n return this._done;\n }\n\n /**\n * @internal\n */\n public getRowInternal(): any[] {\n if (this._localRows.length <= this._localOffset)\n throw new Error(\"no current row\");\n return this._localRows[this._localOffset] as any[];\n }\n\n /**\n * Get performance-related statistics for the current query.\n */\n public get stats(): QueryStats {\n return this._stats;\n }\n\n /**\n *\n */\n private async readRows(): Promise<any[]> {\n if (this._globalDone) {\n return [];\n }\n this._lockArgs = true;\n this._globalOffset += this._localRows.length;\n this._globalCount -= this._localRows.length;\n if (this._globalCount === 0) {\n return [];\n }\n const valueFormat = this._options.rowFormat === QueryRowFormat.UseJsPropertyNames ? DbValueFormat.JsNames : DbValueFormat.ECSqlNames;\n const request: DbQueryRequest = {\n ... this._options,\n kind: DbRequestKind.ECSql,\n valueFormat,\n query: this.query,\n args: this._param,\n };\n request.includeMetaData = this._props.length > 0 ? false : true;\n request.limit = { offset: this._globalOffset, count: this._globalCount < 1 ? -1 : this._globalCount };\n const resp = await this.runWithRetry(request);\n this._globalDone = resp.status === DbResponseStatus.Done;\n if (this._props.length === 0 && resp.meta.length > 0) {\n this._props = new PropertyMetaDataMap(resp.meta);\n }\n for (const row of resp.data) {\n ECSqlReader.replaceBase64WithUint8Array(row);\n }\n return resp.data;\n }\n\n /**\n * @internal\n */\n protected async runWithRetry(request: DbQueryRequest) {\n const needRetry = (rs: DbQueryResponse) => (rs.status === DbResponseStatus.Partial || rs.status === DbResponseStatus.QueueFull || rs.status === DbResponseStatus.Timeout) && (rs.data === undefined || rs.data.length === 0);\n const updateStats = (rs: DbQueryResponse) => {\n this._stats.backendCpuTime += rs.stats.cpuTime;\n this._stats.backendTotalTime += rs.stats.totalTime;\n this._stats.backendMemUsed += rs.stats.memUsed;\n this._stats.backendRowsReturned += (rs.data === undefined) ? 0 : rs.data.length;\n };\n const execQuery = async (req: DbQueryRequest) => {\n const startTime = Date.now();\n const rs = await this._executor.execute(req);\n this.stats.totalTime += (Date.now() - startTime);\n return rs;\n };\n let retry = ECSqlReader._maxRetryCount;\n let resp = await execQuery(request);\n DbQueryError.throwIfError(resp, request);\n while (--retry > 0 && needRetry(resp)) {\n resp = await execQuery(request);\n this._stats.retryCount += 1;\n if (needRetry(resp)) {\n updateStats(resp);\n }\n }\n if (retry === 0 && needRetry(resp)) {\n throw new Error(\"query too long to execute or server is too busy\");\n }\n updateStats(resp);\n return resp;\n }\n\n /**\n * @internal\n */\n public formatCurrentRow(onlyReturnObject: boolean = false): any[] | object {\n if (!onlyReturnObject && this._options.rowFormat === QueryRowFormat.UseECSqlPropertyIndexes) {\n return this.getRowInternal();\n }\n const formattedRow = {};\n for (const prop of this._props) {\n const propName = this._options.rowFormat === QueryRowFormat.UseJsPropertyNames ? prop.jsonName : prop.name;\n const val = this.getRowInternal()[prop.index];\n if (typeof val !== \"undefined\" && val !== null) {\n Object.defineProperty(formattedRow, propName, {\n value: val,\n enumerable: true,\n });\n }\n }\n return formattedRow;\n }\n\n /**\n * Get the metadata for each column in the query result.\n *\n * @returns An array of [[QueryPropertyMetaData]].\n */\n public async getMetaData(): Promise<QueryPropertyMetaData[]> {\n if (this._props.length === 0) {\n await this.fetchRows();\n }\n return this._props.properties;\n }\n\n /**\n *\n */\n private async fetchRows() {\n this._localOffset = -1;\n this._localRows = await this.readRows();\n if (this._localRows.length === 0) {\n this._done = true;\n }\n }\n\n /**\n * Step to the next row of the query result.\n *\n * @returns `true` if a row can be read from `current`.<br/>\n * `false` if there are no more rows; i.e., all rows have been stepped through already.\n */\n public async step(): Promise<boolean> {\n if (this._done) {\n return false;\n }\n const cachedRows = this._localRows.length;\n if (this._localOffset < cachedRows - 1) {\n ++this._localOffset;\n } else {\n await this.fetchRows();\n this._localOffset = 0;\n return !this._done;\n }\n return true;\n }\n\n /**\n * Get all remaining rows from the query result.\n *\n * @returns An array of all remaining rows from the query result.\n */\n public async toArray(): Promise<any[]> {\n const rows = [];\n while (await this.step()) {\n rows.push(this.formatCurrentRow());\n }\n return rows;\n }\n\n /**\n * Accessor for using ECSqlReader as an asynchronous iterator.\n *\n * @returns An asynchronous iterator over the rows returned by the executed ECSQL query.\n */\n public [Symbol.asyncIterator](): AsyncIterableIterator<QueryRowProxy> {\n return this;\n }\n\n /**\n * Calls step when called as an iterator.\n *\n * Returns the row alongside a `done` boolean to indicate if there are any more rows for an iterator to step to.\n *\n * @returns An object with the keys: `value` which contains the row and `done` which contains a boolean.\n */\n public async next(): Promise<IteratorResult<QueryRowProxy, any>> {\n if (await this.step()) {\n return {\n done: false,\n value: this.current,\n };\n } else {\n return {\n done: true,\n value: this.current,\n };\n }\n }\n}\n\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ElementProps.d.ts","sourceRoot":"","sources":["../../src/ElementProps.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAQ,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EACL,UAAU,EAAE,eAAe,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,cAAc,EAAE,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EACzH,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,4BAA4B,EAAE,mCAAmC,EAAE,MAAM,4BAA4B,CAAC;AAC/G,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAA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
6
  * @module Entities
7
7
  */
8
- import { Id64 } from "@itwin/core-bentley";
9
- import { IModelError, IModelStatus } from "./IModelError";
8
+ import { Id64, IModelStatus } from "@itwin/core-bentley";
9
+ import { IModelError } from "./IModelError";
10
10
  /** The Id and relationship class of an Element that is somehow related to another Element
11
11
  * @public
12
12
  */
@@ -18,6 +18,8 @@ export class RelatedElement {
18
18
  static fromJSON(json) {
19
19
  return json ? new RelatedElement(json) : undefined;
20
20
  }
21
+ /** Used to *null out* an existing navigation relationship. */
22
+ static { this.none = new RelatedElement({ id: Id64.invalid }); }
21
23
  /** Accept the value of a navigation property that might be in the shortened format of just an id or might be in the full RelatedElement format. */
22
24
  static idFromJson(json) {
23
25
  if ((typeof json === "object") && ("id" in json)) {
@@ -35,8 +37,6 @@ export class RelatedElement {
35
37
  };
36
38
  }
37
39
  }
38
- /** Used to *null out* an existing navigation relationship. */
39
- RelatedElement.none = new RelatedElement({ id: Id64.invalid });
40
40
  /** A [RelatedElement]($common) relationship that describes the [TypeDefinitionElement]($backend) of an element.
41
41
  * @public
42
42
  */