@akohn/dashql 0.0.0-stage → 0.0.19-dev.247

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 (817) hide show
  1. package/LICENSE +373 -0
  2. package/NOTICE +66 -0
  3. package/README.md +155 -2
  4. package/dist/_virtual/_rolldown/runtime.js +12 -0
  5. package/dist/core/api.d.ts +321 -0
  6. package/dist/core/api.js +881 -0
  7. package/dist/core/batch.d.ts +31 -0
  8. package/dist/core/batch.js +92 -0
  9. package/dist/core/batch_worker.d.ts +1 -0
  10. package/dist/core/batch_worker.js +43 -0
  11. package/dist/core/batch_worker_client.d.ts +20 -0
  12. package/dist/core/batch_worker_client.js +85 -0
  13. package/dist/core/batch_worker_protocol.d.ts +13 -0
  14. package/dist/core/batch_worker_protocol.js +0 -0
  15. package/dist/core/browser_worker.d.ts +3 -0
  16. package/dist/core/browser_worker.js +1 -0
  17. package/dist/core/buffers.d.ts +15 -0
  18. package/dist/core/buffers.js +35 -0
  19. package/dist/core/comment_tags.d.ts +22 -0
  20. package/dist/core/comment_tags.js +48 -0
  21. package/dist/core/connection.d.ts +3 -0
  22. package/dist/core/connection.js +1 -0
  23. package/dist/core/dataflow.d.ts +79 -0
  24. package/dist/core/dataflow.js +124 -0
  25. package/dist/core/flatbuffer_view.d.ts +14 -0
  26. package/dist/core/flatbuffer_view.js +43 -0
  27. package/dist/core/format.d.ts +4 -0
  28. package/dist/core/format.js +23 -0
  29. package/dist/core/index.d.ts +14 -0
  30. package/dist/core/index.js +15 -0
  31. package/dist/core/lookup.d.ts +10 -0
  32. package/dist/core/lookup.js +129 -0
  33. package/dist/core/query_history.d.ts +13 -0
  34. package/dist/core/query_history.js +20 -0
  35. package/dist/core/runtime.d.ts +2 -0
  36. package/dist/core/runtime.js +1 -0
  37. package/dist/core/tokens.d.ts +9 -0
  38. package/dist/core/tokens.js +78 -0
  39. package/dist/core/variant.d.ts +4 -0
  40. package/dist/core/variant.js +0 -0
  41. package/dist/core/workbook.d.ts +6 -0
  42. package/dist/core/workbook.js +9 -0
  43. package/dist/gen/flatbuffers/dashql/buffers/algebra/binary-expression-function.d.ts +9 -0
  44. package/dist/gen/flatbuffers/dashql/buffers/algebra/binary-expression-function.js +12 -0
  45. package/dist/gen/flatbuffers/dashql/buffers/algebra/binary-expression.d.ts +40 -0
  46. package/dist/gen/flatbuffers/dashql/buffers/algebra/binary-expression.js +105 -0
  47. package/dist/gen/flatbuffers/dashql/buffers/algebra/column-ref-expression.d.ts +29 -0
  48. package/dist/gen/flatbuffers/dashql/buffers/algebra/column-ref-expression.js +84 -0
  49. package/dist/gen/flatbuffers/dashql/buffers/algebra/comparison-function.d.ts +9 -0
  50. package/dist/gen/flatbuffers/dashql/buffers/algebra/comparison-function.js +12 -0
  51. package/dist/gen/flatbuffers/dashql/buffers/algebra/comparison.d.ts +61 -0
  52. package/dist/gen/flatbuffers/dashql/buffers/algebra/comparison.js +165 -0
  53. package/dist/gen/flatbuffers/dashql/buffers/algebra/const-function-cast.d.ts +18 -0
  54. package/dist/gen/flatbuffers/dashql/buffers/algebra/const-function-cast.js +42 -0
  55. package/dist/gen/flatbuffers/dashql/buffers/algebra/const-interval-cast.d.ts +40 -0
  56. package/dist/gen/flatbuffers/dashql/buffers/algebra/const-interval-cast.js +105 -0
  57. package/dist/gen/flatbuffers/dashql/buffers/algebra/const-type-cast.d.ts +18 -0
  58. package/dist/gen/flatbuffers/dashql/buffers/algebra/const-type-cast.js +42 -0
  59. package/dist/gen/flatbuffers/dashql/buffers/algebra/expression-sub-type.d.ts +25 -0
  60. package/dist/gen/flatbuffers/dashql/buffers/algebra/expression-sub-type.js +58 -0
  61. package/dist/gen/flatbuffers/dashql/buffers/algebra/expression.d.ts +56 -0
  62. package/dist/gen/flatbuffers/dashql/buffers/algebra/expression.js +142 -0
  63. package/dist/gen/flatbuffers/dashql/buffers/algebra/function-call-expression.d.ts +46 -0
  64. package/dist/gen/flatbuffers/dashql/buffers/algebra/function-call-expression.js +111 -0
  65. package/dist/gen/flatbuffers/dashql/buffers/algebra/function-call-modifier.d.ts +9 -0
  66. package/dist/gen/flatbuffers/dashql/buffers/algebra/function-call-modifier.js +12 -0
  67. package/dist/gen/flatbuffers/dashql/buffers/algebra/literal-type.d.ts +7 -0
  68. package/dist/gen/flatbuffers/dashql/buffers/algebra/literal-type.js +10 -0
  69. package/dist/gen/flatbuffers/dashql/buffers/algebra/literal.d.ts +33 -0
  70. package/dist/gen/flatbuffers/dashql/buffers/algebra/literal.js +77 -0
  71. package/dist/gen/flatbuffers/dashql/buffers/algebra/nary-expression-function.d.ts +4 -0
  72. package/dist/gen/flatbuffers/dashql/buffers/algebra/nary-expression-function.js +7 -0
  73. package/dist/gen/flatbuffers/dashql/buffers/algebra/nary-expression.d.ts +47 -0
  74. package/dist/gen/flatbuffers/dashql/buffers/algebra/nary-expression.js +116 -0
  75. package/dist/gen/flatbuffers/dashql/buffers/algebra/resolved-column.d.ts +41 -0
  76. package/dist/gen/flatbuffers/dashql/buffers/algebra/resolved-column.js +132 -0
  77. package/dist/gen/flatbuffers/dashql/buffers/algebra/unary-expression.d.ts +33 -0
  78. package/dist/gen/flatbuffers/dashql/buffers/algebra/unary-expression.js +85 -0
  79. package/dist/gen/flatbuffers/dashql/buffers/algebra/unary-function.d.ts +4 -0
  80. package/dist/gen/flatbuffers/dashql/buffers/algebra/unary-function.js +7 -0
  81. package/dist/gen/flatbuffers/dashql/buffers/algebra.d.ts +19 -0
  82. package/dist/gen/flatbuffers/dashql/buffers/algebra.js +57 -0
  83. package/dist/gen/flatbuffers/dashql/buffers/analyzer/analyzed-script.d.ts +211 -0
  84. package/dist/gen/flatbuffers/dashql/buffers/analyzer/analyzed-script.js +563 -0
  85. package/dist/gen/flatbuffers/dashql/buffers/analyzer/analyzer-error-severity.d.ts +8 -0
  86. package/dist/gen/flatbuffers/dashql/buffers/analyzer/analyzer-error-severity.js +11 -0
  87. package/dist/gen/flatbuffers/dashql/buffers/analyzer/analyzer-error-type.d.ts +15 -0
  88. package/dist/gen/flatbuffers/dashql/buffers/analyzer/analyzer-error-type.js +18 -0
  89. package/dist/gen/flatbuffers/dashql/buffers/analyzer/analyzer-error.d.ts +61 -0
  90. package/dist/gen/flatbuffers/dashql/buffers/analyzer/analyzer-error.js +145 -0
  91. package/dist/gen/flatbuffers/dashql/buffers/analyzer/analyzer-warning.d.ts +18 -0
  92. package/dist/gen/flatbuffers/dashql/buffers/analyzer/analyzer-warning.js +42 -0
  93. package/dist/gen/flatbuffers/dashql/buffers/analyzer/client-function-call.d.ts +50 -0
  94. package/dist/gen/flatbuffers/dashql/buffers/analyzer/client-function-call.js +152 -0
  95. package/dist/gen/flatbuffers/dashql/buffers/analyzer/client-function-effect.d.ts +7 -0
  96. package/dist/gen/flatbuffers/dashql/buffers/analyzer/client-function-effect.js +10 -0
  97. package/dist/gen/flatbuffers/dashql/buffers/analyzer/constant-expression.d.ts +30 -0
  98. package/dist/gen/flatbuffers/dashql/buffers/analyzer/constant-expression.js +79 -0
  99. package/dist/gen/flatbuffers/dashql/buffers/analyzer/database-declaration.d.ts +26 -0
  100. package/dist/gen/flatbuffers/dashql/buffers/analyzer/database-declaration.js +73 -0
  101. package/dist/gen/flatbuffers/dashql/buffers/analyzer/function-declaration.d.ts +48 -0
  102. package/dist/gen/flatbuffers/dashql/buffers/analyzer/function-declaration.js +154 -0
  103. package/dist/gen/flatbuffers/dashql/buffers/analyzer/function-param.d.ts +30 -0
  104. package/dist/gen/flatbuffers/dashql/buffers/analyzer/function-param.js +85 -0
  105. package/dist/gen/flatbuffers/dashql/buffers/analyzer/function-reference.d.ts +33 -0
  106. package/dist/gen/flatbuffers/dashql/buffers/analyzer/function-reference.js +105 -0
  107. package/dist/gen/flatbuffers/dashql/buffers/analyzer/indexed-column-reference.d.ts +45 -0
  108. package/dist/gen/flatbuffers/dashql/buffers/analyzer/indexed-column-reference.js +103 -0
  109. package/dist/gen/flatbuffers/dashql/buffers/analyzer/indexed-table-reference.d.ts +39 -0
  110. package/dist/gen/flatbuffers/dashql/buffers/analyzer/indexed-table-reference.js +90 -0
  111. package/dist/gen/flatbuffers/dashql/buffers/analyzer/inference-confidence.d.ts +17 -0
  112. package/dist/gen/flatbuffers/dashql/buffers/analyzer/inference-confidence.js +20 -0
  113. package/dist/gen/flatbuffers/dashql/buffers/analyzer/inferred-column.d.ts +47 -0
  114. package/dist/gen/flatbuffers/dashql/buffers/analyzer/inferred-column.js +109 -0
  115. package/dist/gen/flatbuffers/dashql/buffers/analyzer/inferred-table-schema.d.ts +47 -0
  116. package/dist/gen/flatbuffers/dashql/buffers/analyzer/inferred-table-schema.js +113 -0
  117. package/dist/gen/flatbuffers/dashql/buffers/analyzer/insert-statement.d.ts +70 -0
  118. package/dist/gen/flatbuffers/dashql/buffers/analyzer/insert-statement.js +192 -0
  119. package/dist/gen/flatbuffers/dashql/buffers/analyzer/insert-target-column.d.ts +38 -0
  120. package/dist/gen/flatbuffers/dashql/buffers/analyzer/insert-target-column.js +89 -0
  121. package/dist/gen/flatbuffers/dashql/buffers/analyzer/name-scope.d.ts +81 -0
  122. package/dist/gen/flatbuffers/dashql/buffers/analyzer/name-scope.js +197 -0
  123. package/dist/gen/flatbuffers/dashql/buffers/analyzer/name-tag.d.ts +13 -0
  124. package/dist/gen/flatbuffers/dashql/buffers/analyzer/name-tag.js +16 -0
  125. package/dist/gen/flatbuffers/dashql/buffers/analyzer/parameter-kind.d.ts +13 -0
  126. package/dist/gen/flatbuffers/dashql/buffers/analyzer/parameter-kind.js +16 -0
  127. package/dist/gen/flatbuffers/dashql/buffers/analyzer/parameter.d.ts +54 -0
  128. package/dist/gen/flatbuffers/dashql/buffers/analyzer/parameter.js +139 -0
  129. package/dist/gen/flatbuffers/dashql/buffers/analyzer/qualified-column-name.d.ts +30 -0
  130. package/dist/gen/flatbuffers/dashql/buffers/analyzer/qualified-column-name.js +85 -0
  131. package/dist/gen/flatbuffers/dashql/buffers/analyzer/qualified-function-name.d.ts +34 -0
  132. package/dist/gen/flatbuffers/dashql/buffers/analyzer/qualified-function-name.js +97 -0
  133. package/dist/gen/flatbuffers/dashql/buffers/analyzer/qualified-table-name.d.ts +34 -0
  134. package/dist/gen/flatbuffers/dashql/buffers/analyzer/qualified-table-name.js +97 -0
  135. package/dist/gen/flatbuffers/dashql/buffers/analyzer/resolved-table.d.ts +43 -0
  136. package/dist/gen/flatbuffers/dashql/buffers/analyzer/resolved-table.js +128 -0
  137. package/dist/gen/flatbuffers/dashql/buffers/analyzer/schema-declaration.d.ts +30 -0
  138. package/dist/gen/flatbuffers/dashql/buffers/analyzer/schema-declaration.js +90 -0
  139. package/dist/gen/flatbuffers/dashql/buffers/analyzer/semantic-node-marker-type.d.ts +13 -0
  140. package/dist/gen/flatbuffers/dashql/buffers/analyzer/semantic-node-marker-type.js +16 -0
  141. package/dist/gen/flatbuffers/dashql/buffers/analyzer/sql-type-kind.d.ts +22 -0
  142. package/dist/gen/flatbuffers/dashql/buffers/analyzer/sql-type-kind.js +25 -0
  143. package/dist/gen/flatbuffers/dashql/buffers/analyzer/sql-type.d.ts +102 -0
  144. package/dist/gen/flatbuffers/dashql/buffers/analyzer/sql-type.js +256 -0
  145. package/dist/gen/flatbuffers/dashql/buffers/analyzer/table-column.d.ts +33 -0
  146. package/dist/gen/flatbuffers/dashql/buffers/analyzer/table-column.js +94 -0
  147. package/dist/gen/flatbuffers/dashql/buffers/analyzer/table-reference-role.d.ts +4 -0
  148. package/dist/gen/flatbuffers/dashql/buffers/analyzer/table-reference-role.js +7 -0
  149. package/dist/gen/flatbuffers/dashql/buffers/analyzer/table-reference.d.ts +56 -0
  150. package/dist/gen/flatbuffers/dashql/buffers/analyzer/table-reference.js +166 -0
  151. package/dist/gen/flatbuffers/dashql/buffers/analyzer/table.d.ts +56 -0
  152. package/dist/gen/flatbuffers/dashql/buffers/analyzer/table.js +193 -0
  153. package/dist/gen/flatbuffers/dashql/buffers/analyzer/visualization-spec.d.ts +71 -0
  154. package/dist/gen/flatbuffers/dashql/buffers/analyzer/visualization-spec.js +157 -0
  155. package/dist/gen/flatbuffers/dashql/buffers/analyzer.d.ts +36 -0
  156. package/dist/gen/flatbuffers/dashql/buffers/analyzer.js +104 -0
  157. package/dist/gen/flatbuffers/dashql/buffers/batch/batch-diagnostic.d.ts +40 -0
  158. package/dist/gen/flatbuffers/dashql/buffers/batch/batch-diagnostic.js +126 -0
  159. package/dist/gen/flatbuffers/dashql/buffers/batch/batch-request.d.ts +32 -0
  160. package/dist/gen/flatbuffers/dashql/buffers/batch/batch-request.js +94 -0
  161. package/dist/gen/flatbuffers/dashql/buffers/batch/batch-result.d.ts +25 -0
  162. package/dist/gen/flatbuffers/dashql/buffers/batch/batch-result.js +69 -0
  163. package/dist/gen/flatbuffers/dashql/buffers/batch/batch-script-input.d.ts +34 -0
  164. package/dist/gen/flatbuffers/dashql/buffers/batch/batch-script-input.js +89 -0
  165. package/dist/gen/flatbuffers/dashql/buffers/batch/batch-script-result.d.ts +67 -0
  166. package/dist/gen/flatbuffers/dashql/buffers/batch/batch-script-result.js +211 -0
  167. package/dist/gen/flatbuffers/dashql/buffers/batch/descriptor-buffer.d.ts +25 -0
  168. package/dist/gen/flatbuffers/dashql/buffers/batch/descriptor-buffer.js +72 -0
  169. package/dist/gen/flatbuffers/dashql/buffers/batch/diagnostic-severity.d.ts +4 -0
  170. package/dist/gen/flatbuffers/dashql/buffers/batch/diagnostic-severity.js +7 -0
  171. package/dist/gen/flatbuffers/dashql/buffers/batch/processing-stage.d.ts +5 -0
  172. package/dist/gen/flatbuffers/dashql/buffers/batch/processing-stage.js +8 -0
  173. package/dist/gen/flatbuffers/dashql/buffers/batch.d.ts +8 -0
  174. package/dist/gen/flatbuffers/dashql/buffers/batch.js +27 -0
  175. package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-content-statistics.d.ts +39 -0
  176. package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-content-statistics.js +89 -0
  177. package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-descriptor-pool.d.ts +25 -0
  178. package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-descriptor-pool.js +64 -0
  179. package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-descriptor.d.ts +35 -0
  180. package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-descriptor.js +97 -0
  181. package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-entries.d.ts +28 -0
  182. package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-entries.js +72 -0
  183. package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-entry-statistics.d.ts +31 -0
  184. package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-entry-statistics.js +71 -0
  185. package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-entry-type.d.ts +8 -0
  186. package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-entry-type.js +11 -0
  187. package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-entry.d.ts +43 -0
  188. package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-entry.js +126 -0
  189. package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-layer.d.ts +16 -0
  190. package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-layer.js +19 -0
  191. package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-memory-statistics.d.ts +45 -0
  192. package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-memory-statistics.js +103 -0
  193. package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-statistics.d.ts +34 -0
  194. package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-statistics.js +84 -0
  195. package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-table-update.d.ts +52 -0
  196. package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-table-update.js +128 -0
  197. package/dist/gen/flatbuffers/dashql/buffers/catalog/flat-catalog-entry.d.ts +59 -0
  198. package/dist/gen/flatbuffers/dashql/buffers/catalog/flat-catalog-entry.js +126 -0
  199. package/dist/gen/flatbuffers/dashql/buffers/catalog/flat-catalog.d.ts +101 -0
  200. package/dist/gen/flatbuffers/dashql/buffers/catalog/flat-catalog.js +252 -0
  201. package/dist/gen/flatbuffers/dashql/buffers/catalog/indexed-flat-database-entry.d.ts +27 -0
  202. package/dist/gen/flatbuffers/dashql/buffers/catalog/indexed-flat-database-entry.js +61 -0
  203. package/dist/gen/flatbuffers/dashql/buffers/catalog/indexed-flat-schema-entry.d.ts +27 -0
  204. package/dist/gen/flatbuffers/dashql/buffers/catalog/indexed-flat-schema-entry.js +61 -0
  205. package/dist/gen/flatbuffers/dashql/buffers/catalog/indexed-flat-table-entry.d.ts +27 -0
  206. package/dist/gen/flatbuffers/dashql/buffers/catalog/indexed-flat-table-entry.js +62 -0
  207. package/dist/gen/flatbuffers/dashql/buffers/catalog/schema-descriptor.d.ts +36 -0
  208. package/dist/gen/flatbuffers/dashql/buffers/catalog/schema-descriptor.js +96 -0
  209. package/dist/gen/flatbuffers/dashql/buffers/catalog/schema-descriptors.d.ts +31 -0
  210. package/dist/gen/flatbuffers/dashql/buffers/catalog/schema-descriptors.js +75 -0
  211. package/dist/gen/flatbuffers/dashql/buffers/catalog/schema-table-column.d.ts +29 -0
  212. package/dist/gen/flatbuffers/dashql/buffers/catalog/schema-table-column.js +76 -0
  213. package/dist/gen/flatbuffers/dashql/buffers/catalog/schema-table.d.ts +36 -0
  214. package/dist/gen/flatbuffers/dashql/buffers/catalog/schema-table.js +101 -0
  215. package/dist/gen/flatbuffers/dashql/buffers/catalog/touched-relations.d.ts +31 -0
  216. package/dist/gen/flatbuffers/dashql/buffers/catalog/touched-relations.js +75 -0
  217. package/dist/gen/flatbuffers/dashql/buffers/catalog.d.ts +21 -0
  218. package/dist/gen/flatbuffers/dashql/buffers/catalog.js +66 -0
  219. package/dist/gen/flatbuffers/dashql/buffers/completion/candidate-tag.d.ts +33 -0
  220. package/dist/gen/flatbuffers/dashql/buffers/completion/candidate-tag.js +36 -0
  221. package/dist/gen/flatbuffers/dashql/buffers/completion/completion-candidate-field.d.ts +42 -0
  222. package/dist/gen/flatbuffers/dashql/buffers/completion/completion-candidate-field.js +83 -0
  223. package/dist/gen/flatbuffers/dashql/buffers/completion/completion-candidate-info.d.ts +78 -0
  224. package/dist/gen/flatbuffers/dashql/buffers/completion/completion-candidate-info.js +177 -0
  225. package/dist/gen/flatbuffers/dashql/buffers/completion/completion-candidate-object-type.d.ts +8 -0
  226. package/dist/gen/flatbuffers/dashql/buffers/completion/completion-candidate-object-type.js +11 -0
  227. package/dist/gen/flatbuffers/dashql/buffers/completion/completion-candidate-object.d.ts +116 -0
  228. package/dist/gen/flatbuffers/dashql/buffers/completion/completion-candidate-object.js +305 -0
  229. package/dist/gen/flatbuffers/dashql/buffers/completion/completion-candidate.d.ts +97 -0
  230. package/dist/gen/flatbuffers/dashql/buffers/completion/completion-candidate.js +230 -0
  231. package/dist/gen/flatbuffers/dashql/buffers/completion/completion-strategy.d.ts +6 -0
  232. package/dist/gen/flatbuffers/dashql/buffers/completion/completion-strategy.js +9 -0
  233. package/dist/gen/flatbuffers/dashql/buffers/completion/completion-table-parameter.d.ts +17 -0
  234. package/dist/gen/flatbuffers/dashql/buffers/completion/completion-table-parameter.js +20 -0
  235. package/dist/gen/flatbuffers/dashql/buffers/completion/completion.d.ts +59 -0
  236. package/dist/gen/flatbuffers/dashql/buffers/completion/completion.js +155 -0
  237. package/dist/gen/flatbuffers/dashql/buffers/completion.d.ts +9 -0
  238. package/dist/gen/flatbuffers/dashql/buffers/completion.js +28 -0
  239. package/dist/gen/flatbuffers/dashql/buffers/cursor/relative-symbol-position.d.ts +7 -0
  240. package/dist/gen/flatbuffers/dashql/buffers/cursor/relative-symbol-position.js +10 -0
  241. package/dist/gen/flatbuffers/dashql/buffers/cursor/script-cursor-column-ref-context.d.ts +25 -0
  242. package/dist/gen/flatbuffers/dashql/buffers/cursor/script-cursor-column-ref-context.js +64 -0
  243. package/dist/gen/flatbuffers/dashql/buffers/cursor/script-cursor-context.d.ts +9 -0
  244. package/dist/gen/flatbuffers/dashql/buffers/cursor/script-cursor-context.js +26 -0
  245. package/dist/gen/flatbuffers/dashql/buffers/cursor/script-cursor-table-ref-context.d.ts +25 -0
  246. package/dist/gen/flatbuffers/dashql/buffers/cursor/script-cursor-table-ref-context.js +64 -0
  247. package/dist/gen/flatbuffers/dashql/buffers/cursor/script-cursor.d.ts +116 -0
  248. package/dist/gen/flatbuffers/dashql/buffers/cursor/script-cursor.js +303 -0
  249. package/dist/gen/flatbuffers/dashql/buffers/cursor.d.ts +5 -0
  250. package/dist/gen/flatbuffers/dashql/buffers/cursor.js +20 -0
  251. package/dist/gen/flatbuffers/dashql/buffers/diff/script-diff-op-code.d.ts +13 -0
  252. package/dist/gen/flatbuffers/dashql/buffers/diff/script-diff-op-code.js +16 -0
  253. package/dist/gen/flatbuffers/dashql/buffers/diff/script-diff-op.d.ts +51 -0
  254. package/dist/gen/flatbuffers/dashql/buffers/diff/script-diff-op.js +144 -0
  255. package/dist/gen/flatbuffers/dashql/buffers/diff/script-diff.d.ts +28 -0
  256. package/dist/gen/flatbuffers/dashql/buffers/diff/script-diff.js +72 -0
  257. package/dist/gen/flatbuffers/dashql/buffers/diff.d.ts +3 -0
  258. package/dist/gen/flatbuffers/dashql/buffers/diff.js +13 -0
  259. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-analysis-version.d.ts +29 -0
  260. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-analysis-version.js +81 -0
  261. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-board-position.d.ts +44 -0
  262. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-board-position.js +135 -0
  263. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-comment-tag.d.ts +42 -0
  264. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-comment-tag.js +93 -0
  265. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-cursor-semantic-context.d.ts +91 -0
  266. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-cursor-semantic-context.js +274 -0
  267. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-cursor-semantic-kind.d.ts +5 -0
  268. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-cursor-semantic-kind.js +8 -0
  269. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-cursor-state.d.ts +34 -0
  270. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-cursor-state.js +99 -0
  271. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-diagnostic-severity.d.ts +4 -0
  272. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-diagnostic-severity.js +7 -0
  273. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-diagnostic-source.d.ts +5 -0
  274. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-diagnostic-source.js +8 -0
  275. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-diagnostic.d.ts +35 -0
  276. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-diagnostic.js +101 -0
  277. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-event-action.d.ts +10 -0
  278. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-event-action.js +13 -0
  279. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-event-intent.d.ts +7 -0
  280. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-event-intent.js +10 -0
  281. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-event-origin.d.ts +6 -0
  282. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-event-origin.js +9 -0
  283. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-event.d.ts +62 -0
  284. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-event.js +187 -0
  285. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-flow-position.d.ts +53 -0
  286. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-flow-position.js +144 -0
  287. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-offset-unit.d.ts +7 -0
  288. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-offset-unit.js +10 -0
  289. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-processing-statistics.d.ts +65 -0
  290. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-processing-statistics.js +234 -0
  291. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-script-annotations.d.ts +71 -0
  292. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-script-annotations.js +210 -0
  293. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-selection.d.ts +29 -0
  294. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-selection.js +81 -0
  295. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-semantic-reference-kind.d.ts +5 -0
  296. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-semantic-reference-kind.js +8 -0
  297. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-semantic-resolution.d.ts +4 -0
  298. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-semantic-resolution.js +7 -0
  299. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-semantic-span.d.ts +48 -0
  300. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-semantic-span.js +138 -0
  301. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-statement-description.d.ts +30 -0
  302. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-statement-description.js +88 -0
  303. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-statement.d.ts +30 -0
  304. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-statement.js +88 -0
  305. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-syntax-span.d.ts +32 -0
  306. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-syntax-span.js +74 -0
  307. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-table-definition.d.ts +26 -0
  308. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-table-definition.js +73 -0
  309. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-text-change.d.ts +33 -0
  310. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-text-change.js +93 -0
  311. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-text-span.d.ts +24 -0
  312. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-text-span.js +58 -0
  313. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-update-status.d.ts +9 -0
  314. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-update-status.js +12 -0
  315. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-update.d.ts +158 -0
  316. package/dist/gen/flatbuffers/dashql/buffers/editor/editor-update.js +508 -0
  317. package/dist/gen/flatbuffers/dashql/buffers/editor.d.ts +29 -0
  318. package/dist/gen/flatbuffers/dashql/buffers/editor.js +82 -0
  319. package/dist/gen/flatbuffers/dashql/buffers/execution/checked-script-reference.d.ts +64 -0
  320. package/dist/gen/flatbuffers/dashql/buffers/execution/checked-script-reference.js +156 -0
  321. package/dist/gen/flatbuffers/dashql/buffers/execution/checked-script.d.ts +45 -0
  322. package/dist/gen/flatbuffers/dashql/buffers/execution/checked-script.js +115 -0
  323. package/dist/gen/flatbuffers/dashql/buffers/execution/compiled-visualization.d.ts +37 -0
  324. package/dist/gen/flatbuffers/dashql/buffers/execution/compiled-visualization.js +104 -0
  325. package/dist/gen/flatbuffers/dashql/buffers/execution/dataflow-attachment.d.ts +35 -0
  326. package/dist/gen/flatbuffers/dashql/buffers/execution/dataflow-attachment.js +71 -0
  327. package/dist/gen/flatbuffers/dashql/buffers/execution/dataflow-edge-kind.d.ts +13 -0
  328. package/dist/gen/flatbuffers/dashql/buffers/execution/dataflow-edge-kind.js +16 -0
  329. package/dist/gen/flatbuffers/dashql/buffers/execution/dataflow-edge.d.ts +49 -0
  330. package/dist/gen/flatbuffers/dashql/buffers/execution/dataflow-edge.js +145 -0
  331. package/dist/gen/flatbuffers/dashql/buffers/execution/dataflow-script.d.ts +54 -0
  332. package/dist/gen/flatbuffers/dashql/buffers/execution/dataflow-script.js +137 -0
  333. package/dist/gen/flatbuffers/dashql/buffers/execution/dataflow-statement.d.ts +39 -0
  334. package/dist/gen/flatbuffers/dashql/buffers/execution/dataflow-statement.js +89 -0
  335. package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-access-mode.d.ts +5 -0
  336. package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-access-mode.js +8 -0
  337. package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-access.d.ts +31 -0
  338. package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-access.js +96 -0
  339. package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-attachment.d.ts +42 -0
  340. package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-attachment.js +83 -0
  341. package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-catalog-object-id.d.ts +25 -0
  342. package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-catalog-object-id.js +69 -0
  343. package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-connection-kind.d.ts +7 -0
  344. package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-connection-kind.js +10 -0
  345. package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-connection.d.ts +27 -0
  346. package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-connection.js +74 -0
  347. package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-diagnostic.d.ts +46 -0
  348. package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-diagnostic.js +125 -0
  349. package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-edge-reason.d.ts +13 -0
  350. package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-edge-reason.js +16 -0
  351. package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-edge.d.ts +39 -0
  352. package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-edge.js +130 -0
  353. package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-entity-type.d.ts +8 -0
  354. package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-entity-type.js +11 -0
  355. package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-entity.d.ts +49 -0
  356. package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-entity.js +148 -0
  357. package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-materialization.d.ts +42 -0
  358. package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-materialization.js +99 -0
  359. package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-node.d.ts +125 -0
  360. package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-node.js +343 -0
  361. package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-script-reference.d.ts +73 -0
  362. package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-script-reference.js +180 -0
  363. package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-script.d.ts +98 -0
  364. package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-script.js +268 -0
  365. package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-unresolved-reference.d.ts +37 -0
  366. package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-unresolved-reference.js +100 -0
  367. package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph.d.ts +95 -0
  368. package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph.js +314 -0
  369. package/dist/gen/flatbuffers/dashql/buffers/execution/script-compilation-error-code.d.ts +9 -0
  370. package/dist/gen/flatbuffers/dashql/buffers/execution/script-compilation-error-code.js +12 -0
  371. package/dist/gen/flatbuffers/dashql/buffers/execution/script-compilation-error.d.ts +38 -0
  372. package/dist/gen/flatbuffers/dashql/buffers/execution/script-compilation-error.js +117 -0
  373. package/dist/gen/flatbuffers/dashql/buffers/execution/script-compilation-result.d.ts +41 -0
  374. package/dist/gen/flatbuffers/dashql/buffers/execution/script-compilation-result.js +126 -0
  375. package/dist/gen/flatbuffers/dashql/buffers/execution/script-compilation-statement-kind.d.ts +4 -0
  376. package/dist/gen/flatbuffers/dashql/buffers/execution/script-compilation-statement-kind.js +7 -0
  377. package/dist/gen/flatbuffers/dashql/buffers/execution/script-reference-check.d.ts +38 -0
  378. package/dist/gen/flatbuffers/dashql/buffers/execution/script-reference-check.js +100 -0
  379. package/dist/gen/flatbuffers/dashql/buffers/execution/script-reference-kind.d.ts +10 -0
  380. package/dist/gen/flatbuffers/dashql/buffers/execution/script-reference-kind.js +13 -0
  381. package/dist/gen/flatbuffers/dashql/buffers/execution/session-dataflow.d.ts +61 -0
  382. package/dist/gen/flatbuffers/dashql/buffers/execution/session-dataflow.js +159 -0
  383. package/dist/gen/flatbuffers/dashql/buffers/execution/session-input-consumer.d.ts +24 -0
  384. package/dist/gen/flatbuffers/dashql/buffers/execution/session-input-consumer.js +58 -0
  385. package/dist/gen/flatbuffers/dashql/buffers/execution/session-input-type-source.d.ts +8 -0
  386. package/dist/gen/flatbuffers/dashql/buffers/execution/session-input-type-source.js +11 -0
  387. package/dist/gen/flatbuffers/dashql/buffers/execution/session-input.d.ts +83 -0
  388. package/dist/gen/flatbuffers/dashql/buffers/execution/session-input.js +184 -0
  389. package/dist/gen/flatbuffers/dashql/buffers/execution/session-inputs.d.ts +28 -0
  390. package/dist/gen/flatbuffers/dashql/buffers/execution/session-inputs.js +72 -0
  391. package/dist/gen/flatbuffers/dashql/buffers/execution/table-parameter-collision.d.ts +56 -0
  392. package/dist/gen/flatbuffers/dashql/buffers/execution/table-parameter-collision.js +121 -0
  393. package/dist/gen/flatbuffers/dashql/buffers/execution.d.ts +37 -0
  394. package/dist/gen/flatbuffers/dashql/buffers/execution.js +107 -0
  395. package/dist/gen/flatbuffers/dashql/buffers/formatting/formatting-config.d.ts +63 -0
  396. package/dist/gen/flatbuffers/dashql/buffers/formatting/formatting-config.js +167 -0
  397. package/dist/gen/flatbuffers/dashql/buffers/formatting/formatting-dialect.d.ts +4 -0
  398. package/dist/gen/flatbuffers/dashql/buffers/formatting/formatting-dialect.js +7 -0
  399. package/dist/gen/flatbuffers/dashql/buffers/formatting/formatting-mode.d.ts +5 -0
  400. package/dist/gen/flatbuffers/dashql/buffers/formatting/formatting-mode.js +8 -0
  401. package/dist/gen/flatbuffers/dashql/buffers/formatting/keyword-case.d.ts +4 -0
  402. package/dist/gen/flatbuffers/dashql/buffers/formatting/keyword-case.js +7 -0
  403. package/dist/gen/flatbuffers/dashql/buffers/formatting.d.ts +4 -0
  404. package/dist/gen/flatbuffers/dashql/buffers/formatting.js +14 -0
  405. package/dist/gen/flatbuffers/dashql/buffers/parser/aconst-type.d.ts +7 -0
  406. package/dist/gen/flatbuffers/dashql/buffers/parser/aconst-type.js +10 -0
  407. package/dist/gen/flatbuffers/dashql/buffers/parser/attach-database-statement.d.ts +30 -0
  408. package/dist/gen/flatbuffers/dashql/buffers/parser/attach-database-statement.js +85 -0
  409. package/dist/gen/flatbuffers/dashql/buffers/parser/attribute-key.d.ts +320 -0
  410. package/dist/gen/flatbuffers/dashql/buffers/parser/attribute-key.js +323 -0
  411. package/dist/gen/flatbuffers/dashql/buffers/parser/character-type.d.ts +4 -0
  412. package/dist/gen/flatbuffers/dashql/buffers/parser/character-type.js +7 -0
  413. package/dist/gen/flatbuffers/dashql/buffers/parser/column-constraint.d.ts +9 -0
  414. package/dist/gen/flatbuffers/dashql/buffers/parser/column-constraint.js +12 -0
  415. package/dist/gen/flatbuffers/dashql/buffers/parser/combine-modifier.d.ts +5 -0
  416. package/dist/gen/flatbuffers/dashql/buffers/parser/combine-modifier.js +8 -0
  417. package/dist/gen/flatbuffers/dashql/buffers/parser/combine-operation.d.ts +6 -0
  418. package/dist/gen/flatbuffers/dashql/buffers/parser/combine-operation.js +9 -0
  419. package/dist/gen/flatbuffers/dashql/buffers/parser/comment-block-type.d.ts +14 -0
  420. package/dist/gen/flatbuffers/dashql/buffers/parser/comment-block-type.js +17 -0
  421. package/dist/gen/flatbuffers/dashql/buffers/parser/comment-block.d.ts +53 -0
  422. package/dist/gen/flatbuffers/dashql/buffers/parser/comment-block.js +126 -0
  423. package/dist/gen/flatbuffers/dashql/buffers/parser/constraint-attribute.d.ts +8 -0
  424. package/dist/gen/flatbuffers/dashql/buffers/parser/constraint-attribute.js +11 -0
  425. package/dist/gen/flatbuffers/dashql/buffers/parser/error.d.ts +33 -0
  426. package/dist/gen/flatbuffers/dashql/buffers/parser/error.js +89 -0
  427. package/dist/gen/flatbuffers/dashql/buffers/parser/expression-operator.d.ts +49 -0
  428. package/dist/gen/flatbuffers/dashql/buffers/parser/expression-operator.js +52 -0
  429. package/dist/gen/flatbuffers/dashql/buffers/parser/extract-target.d.ts +8 -0
  430. package/dist/gen/flatbuffers/dashql/buffers/parser/extract-target.js +11 -0
  431. package/dist/gen/flatbuffers/dashql/buffers/parser/group-by-item-type.d.ts +7 -0
  432. package/dist/gen/flatbuffers/dashql/buffers/parser/group-by-item-type.js +10 -0
  433. package/dist/gen/flatbuffers/dashql/buffers/parser/interval-type.d.ts +16 -0
  434. package/dist/gen/flatbuffers/dashql/buffers/parser/interval-type.js +19 -0
  435. package/dist/gen/flatbuffers/dashql/buffers/parser/join-type.d.ts +24 -0
  436. package/dist/gen/flatbuffers/dashql/buffers/parser/join-type.js +27 -0
  437. package/dist/gen/flatbuffers/dashql/buffers/parser/key-action-command.d.ts +7 -0
  438. package/dist/gen/flatbuffers/dashql/buffers/parser/key-action-command.js +10 -0
  439. package/dist/gen/flatbuffers/dashql/buffers/parser/key-action-trigger.d.ts +4 -0
  440. package/dist/gen/flatbuffers/dashql/buffers/parser/key-action-trigger.js +7 -0
  441. package/dist/gen/flatbuffers/dashql/buffers/parser/key-match.d.ts +5 -0
  442. package/dist/gen/flatbuffers/dashql/buffers/parser/key-match.js +8 -0
  443. package/dist/gen/flatbuffers/dashql/buffers/parser/known-function.d.ts +24 -0
  444. package/dist/gen/flatbuffers/dashql/buffers/parser/known-function.js +27 -0
  445. package/dist/gen/flatbuffers/dashql/buffers/parser/node-type.d.ts +151 -0
  446. package/dist/gen/flatbuffers/dashql/buffers/parser/node-type.js +154 -0
  447. package/dist/gen/flatbuffers/dashql/buffers/parser/node.d.ts +35 -0
  448. package/dist/gen/flatbuffers/dashql/buffers/parser/node.js +100 -0
  449. package/dist/gen/flatbuffers/dashql/buffers/parser/numeric-type.d.ts +10 -0
  450. package/dist/gen/flatbuffers/dashql/buffers/parser/numeric-type.js +13 -0
  451. package/dist/gen/flatbuffers/dashql/buffers/parser/on-commit-option.d.ts +6 -0
  452. package/dist/gen/flatbuffers/dashql/buffers/parser/on-commit-option.js +9 -0
  453. package/dist/gen/flatbuffers/dashql/buffers/parser/order-direction.d.ts +4 -0
  454. package/dist/gen/flatbuffers/dashql/buffers/parser/order-direction.js +7 -0
  455. package/dist/gen/flatbuffers/dashql/buffers/parser/order-null-rule.d.ts +4 -0
  456. package/dist/gen/flatbuffers/dashql/buffers/parser/order-null-rule.js +7 -0
  457. package/dist/gen/flatbuffers/dashql/buffers/parser/parsed-script.d.ts +80 -0
  458. package/dist/gen/flatbuffers/dashql/buffers/parser/parsed-script.js +250 -0
  459. package/dist/gen/flatbuffers/dashql/buffers/parser/row-locking-block-behavior.d.ts +4 -0
  460. package/dist/gen/flatbuffers/dashql/buffers/parser/row-locking-block-behavior.js +7 -0
  461. package/dist/gen/flatbuffers/dashql/buffers/parser/row-locking-strength.d.ts +7 -0
  462. package/dist/gen/flatbuffers/dashql/buffers/parser/row-locking-strength.js +10 -0
  463. package/dist/gen/flatbuffers/dashql/buffers/parser/sample-count-unit.d.ts +4 -0
  464. package/dist/gen/flatbuffers/dashql/buffers/parser/sample-count-unit.js +7 -0
  465. package/dist/gen/flatbuffers/dashql/buffers/parser/scanned-script.d.ts +40 -0
  466. package/dist/gen/flatbuffers/dashql/buffers/parser/scanned-script.js +125 -0
  467. package/dist/gen/flatbuffers/dashql/buffers/parser/scanner-token-type.d.ts +15 -0
  468. package/dist/gen/flatbuffers/dashql/buffers/parser/scanner-token-type.js +18 -0
  469. package/dist/gen/flatbuffers/dashql/buffers/parser/scanner-tokens.d.ts +59 -0
  470. package/dist/gen/flatbuffers/dashql/buffers/parser/scanner-tokens.js +156 -0
  471. package/dist/gen/flatbuffers/dashql/buffers/parser/statement-target-type.d.ts +5 -0
  472. package/dist/gen/flatbuffers/dashql/buffers/parser/statement-target-type.js +8 -0
  473. package/dist/gen/flatbuffers/dashql/buffers/parser/statement-target.d.ts +30 -0
  474. package/dist/gen/flatbuffers/dashql/buffers/parser/statement-target.js +80 -0
  475. package/dist/gen/flatbuffers/dashql/buffers/parser/statement-type.d.ts +22 -0
  476. package/dist/gen/flatbuffers/dashql/buffers/parser/statement-type.js +25 -0
  477. package/dist/gen/flatbuffers/dashql/buffers/parser/statement.d.ts +67 -0
  478. package/dist/gen/flatbuffers/dashql/buffers/parser/statement.js +234 -0
  479. package/dist/gen/flatbuffers/dashql/buffers/parser/subquery-quantifier.d.ts +5 -0
  480. package/dist/gen/flatbuffers/dashql/buffers/parser/subquery-quantifier.js +8 -0
  481. package/dist/gen/flatbuffers/dashql/buffers/parser/symbol-span.d.ts +21 -0
  482. package/dist/gen/flatbuffers/dashql/buffers/parser/symbol-span.js +55 -0
  483. package/dist/gen/flatbuffers/dashql/buffers/parser/table-constraint.d.ts +6 -0
  484. package/dist/gen/flatbuffers/dashql/buffers/parser/table-constraint.js +9 -0
  485. package/dist/gen/flatbuffers/dashql/buffers/parser/temp-type.d.ts +7 -0
  486. package/dist/gen/flatbuffers/dashql/buffers/parser/temp-type.js +10 -0
  487. package/dist/gen/flatbuffers/dashql/buffers/parser/text-span.d.ts +21 -0
  488. package/dist/gen/flatbuffers/dashql/buffers/parser/text-span.js +55 -0
  489. package/dist/gen/flatbuffers/dashql/buffers/parser/trim-direction.d.ts +5 -0
  490. package/dist/gen/flatbuffers/dashql/buffers/parser/trim-direction.js +8 -0
  491. package/dist/gen/flatbuffers/dashql/buffers/parser/window-bound-direction.d.ts +4 -0
  492. package/dist/gen/flatbuffers/dashql/buffers/parser/window-bound-direction.js +7 -0
  493. package/dist/gen/flatbuffers/dashql/buffers/parser/window-bound-mode.d.ts +5 -0
  494. package/dist/gen/flatbuffers/dashql/buffers/parser/window-bound-mode.js +8 -0
  495. package/dist/gen/flatbuffers/dashql/buffers/parser/window-exclusion-mode.d.ts +5 -0
  496. package/dist/gen/flatbuffers/dashql/buffers/parser/window-exclusion-mode.js +8 -0
  497. package/dist/gen/flatbuffers/dashql/buffers/parser/window-range-mode.d.ts +5 -0
  498. package/dist/gen/flatbuffers/dashql/buffers/parser/window-range-mode.js +8 -0
  499. package/dist/gen/flatbuffers/dashql/buffers/parser.d.ts +47 -0
  500. package/dist/gen/flatbuffers/dashql/buffers/parser.js +110 -0
  501. package/dist/gen/flatbuffers/dashql/buffers/profile/derived-profile-layout-config.d.ts +28 -0
  502. package/dist/gen/flatbuffers/dashql/buffers/profile/derived-profile-layout-config.js +73 -0
  503. package/dist/gen/flatbuffers/dashql/buffers/profile/profile-attribute.d.ts +27 -0
  504. package/dist/gen/flatbuffers/dashql/buffers/profile/profile-attribute.js +61 -0
  505. package/dist/gen/flatbuffers/dashql/buffers/profile/profile-engine.d.ts +8 -0
  506. package/dist/gen/flatbuffers/dashql/buffers/profile/profile-engine.js +11 -0
  507. package/dist/gen/flatbuffers/dashql/buffers/profile/profile-entity.d.ts +10 -0
  508. package/dist/gen/flatbuffers/dashql/buffers/profile/profile-entity.js +13 -0
  509. package/dist/gen/flatbuffers/dashql/buffers/profile/profile-execution-status.d.ts +8 -0
  510. package/dist/gen/flatbuffers/dashql/buffers/profile/profile-execution-status.js +11 -0
  511. package/dist/gen/flatbuffers/dashql/buffers/profile/profile-fragment.d.ts +64 -0
  512. package/dist/gen/flatbuffers/dashql/buffers/profile/profile-fragment.js +147 -0
  513. package/dist/gen/flatbuffers/dashql/buffers/profile/profile-layout-config.d.ts +95 -0
  514. package/dist/gen/flatbuffers/dashql/buffers/profile/profile-layout-config.js +219 -0
  515. package/dist/gen/flatbuffers/dashql/buffers/profile/profile-layout-orientation.d.ts +14 -0
  516. package/dist/gen/flatbuffers/dashql/buffers/profile/profile-layout-orientation.js +17 -0
  517. package/dist/gen/flatbuffers/dashql/buffers/profile/profile-layout-rect.d.ts +39 -0
  518. package/dist/gen/flatbuffers/dashql/buffers/profile/profile-layout-rect.js +89 -0
  519. package/dist/gen/flatbuffers/dashql/buffers/profile/profile-operator-cross-edge.d.ts +39 -0
  520. package/dist/gen/flatbuffers/dashql/buffers/profile/profile-operator-cross-edge.js +89 -0
  521. package/dist/gen/flatbuffers/dashql/buffers/profile/profile-operator-edge.d.ts +45 -0
  522. package/dist/gen/flatbuffers/dashql/buffers/profile/profile-operator-edge.js +103 -0
  523. package/dist/gen/flatbuffers/dashql/buffers/profile/profile-operator-kind.d.ts +58 -0
  524. package/dist/gen/flatbuffers/dashql/buffers/profile/profile-operator-kind.js +61 -0
  525. package/dist/gen/flatbuffers/dashql/buffers/profile/profile-operator.d.ts +124 -0
  526. package/dist/gen/flatbuffers/dashql/buffers/profile/profile-operator.js +288 -0
  527. package/dist/gen/flatbuffers/dashql/buffers/profile/profile-pipeline.d.ts +51 -0
  528. package/dist/gen/flatbuffers/dashql/buffers/profile/profile-pipeline.js +117 -0
  529. package/dist/gen/flatbuffers/dashql/buffers/profile/profile-slot-role.d.ts +17 -0
  530. package/dist/gen/flatbuffers/dashql/buffers/profile/profile-slot-role.js +20 -0
  531. package/dist/gen/flatbuffers/dashql/buffers/profile/profile-slot.d.ts +34 -0
  532. package/dist/gen/flatbuffers/dashql/buffers/profile/profile-slot.js +77 -0
  533. package/dist/gen/flatbuffers/dashql/buffers/profile/profile-stats-field.d.ts +19 -0
  534. package/dist/gen/flatbuffers/dashql/buffers/profile/profile-stats-field.js +22 -0
  535. package/dist/gen/flatbuffers/dashql/buffers/profile/profile-stats.d.ts +102 -0
  536. package/dist/gen/flatbuffers/dashql/buffers/profile/profile-stats.js +233 -0
  537. package/dist/gen/flatbuffers/dashql/buffers/profile/profile-update-event.d.ts +50 -0
  538. package/dist/gen/flatbuffers/dashql/buffers/profile/profile-update-event.js +122 -0
  539. package/dist/gen/flatbuffers/dashql/buffers/profile/query-profile-events.d.ts +38 -0
  540. package/dist/gen/flatbuffers/dashql/buffers/profile/query-profile-events.js +91 -0
  541. package/dist/gen/flatbuffers/dashql/buffers/profile/query-profile.d.ts +170 -0
  542. package/dist/gen/flatbuffers/dashql/buffers/profile/query-profile.js +398 -0
  543. package/dist/gen/flatbuffers/dashql/buffers/profile.d.ts +21 -0
  544. package/dist/gen/flatbuffers/dashql/buffers/profile.js +61 -0
  545. package/dist/gen/flatbuffers/dashql/buffers/statistics/script-memory-statistics.d.ts +27 -0
  546. package/dist/gen/flatbuffers/dashql/buffers/statistics/script-memory-statistics.js +65 -0
  547. package/dist/gen/flatbuffers/dashql/buffers/statistics/script-processing-memory-statistics.d.ts +57 -0
  548. package/dist/gen/flatbuffers/dashql/buffers/statistics/script-processing-memory-statistics.js +131 -0
  549. package/dist/gen/flatbuffers/dashql/buffers/statistics/script-processing-timings.d.ts +33 -0
  550. package/dist/gen/flatbuffers/dashql/buffers/statistics/script-processing-timings.js +75 -0
  551. package/dist/gen/flatbuffers/dashql/buffers/statistics/script-statistics.d.ts +31 -0
  552. package/dist/gen/flatbuffers/dashql/buffers/statistics/script-statistics.js +71 -0
  553. package/dist/gen/flatbuffers/dashql/buffers/statistics.d.ts +4 -0
  554. package/dist/gen/flatbuffers/dashql/buffers/statistics.js +17 -0
  555. package/dist/gen/flatbuffers/dashql/buffers/status/status-code.d.ts +25 -0
  556. package/dist/gen/flatbuffers/dashql/buffers/status/status-code.js +28 -0
  557. package/dist/gen/flatbuffers/dashql/buffers/status.d.ts +1 -0
  558. package/dist/gen/flatbuffers/dashql/buffers/status.js +5 -0
  559. package/dist/gen/flatbuffers/dashql/buffers/visualization/dashboard-spec.d.ts +37 -0
  560. package/dist/gen/flatbuffers/dashql/buffers/visualization/dashboard-spec.js +115 -0
  561. package/dist/gen/flatbuffers/dashql/buffers/visualization/markdown-node-type.d.ts +20 -0
  562. package/dist/gen/flatbuffers/dashql/buffers/visualization/markdown-node-type.js +23 -0
  563. package/dist/gen/flatbuffers/dashql/buffers/visualization/markdown-node.d.ts +61 -0
  564. package/dist/gen/flatbuffers/dashql/buffers/visualization/markdown-node.js +202 -0
  565. package/dist/gen/flatbuffers/dashql/buffers/visualization/markdown-spec.d.ts +32 -0
  566. package/dist/gen/flatbuffers/dashql/buffers/visualization/markdown-spec.js +90 -0
  567. package/dist/gen/flatbuffers/dashql/buffers/visualization/table-spec.d.ts +21 -0
  568. package/dist/gen/flatbuffers/dashql/buffers/visualization/table-spec.js +45 -0
  569. package/dist/gen/flatbuffers/dashql/buffers/visualization.d.ts +5 -0
  570. package/dist/gen/flatbuffers/dashql/buffers/visualization.js +19 -0
  571. package/dist/gen/jsonschema/app_folder.d.ts +26 -0
  572. package/dist/gen/jsonschema/app_manifest.d.ts +281 -0
  573. package/dist/gen/jsonschema/app_workbook.d.ts +355 -0
  574. package/dist/gen/jsonschema/auth.d.ts +273 -0
  575. package/dist/gen/jsonschema/connection.d.ts +1609 -0
  576. package/dist/gen/protobuf/google/protobuf/any_pb.d.ts +24 -0
  577. package/dist/gen/protobuf/google/protobuf/any_pb.js +7 -0
  578. package/dist/gen/protobuf/google/protobuf/empty_pb.d.ts +15 -0
  579. package/dist/gen/protobuf/google/protobuf/empty_pb.js +7 -0
  580. package/dist/gen/protobuf/google/rpc/status_pb.d.ts +29 -0
  581. package/dist/gen/protobuf/google/rpc/status_pb.js +18 -0
  582. package/dist/gen/protobuf/salesforce/hyperdb/grpc/v1/error_details_pb.d.ts +62 -0
  583. package/dist/gen/protobuf/salesforce/hyperdb/grpc/v1/error_details_pb.js +23 -0
  584. package/dist/gen/protobuf/salesforce/hyperdb/grpc/v1/hyper_service_pb.d.ts +386 -0
  585. package/dist/gen/protobuf/salesforce/hyperdb/grpc/v1/hyper_service_pb.js +199 -0
  586. package/dist/hyperdb-edge/node/runtime_check.d.ts +21 -0
  587. package/dist/hyperdb-edge/node/runtime_check.js +66 -0
  588. package/dist/platform/channel_common.d.ts +24 -0
  589. package/dist/platform/channel_common.js +15 -0
  590. package/dist/platform/compute/arrow_formatter.d.ts +43 -0
  591. package/dist/platform/compute/arrow_formatter.js +450 -0
  592. package/dist/platform/compute/computation_types.d.ts +100 -0
  593. package/dist/platform/compute/computation_types.js +150 -0
  594. package/dist/platform/compute/query_result_search_sql.d.ts +10 -0
  595. package/dist/platform/compute/query_result_search_sql.js +34 -0
  596. package/dist/platform/connections/clfn_spec.d.ts +97 -0
  597. package/dist/platform/connections/clfn_spec.js +0 -0
  598. package/dist/platform/connections/clfn_specs.d.ts +4 -0
  599. package/dist/platform/connections/clfn_specs.js +12 -0
  600. package/dist/platform/connections/connection_params.d.ts +19 -0
  601. package/dist/platform/connections/connection_params.js +63 -0
  602. package/dist/platform/connections/connection_state.d.ts +24 -0
  603. package/dist/platform/connections/connection_state.js +29 -0
  604. package/dist/platform/connections/connector_configs.d.ts +18 -0
  605. package/dist/platform/connections/connector_configs.js +12 -0
  606. package/dist/platform/connections/connector_descriptor.d.ts +20 -0
  607. package/dist/platform/connections/connector_descriptor.js +37 -0
  608. package/dist/platform/connections/connector_info.d.ts +33 -0
  609. package/dist/platform/connections/connector_info.js +95 -0
  610. package/dist/platform/connections/embedded_database_channel.d.ts +20 -0
  611. package/dist/platform/connections/embedded_database_channel.js +133 -0
  612. package/dist/platform/connections/hyper/hyper_error_info.d.ts +41 -0
  613. package/dist/platform/connections/hyper/hyper_error_info.js +117 -0
  614. package/dist/platform/connections/hyper/hyperdb_grpc_client.d.ts +26 -0
  615. package/dist/platform/connections/hyper/hyperdb_grpc_client.js +0 -0
  616. package/dist/platform/connections/hyper/local_cloud.d.ts +15 -0
  617. package/dist/platform/connections/hyper/local_cloud.js +14 -0
  618. package/dist/platform/connections/query_channel.d.ts +3 -0
  619. package/dist/platform/connections/query_channel.js +11 -0
  620. package/dist/platform/connections/query_execution.d.ts +19 -0
  621. package/dist/platform/connections/query_execution.js +24 -0
  622. package/dist/platform/connections/query_execution_args.d.ts +24 -0
  623. package/dist/platform/connections/query_execution_args.js +0 -0
  624. package/dist/platform/connections/salesforce/salesforce_api_client.d.ts +10 -0
  625. package/dist/platform/connections/salesforce/salesforce_api_client.js +14 -0
  626. package/dist/platform/connections/salesforce/salesforce_api_client_mock.d.ts +16 -0
  627. package/dist/platform/connections/salesforce/salesforce_connection_state.d.ts +2 -0
  628. package/dist/platform/connections/salesforce/salesforce_connection_state.js +7 -0
  629. package/dist/platform/connections/trino_catalogs.d.ts +4 -0
  630. package/dist/platform/connections/trino_catalogs.js +11 -0
  631. package/dist/platform/electron_fs.d.ts +4 -0
  632. package/dist/platform/electron_fs.js +21 -0
  633. package/dist/platform/embedded_database.d.ts +55 -0
  634. package/dist/platform/embedded_database.js +5 -0
  635. package/dist/platform/file_system.d.ts +36 -0
  636. package/dist/platform/file_system.js +5 -0
  637. package/dist/platform/http_client.d.ts +16 -0
  638. package/dist/platform/http_client.js +0 -0
  639. package/dist/platform/hyper_link_target.d.ts +8 -0
  640. package/dist/platform/hyper_link_target.js +35 -0
  641. package/dist/platform/hyperdb/hyperdb_arrow_insert.d.ts +7 -0
  642. package/dist/platform/hyperdb/hyperdb_arrow_insert.js +119 -0
  643. package/dist/platform/hyperdb/hyperdb_opfs_instance.d.ts +24 -0
  644. package/dist/platform/hyperdb/hyperdb_opfs_instance.js +117 -0
  645. package/dist/platform/hyperdb/hyperdb_parquet_export.d.ts +9 -0
  646. package/dist/platform/hyperdb/hyperdb_parquet_export.js +42 -0
  647. package/dist/platform/hyperdb/hyperdb_settings.d.ts +25 -0
  648. package/dist/platform/hyperdb/hyperdb_settings.js +32 -0
  649. package/dist/platform/hyperdb/hyperdb_wasm.d.ts +94 -0
  650. package/dist/platform/hyperdb/hyperdb_wasm.js +494 -0
  651. package/dist/platform/key_value_storage.d.ts +4 -0
  652. package/dist/platform/key_value_storage.js +0 -0
  653. package/dist/platform/logger/log_buffer.d.ts +53 -0
  654. package/dist/platform/logger/log_buffer.js +126 -0
  655. package/dist/platform/logger/logger.d.ts +57 -0
  656. package/dist/platform/logger/logger.js +181 -0
  657. package/dist/platform/logger/trace_context.d.ts +14 -0
  658. package/dist/platform/logger/trace_context.js +32 -0
  659. package/dist/platform/node/node_core.d.ts +3 -0
  660. package/dist/platform/node/node_core.js +17 -0
  661. package/dist/platform/node/node_directory_handle.d.ts +44 -0
  662. package/dist/platform/node/node_directory_handle.js +185 -0
  663. package/dist/platform/node/node_file_system.d.ts +3 -0
  664. package/dist/platform/node/node_file_system.js +108 -0
  665. package/dist/platform/node/node_hyperdb.d.ts +21 -0
  666. package/dist/platform/node/node_hyperdb.js +113 -0
  667. package/dist/platform/node/node_instance_locks.d.ts +2 -0
  668. package/dist/platform/node/node_instance_locks.js +37 -0
  669. package/dist/platform/node/node_locks.d.ts +20 -0
  670. package/dist/platform/node/node_locks.js +64 -0
  671. package/dist/platform/oauth_flow.d.ts +16 -0
  672. package/dist/platform/oauth_flow.js +0 -0
  673. package/dist/platform/oauth_types.d.ts +23 -0
  674. package/dist/platform/oauth_types.js +0 -0
  675. package/dist/platform/opfs_root.d.ts +5 -0
  676. package/dist/platform/opfs_root.js +19 -0
  677. package/dist/platform/proto.d.ts +11 -0
  678. package/dist/platform/proto.js +15 -0
  679. package/dist/platform/query/profile_execution_state.d.ts +21 -0
  680. package/dist/platform/query/profile_execution_state.js +60 -0
  681. package/dist/platform/query/profile_layout_config.d.ts +5 -0
  682. package/dist/platform/query/profile_layout_config.js +32 -0
  683. package/dist/platform/query/profile_operator_symbol.d.ts +6 -0
  684. package/dist/platform/query/profile_operator_symbol.js +50 -0
  685. package/dist/platform/query/query_execution_state.d.ts +65 -0
  686. package/dist/platform/query/query_execution_state.js +33 -0
  687. package/dist/platform/query/query_progress.d.ts +42 -0
  688. package/dist/platform/query/query_progress.js +78 -0
  689. package/dist/platform/query/query_result_cache.d.ts +47 -0
  690. package/dist/platform/query/query_result_cache.js +8 -0
  691. package/dist/platform/session/agent_session_client.d.ts +41 -0
  692. package/dist/platform/session/agent_session_client.js +177 -0
  693. package/dist/platform/session/agent_session_protocol.d.ts +15 -0
  694. package/dist/platform/session/agent_session_protocol.js +43 -0
  695. package/dist/platform/session/agent_session_state.d.ts +45 -0
  696. package/dist/platform/session/agent_session_state.js +127 -0
  697. package/dist/platform/session/workbook_journal.d.ts +48 -0
  698. package/dist/platform/session/workbook_journal.js +94 -0
  699. package/dist/platform/sql/sql_format.d.ts +9 -0
  700. package/dist/platform/sql/sql_format.js +40 -0
  701. package/dist/platform/sql/sql_lint.d.ts +27 -0
  702. package/dist/platform/sql/sql_lint.js +69 -0
  703. package/dist/platform/sql/sql_report.d.ts +18 -0
  704. package/dist/platform/sql/sql_report.js +80 -0
  705. package/dist/platform/storage/native_storage_backend.d.ts +48 -0
  706. package/dist/platform/storage/native_storage_backend.js +194 -0
  707. package/dist/platform/storage/opfs_query_result_cache.d.ts +15 -0
  708. package/dist/platform/storage/opfs_query_result_cache.js +237 -0
  709. package/dist/platform/storage/storage_backend.d.ts +89 -0
  710. package/dist/platform/storage/storage_backend.js +53 -0
  711. package/dist/platform/storage/storage_root.d.ts +2 -0
  712. package/dist/platform/storage/storage_root.js +90 -0
  713. package/dist/platform/storage/storage_versions.d.ts +3 -0
  714. package/dist/platform/storage/storage_versions.js +13 -0
  715. package/dist/platform/storage/workbook_tables.d.ts +92 -0
  716. package/dist/platform/storage/workbook_tables.js +57 -0
  717. package/dist/platform/storage/workbook_tree.d.ts +29 -0
  718. package/dist/platform/storage/workbook_tree.js +161 -0
  719. package/dist/platform/utils/arrow_vectors.d.ts +6 -0
  720. package/dist/platform/utils/arrow_vectors.js +82 -0
  721. package/dist/platform/utils/async_consumer.d.ts +14 -0
  722. package/dist/platform/utils/async_consumer.js +24 -0
  723. package/dist/platform/utils/async_value.d.ts +20 -0
  724. package/dist/platform/utils/async_value.js +50 -0
  725. package/dist/platform/utils/base64.d.ts +19 -0
  726. package/dist/platform/utils/base64.js +162 -0
  727. package/dist/platform/utils/crc32.d.ts +6 -0
  728. package/dist/platform/utils/crc32.js +34 -0
  729. package/dist/platform/utils/error.d.ts +4 -0
  730. package/dist/platform/utils/error.js +0 -0
  731. package/dist/platform/utils/int128.d.ts +7 -0
  732. package/dist/platform/utils/int128.js +35 -0
  733. package/dist/platform/utils/pkce.d.ts +2 -0
  734. package/dist/platform/utils/pkce.js +12 -0
  735. package/dist/platform/utils/progress.d.ts +14 -0
  736. package/dist/platform/utils/progress.js +44 -0
  737. package/dist/platform/utils/sleep.d.ts +1 -0
  738. package/dist/platform/utils/sleep.js +5 -0
  739. package/dist/platform/utils/sql_quote.d.ts +2 -0
  740. package/dist/platform/utils/sql_quote.js +8 -0
  741. package/dist/platform/utils/variant.d.ts +5 -0
  742. package/dist/platform/utils/variant.js +0 -0
  743. package/dist/platform/utils/yield_to_browser.d.ts +1 -0
  744. package/dist/platform/utils/yield_to_browser.js +5 -0
  745. package/dist/platform/web_http_client.d.ts +7 -0
  746. package/dist/platform/web_http_client.js +12 -0
  747. package/dist/platform/workbook/attachment_mirror.d.ts +2 -0
  748. package/dist/platform/workbook/attachment_mirror.js +25 -0
  749. package/dist/platform/workbook/attachment_mounts.d.ts +5 -0
  750. package/dist/platform/workbook/attachment_mounts.js +62 -0
  751. package/dist/platform/workbook/run_events.d.ts +66 -0
  752. package/dist/platform/workbook/run_events.js +38 -0
  753. package/dist/platform/workbook/script_compilation.d.ts +4 -0
  754. package/dist/platform/workbook/script_compilation.js +52 -0
  755. package/dist/platform/workbook/script_editor_state.d.ts +12 -0
  756. package/dist/platform/workbook/script_editor_state.js +0 -0
  757. package/dist/platform/workbook/script_reference_check.d.ts +27 -0
  758. package/dist/platform/workbook/script_reference_check.js +59 -0
  759. package/dist/platform/workbook/script_types.d.ts +53 -0
  760. package/dist/platform/workbook/script_types.js +21 -0
  761. package/dist/platform/workbook/workbook_attachments.d.ts +3 -0
  762. package/dist/platform/workbook/workbook_attachments.js +9 -0
  763. package/dist/platform/workbook/workbook_execution.d.ts +31 -0
  764. package/dist/platform/workbook/workbook_execution.js +28 -0
  765. package/dist/platform/workbook/workbook_inputs.d.ts +41 -0
  766. package/dist/platform/workbook/workbook_inputs.js +94 -0
  767. package/dist/platform/workbook/workbook_scripts.d.ts +58 -0
  768. package/dist/platform/workbook/workbook_scripts.js +21 -0
  769. package/dist/platform/workbook/workbook_zip.d.ts +5 -0
  770. package/dist/platform/workbook/workbook_zip.js +28 -0
  771. package/dist/runtime/compute_database.d.ts +18 -0
  772. package/dist/runtime/compute_database.js +56 -0
  773. package/dist/runtime/compute_platform.d.ts +5 -0
  774. package/dist/runtime/compute_platform.js +76 -0
  775. package/dist/runtime/embedded_session.d.ts +8 -0
  776. package/dist/runtime/embedded_session.js +23 -0
  777. package/dist/runtime/node/node_platform.d.ts +12 -0
  778. package/dist/runtime/node/node_platform.js +23 -0
  779. package/dist/runtime/platform_requests.d.ts +18 -0
  780. package/dist/runtime/platform_requests.js +104 -0
  781. package/dist/runtime/query/cache_pins.d.ts +8 -0
  782. package/dist/runtime/query/cache_pins.js +27 -0
  783. package/dist/runtime/query/query_channels.d.ts +34 -0
  784. package/dist/runtime/query/query_channels.js +250 -0
  785. package/dist/runtime/query/query_projection.d.ts +4 -0
  786. package/dist/runtime/query/query_projection.js +41 -0
  787. package/dist/runtime/query/query_result_stream.d.ts +15 -0
  788. package/dist/runtime/query/query_result_stream.js +100 -0
  789. package/dist/runtime/run_mounts.d.ts +6 -0
  790. package/dist/runtime/run_mounts.js +44 -0
  791. package/dist/runtime/runtime.d.ts +149 -0
  792. package/dist/runtime/runtime.js +420 -0
  793. package/dist/runtime/runtime_storage.d.ts +47 -0
  794. package/dist/runtime/runtime_storage.js +118 -0
  795. package/dist/runtime/store/handles.d.ts +30 -0
  796. package/dist/runtime/store/handles.js +46 -0
  797. package/dist/runtime/store/projection.d.ts +8 -0
  798. package/dist/runtime/store/projection.js +51 -0
  799. package/dist/runtime/store/runtime_store.d.ts +53 -0
  800. package/dist/runtime/store/runtime_store.js +195 -0
  801. package/dist/runtime/store/runtime_tables.d.ts +10 -0
  802. package/dist/runtime/store/runtime_tables.js +115 -0
  803. package/dist/runtime/store/update_scheduler.d.ts +6 -0
  804. package/dist/runtime/store/update_scheduler.js +7 -0
  805. package/dist/runtime/workbook_archives.d.ts +7 -0
  806. package/dist/runtime/workbook_archives.js +103 -0
  807. package/dist/runtime/workbook_projection.d.ts +28 -0
  808. package/dist/runtime/workbook_projection.js +178 -0
  809. package/dist/runtime/workbook_run_report.d.ts +22 -0
  810. package/dist/runtime/workbook_run_report.js +248 -0
  811. package/dist/wasm/dashql_core.d.ts +4147 -0
  812. package/dist/wasm/dashql_core.js +4487 -0
  813. package/dist/wasm/dashql_core.wasm +0 -0
  814. package/dist/wasm/dashql_dataflow.d.ts +148 -0
  815. package/dist/wasm/dashql_dataflow.js +474 -0
  816. package/dist/wasm/dashql_dataflow.wasm +0 -0
  817. package/package.json +44 -4
@@ -0,0 +1,4487 @@
1
+ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
+ // dist/.stage/src/wasm/dashql_core.js
3
+ var dashql_core_exports = /* @__PURE__ */ __exportAll({
4
+ Catalog: () => Catalog,
5
+ CatalogUpdateTaskStatus: () => CatalogUpdateTaskStatus,
6
+ CatalogUpdateVariant: () => CatalogUpdateVariant,
7
+ ConnectionHealth: () => ConnectionHealth,
8
+ ConnectionStatus: () => ConnectionStatus,
9
+ ConnectorType: () => ConnectorType,
10
+ QueryExecutionStatus: () => QueryExecutionStatus,
11
+ QueryProfile: () => QueryProfile,
12
+ QueryProgressFollower: () => QueryProgressFollower,
13
+ QueryType: () => QueryType,
14
+ Runtime: () => Runtime,
15
+ Script: () => Script,
16
+ ScriptBatch: () => ScriptBatch,
17
+ ScriptSession: () => ScriptSession,
18
+ SessionPlanRequest: () => SessionPlanRequest,
19
+ Shell: () => Shell,
20
+ ShellCompletionCandidate: () => ShellCompletionCandidate,
21
+ ShellCompletionList: () => ShellCompletionList,
22
+ ShellOperation: () => ShellOperation,
23
+ ShellPromptResult: () => ShellPromptResult,
24
+ ShellTerminalResult: () => ShellTerminalResult,
25
+ TableParameters: () => TableParameters,
26
+ TaskStatus: () => TaskStatus,
27
+ WorkbookScriptSession: () => WorkbookScriptSession,
28
+ checkScriptReferences: () => checkScriptReferences,
29
+ collectSessionInputs: () => collectSessionInputs,
30
+ default: () => __wbg_init,
31
+ deriveSessionDataflow: () => deriveSessionDataflow,
32
+ initSync: () => initSync,
33
+ inputLiteral: () => inputLiteral,
34
+ installPanicHook: () => installPanicHook,
35
+ planSession: () => planSession,
36
+ processBatch: () => processBatch,
37
+ quoteColumnName: () => quoteColumnName,
38
+ quoteIdentifier: () => quoteIdentifier,
39
+ replayQueryProgress: () => replayQueryProgress,
40
+ textChange: () => textChange,
41
+ touchedRelations: () => touchedRelations,
42
+ wasmUrl: () => wasmUrl
43
+ });
44
+ var wasm;
45
+ var cachedUint8ArrayMemory0 = null;
46
+ function getUint8ArrayMemory0() {
47
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
48
+ return cachedUint8ArrayMemory0;
49
+ }
50
+ var cachedTextDecoder = new TextDecoder("utf-8", {
51
+ ignoreBOM: true,
52
+ fatal: true
53
+ });
54
+ cachedTextDecoder.decode();
55
+ var MAX_SAFARI_DECODE_BYTES = 2146435072;
56
+ var numBytesDecoded = 0;
57
+ function decodeText(ptr, len) {
58
+ numBytesDecoded += len;
59
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
60
+ cachedTextDecoder = new TextDecoder("utf-8", {
61
+ ignoreBOM: true,
62
+ fatal: true
63
+ });
64
+ cachedTextDecoder.decode();
65
+ numBytesDecoded = len;
66
+ }
67
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
68
+ }
69
+ function getStringFromWasm0(ptr, len) {
70
+ ptr = ptr >>> 0;
71
+ return decodeText(ptr, len);
72
+ }
73
+ var WASM_VECTOR_LEN = 0;
74
+ var cachedTextEncoder = new TextEncoder();
75
+ if (!("encodeInto" in cachedTextEncoder)) cachedTextEncoder.encodeInto = function(arg, view) {
76
+ const buf = cachedTextEncoder.encode(arg);
77
+ view.set(buf);
78
+ return {
79
+ read: arg.length,
80
+ written: buf.length
81
+ };
82
+ };
83
+ function passStringToWasm0(arg, malloc, realloc) {
84
+ if (realloc === void 0) {
85
+ const buf = cachedTextEncoder.encode(arg);
86
+ const ptr = malloc(buf.length, 1) >>> 0;
87
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
88
+ WASM_VECTOR_LEN = buf.length;
89
+ return ptr;
90
+ }
91
+ let len = arg.length;
92
+ let ptr = malloc(len, 1) >>> 0;
93
+ const mem = getUint8ArrayMemory0();
94
+ let offset = 0;
95
+ for (; offset < len; offset++) {
96
+ const code = arg.charCodeAt(offset);
97
+ if (code > 127) break;
98
+ mem[ptr + offset] = code;
99
+ }
100
+ if (offset !== len) {
101
+ if (offset !== 0) arg = arg.slice(offset);
102
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
103
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
104
+ const ret = cachedTextEncoder.encodeInto(arg, view);
105
+ offset += ret.written;
106
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
107
+ }
108
+ WASM_VECTOR_LEN = offset;
109
+ return ptr;
110
+ }
111
+ var cachedDataViewMemory0 = null;
112
+ function getDataViewMemory0() {
113
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || cachedDataViewMemory0.buffer.detached === void 0 && cachedDataViewMemory0.buffer !== wasm.memory.buffer) cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
114
+ return cachedDataViewMemory0;
115
+ }
116
+ function addToExternrefTable0(obj) {
117
+ const idx = wasm.__externref_table_alloc();
118
+ wasm.__wbindgen_externrefs.set(idx, obj);
119
+ return idx;
120
+ }
121
+ function handleError(f, args) {
122
+ try {
123
+ return f.apply(this, args);
124
+ } catch (e) {
125
+ const idx = addToExternrefTable0(e);
126
+ wasm.__wbindgen_exn_store(idx);
127
+ }
128
+ }
129
+ function isLikeNone(x) {
130
+ return x === void 0 || x === null;
131
+ }
132
+ function debugString(val) {
133
+ const type = typeof val;
134
+ if (type == "number" || type == "boolean" || val == null) return `${val}`;
135
+ if (type == "string") return `"${val}"`;
136
+ if (type == "symbol") {
137
+ const description = val.description;
138
+ if (description == null) return "Symbol";
139
+ else return `Symbol(${description})`;
140
+ }
141
+ if (type == "function") {
142
+ const name = val.name;
143
+ if (typeof name == "string" && name.length > 0) return `Function(${name})`;
144
+ else return "Function";
145
+ }
146
+ if (Array.isArray(val)) {
147
+ const length = val.length;
148
+ let debug = "[";
149
+ if (length > 0) debug += debugString(val[0]);
150
+ for (let i = 1; i < length; i++) debug += ", " + debugString(val[i]);
151
+ debug += "]";
152
+ return debug;
153
+ }
154
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
155
+ let className;
156
+ if (builtInMatches && builtInMatches.length > 1) className = builtInMatches[1];
157
+ else return toString.call(val);
158
+ if (className == "Object") try {
159
+ return "Object(" + JSON.stringify(val) + ")";
160
+ } catch (_) {
161
+ return "Object";
162
+ }
163
+ if (val instanceof Error) return `${val.name}: ${val.message}\n${val.stack}`;
164
+ return className;
165
+ }
166
+ function getArrayU8FromWasm0(ptr, len) {
167
+ ptr = ptr >>> 0;
168
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
169
+ }
170
+ var CLOSURE_DTORS = typeof FinalizationRegistry === "undefined" ? {
171
+ register: () => {},
172
+ unregister: () => {}
173
+ } : new FinalizationRegistry((state) => state.dtor(state.a, state.b));
174
+ function makeMutClosure(arg0, arg1, dtor, f) {
175
+ const state = {
176
+ a: arg0,
177
+ b: arg1,
178
+ cnt: 1,
179
+ dtor
180
+ };
181
+ const real = (...args) => {
182
+ state.cnt++;
183
+ const a = state.a;
184
+ state.a = 0;
185
+ try {
186
+ return f(a, state.b, ...args);
187
+ } finally {
188
+ state.a = a;
189
+ real._wbg_cb_unref();
190
+ }
191
+ };
192
+ real._wbg_cb_unref = () => {
193
+ if (--state.cnt === 0) {
194
+ state.dtor(state.a, state.b);
195
+ state.a = 0;
196
+ CLOSURE_DTORS.unregister(state);
197
+ }
198
+ };
199
+ CLOSURE_DTORS.register(real, state, state);
200
+ return real;
201
+ }
202
+ function takeFromExternrefTable0(idx) {
203
+ const value = wasm.__wbindgen_externrefs.get(idx);
204
+ wasm.__externref_table_dealloc(idx);
205
+ return value;
206
+ }
207
+ function passArrayJsValueToWasm0(array, malloc) {
208
+ const ptr = malloc(array.length * 4, 4) >>> 0;
209
+ for (let i = 0; i < array.length; i++) {
210
+ const add = addToExternrefTable0(array[i]);
211
+ getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
212
+ }
213
+ WASM_VECTOR_LEN = array.length;
214
+ return ptr;
215
+ }
216
+ var cachedUint32ArrayMemory0 = null;
217
+ function getUint32ArrayMemory0() {
218
+ if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
219
+ return cachedUint32ArrayMemory0;
220
+ }
221
+ function passArray32ToWasm0(arg, malloc) {
222
+ const ptr = malloc(arg.length * 4, 4) >>> 0;
223
+ getUint32ArrayMemory0().set(arg, ptr / 4);
224
+ WASM_VECTOR_LEN = arg.length;
225
+ return ptr;
226
+ }
227
+ function passArray8ToWasm0(arg, malloc) {
228
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
229
+ getUint8ArrayMemory0().set(arg, ptr / 1);
230
+ WASM_VECTOR_LEN = arg.length;
231
+ return ptr;
232
+ }
233
+ function _assertClass(instance, klass) {
234
+ if (!(instance instanceof klass)) throw new Error(`expected instance of ${klass.name}`);
235
+ }
236
+ /**
237
+ * Replay a recording of the progress of a query (JSON, see `ProfileRecording`) up to a point in time in milliseconds
238
+ * since its first payload, with a layout of the plan or the default one. None if nothing happened until then.
239
+ * @param {string} recording
240
+ * @param {number} until_ms
241
+ * @param {ProfileLayoutView | null} [layout]
242
+ * @returns {QueryProfileProgressView | undefined}
243
+ */
244
+ function replayQueryProgress(recording, until_ms, layout) {
245
+ const ptr0 = passStringToWasm0(recording, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
246
+ const len0 = WASM_VECTOR_LEN;
247
+ const ret = wasm.replayQueryProgress(ptr0, len0, until_ms, isLikeNone(layout) ? 0 : addToExternrefTable0(layout));
248
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
249
+ return takeFromExternrefTable0(ret[0]);
250
+ }
251
+ function getArrayU32FromWasm0(ptr, len) {
252
+ ptr = ptr >>> 0;
253
+ return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
254
+ }
255
+ /**
256
+ * The literal of the value of an input control, in the Hyper dialect: `sql_type` is the SQL text of the type of the
257
+ * input, `SqlType.sql`, absent without a type
258
+ * @param {string} value
259
+ * @param {string | null} [sql_type]
260
+ * @returns {string}
261
+ */
262
+ function inputLiteral(value, sql_type) {
263
+ let deferred4_0;
264
+ let deferred4_1;
265
+ try {
266
+ const ptr0 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
267
+ const len0 = WASM_VECTOR_LEN;
268
+ var ptr1 = isLikeNone(sql_type) ? 0 : passStringToWasm0(sql_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
269
+ var len1 = WASM_VECTOR_LEN;
270
+ const ret = wasm.inputLiteral(ptr0, len0, ptr1, len1);
271
+ var ptr3 = ret[0];
272
+ var len3 = ret[1];
273
+ if (ret[3]) {
274
+ ptr3 = 0;
275
+ len3 = 0;
276
+ throw takeFromExternrefTable0(ret[2]);
277
+ }
278
+ deferred4_0 = ptr3;
279
+ deferred4_1 = len3;
280
+ return getStringFromWasm0(ptr3, len3);
281
+ } finally {
282
+ wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
283
+ }
284
+ }
285
+ /**
286
+ * Process a batch request into a `BatchResult`
287
+ * @param {Uint8Array} request
288
+ * @returns {Uint8Array}
289
+ */
290
+ function processBatch(request) {
291
+ const ptr0 = passArray8ToWasm0(request, wasm.__wbindgen_malloc);
292
+ const len0 = WASM_VECTOR_LEN;
293
+ const ret = wasm.processBatch(ptr0, len0);
294
+ if (ret[3]) throw takeFromExternrefTable0(ret[2]);
295
+ var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
296
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
297
+ return v2;
298
+ }
299
+ /**
300
+ * Quote an identifier if it would not read back unquoted, e.g. the name of a script reference `:"foo-2"`
301
+ * @param {string} text
302
+ * @returns {string}
303
+ */
304
+ function quoteIdentifier(text) {
305
+ let deferred2_0;
306
+ let deferred2_1;
307
+ try {
308
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
309
+ const len0 = WASM_VECTOR_LEN;
310
+ const ret = wasm.quoteIdentifier(ptr0, len0);
311
+ deferred2_0 = ret[0];
312
+ deferred2_1 = ret[1];
313
+ return getStringFromWasm0(ret[0], ret[1]);
314
+ } finally {
315
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
316
+ }
317
+ }
318
+ /**
319
+ * The relations that the statements of a text create or drop, returns packed `TouchedRelations`
320
+ * @param {string} text
321
+ * @returns {Uint8Array}
322
+ */
323
+ function touchedRelations(text) {
324
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
325
+ const len0 = WASM_VECTOR_LEN;
326
+ const ret = wasm.touchedRelations(ptr0, len0);
327
+ var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
328
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
329
+ return v2;
330
+ }
331
+ /**
332
+ * Derive the dataflow of the scripts of a session (`dataflow::derive_session_dataflow`), returns the packed
333
+ * `SessionDataflow`. The text spans are in the offset unit of the session of each script.
334
+ * @param {SessionPlanRequest} request
335
+ * @returns {Uint8Array}
336
+ */
337
+ function deriveSessionDataflow(request) {
338
+ _assertClass(request, SessionPlanRequest);
339
+ const ret = wasm.deriveSessionDataflow(request.__wbg_ptr);
340
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
341
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
342
+ return v1;
343
+ }
344
+ /**
345
+ * Check the script references of the scripts of a session, returns the packed `ScriptReferenceCheck`. The text spans
346
+ * are in the offset unit of the session of each script. Ignores the targets, the materialized scripts and the mount
347
+ * prefix.
348
+ * @param {SessionPlanRequest} request
349
+ * @returns {Uint8Array}
350
+ */
351
+ function checkScriptReferences(request) {
352
+ _assertClass(request, SessionPlanRequest);
353
+ const ret = wasm.checkScriptReferences(request.__wbg_ptr);
354
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
355
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
356
+ return v1;
357
+ }
358
+ /**
359
+ * Report panics to `globalThis.__dashqlCorePanic` before the module traps.
360
+ *
361
+ * A panic aborts: the call traps without dropping its guards, so the objects it borrowed stay borrowed and the
362
+ * module must not be used anymore. JS sees only the trap, the hook tells it why.
363
+ */
364
+ function installPanicHook() {
365
+ wasm.installPanicHook();
366
+ }
367
+ /**
368
+ * Collect the inputs of the scripts of a session (`session_inputs::collect_session_inputs`), returns the packed
369
+ * `SessionInputs`. Ignores the targets, the materialized scripts and the mount prefix.
370
+ * @param {SessionPlanRequest} request
371
+ * @returns {Uint8Array}
372
+ */
373
+ function collectSessionInputs(request) {
374
+ _assertClass(request, SessionPlanRequest);
375
+ const ret = wasm.collectSessionInputs(request.__wbg_ptr);
376
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
377
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
378
+ return v1;
379
+ }
380
+ /**
381
+ * Plan the current analysis of the scripts of a session across connections, returns the packed `ExecutionGraph`
382
+ * @param {SessionPlanRequest} request
383
+ * @returns {Uint8Array}
384
+ */
385
+ function planSession(request) {
386
+ _assertClass(request, SessionPlanRequest);
387
+ const ret = wasm.planSession(request.__wbg_ptr);
388
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
389
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
390
+ return v1;
391
+ }
392
+ /**
393
+ * Quote a column name for a column reference in SQL text, also quotes keywords that are not unreserved, e.g. `"user"`
394
+ * @param {string} text
395
+ * @returns {string}
396
+ */
397
+ function quoteColumnName(text) {
398
+ let deferred2_0;
399
+ let deferred2_1;
400
+ try {
401
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
402
+ const len0 = WASM_VECTOR_LEN;
403
+ const ret = wasm.quoteColumnName(ptr0, len0);
404
+ deferred2_0 = ret[0];
405
+ deferred2_1 = ret[1];
406
+ return getStringFromWasm0(ret[0], ret[1]);
407
+ } finally {
408
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
409
+ }
410
+ }
411
+ /**
412
+ * The change from one text to another (`workbook::text_change`): the range between their common prefix and suffix, on
413
+ * character boundaries, its offsets in UTF-16 code units like those of the editors
414
+ * @param {string} from
415
+ * @param {string} to
416
+ * @returns {WorkbookTextChange}
417
+ */
418
+ function textChange(from, to) {
419
+ const ptr0 = passStringToWasm0(from, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
420
+ const len0 = WASM_VECTOR_LEN;
421
+ const ptr1 = passStringToWasm0(to, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
422
+ const len1 = WASM_VECTOR_LEN;
423
+ const ret = wasm.textChange(ptr0, len0, ptr1, len1);
424
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
425
+ return takeFromExternrefTable0(ret[0]);
426
+ }
427
+ function getArrayJsValueFromWasm0(ptr, len) {
428
+ ptr = ptr >>> 0;
429
+ const mem = getDataViewMemory0();
430
+ const result = [];
431
+ for (let i = ptr; i < ptr + 4 * len; i += 4) result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true)));
432
+ wasm.__externref_drop_slice(ptr, len);
433
+ return result;
434
+ }
435
+ function wasm_bindgen__convert__closures_____invoke__ha7a2b373f2a9ce09(arg0, arg1, arg2) {
436
+ return wasm.wasm_bindgen__convert__closures_____invoke__ha7a2b373f2a9ce09(arg0, arg1, arg2);
437
+ }
438
+ function wasm_bindgen__convert__closures_____invoke__hc9cbe033348e018d(arg0, arg1, arg2) {
439
+ wasm.wasm_bindgen__convert__closures_____invoke__hc9cbe033348e018d(arg0, arg1, arg2);
440
+ }
441
+ function wasm_bindgen__convert__closures_____invoke__h3cb6850919769fd7(arg0, arg1, arg2, arg3) {
442
+ wasm.wasm_bindgen__convert__closures_____invoke__h3cb6850919769fd7(arg0, arg1, arg2, arg3);
443
+ }
444
+ /**
445
+ * How far a catalog update got
446
+ * @enum {0 | 1 | 2 | 3 | 4}
447
+ */
448
+ var CatalogUpdateTaskStatus = Object.freeze({
449
+ STARTED: 0,
450
+ "0": "STARTED",
451
+ SUCCEEDED: 1,
452
+ "1": "SUCCEEDED",
453
+ FAILED: 2,
454
+ "2": "FAILED",
455
+ CANCELLED: 3,
456
+ "3": "CANCELLED",
457
+ PARTIALLY_SUCCEEDED: 4,
458
+ "4": "PARTIALLY_SUCCEEDED"
459
+ });
460
+ /**
461
+ * What a catalog update does: load the whole catalog or ask about the relations that statements touched
462
+ * @enum {0 | 1}
463
+ */
464
+ var CatalogUpdateVariant = Object.freeze({
465
+ FULL_CATALOG_REFRESH: 0,
466
+ "0": "FULL_CATALOG_REFRESH",
467
+ RELATION_REFRESH: 1,
468
+ "1": "RELATION_REFRESH"
469
+ });
470
+ /**
471
+ * The health of a connection
472
+ * @enum {0 | 1 | 2 | 3 | 4}
473
+ */
474
+ var ConnectionHealth = Object.freeze({
475
+ NOT_STARTED: 0,
476
+ "0": "NOT_STARTED",
477
+ CONNECTING: 1,
478
+ "1": "CONNECTING",
479
+ CANCELLED: 2,
480
+ "2": "CANCELLED",
481
+ ONLINE: 3,
482
+ "3": "ONLINE",
483
+ FAILED: 4,
484
+ "4": "FAILED"
485
+ });
486
+ /**
487
+ * How far the setup of a connection got
488
+ * @enum {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22}
489
+ */
490
+ var ConnectionStatus = Object.freeze({
491
+ NOT_STARTED: 0,
492
+ "0": "NOT_STARTED",
493
+ HEALTH_CHECK_STARTED: 1,
494
+ "1": "HEALTH_CHECK_STARTED",
495
+ HEALTH_CHECK_FAILED: 2,
496
+ "2": "HEALTH_CHECK_FAILED",
497
+ HEALTH_CHECK_CANCELLED: 3,
498
+ "3": "HEALTH_CHECK_CANCELLED",
499
+ HEALTH_CHECK_SUCCEEDED: 4,
500
+ "4": "HEALTH_CHECK_SUCCEEDED",
501
+ CHANNEL_SETUP_STARTED: 5,
502
+ "5": "CHANNEL_SETUP_STARTED",
503
+ CHANNEL_SETUP_FAILED: 6,
504
+ "6": "CHANNEL_SETUP_FAILED",
505
+ CHANNEL_SETUP_CANCELLED: 7,
506
+ "7": "CHANNEL_SETUP_CANCELLED",
507
+ CHANNEL_READY: 8,
508
+ "8": "CHANNEL_READY",
509
+ AUTH_STARTED: 9,
510
+ "9": "AUTH_STARTED",
511
+ AUTH_CANCELLED: 10,
512
+ "10": "AUTH_CANCELLED",
513
+ AUTH_FAILED: 11,
514
+ "11": "AUTH_FAILED",
515
+ PKCE_GENERATION_STARTED: 12,
516
+ "12": "PKCE_GENERATION_STARTED",
517
+ PKCE_GENERATED: 13,
518
+ "13": "PKCE_GENERATED",
519
+ WAITING_FOR_OAUTH_CODE_VIA_WINDOW: 14,
520
+ "14": "WAITING_FOR_OAUTH_CODE_VIA_WINDOW",
521
+ WAITING_FOR_OAUTH_CODE_VIA_LINK: 15,
522
+ "15": "WAITING_FOR_OAUTH_CODE_VIA_LINK",
523
+ OAUTH_CODE_RECEIVED: 16,
524
+ "16": "OAUTH_CODE_RECEIVED",
525
+ ACCESS_TOKEN_REQUESTED: 17,
526
+ "17": "ACCESS_TOKEN_REQUESTED",
527
+ ACCESS_TOKEN_RECEIVED: 18,
528
+ "18": "ACCESS_TOKEN_RECEIVED",
529
+ DATA_CLOUD_TOKEN_REQUESTED: 19,
530
+ "19": "DATA_CLOUD_TOKEN_REQUESTED",
531
+ DATA_CLOUD_TOKEN_RECEIVED: 20,
532
+ "20": "DATA_CLOUD_TOKEN_RECEIVED",
533
+ CORE_ACCESS_TOKEN_REQUESTED: 21,
534
+ "21": "CORE_ACCESS_TOKEN_REQUESTED",
535
+ CORE_ACCESS_TOKEN_RECEIVED: 22,
536
+ "22": "CORE_ACCESS_TOKEN_RECEIVED"
537
+ });
538
+ /**
539
+ * The connectors
540
+ * @enum {0 | 1 | 2 | 3}
541
+ */
542
+ var ConnectorType = Object.freeze({
543
+ HYPER: 0,
544
+ "0": "HYPER",
545
+ SALESFORCE_DATA_CLOUD: 1,
546
+ "1": "SALESFORCE_DATA_CLOUD",
547
+ TRINO: 2,
548
+ "2": "TRINO",
549
+ DBCOM: 3,
550
+ "3": "DBCOM"
551
+ });
552
+ /**
553
+ * The status of the execution of a query
554
+ * @enum {0 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11}
555
+ */
556
+ var QueryExecutionStatus = Object.freeze({
557
+ REQUESTED: 0,
558
+ "0": "REQUESTED",
559
+ SENDING: 2,
560
+ "2": "SENDING",
561
+ QUEUED: 3,
562
+ "3": "QUEUED",
563
+ RUNNING: 4,
564
+ "4": "RUNNING",
565
+ RECEIVED_FIRST_BATCH: 5,
566
+ "5": "RECEIVED_FIRST_BATCH",
567
+ RECEIVED_ALL_BATCHES: 6,
568
+ "6": "RECEIVED_ALL_BATCHES",
569
+ PROCESSING_RESULTS: 7,
570
+ "7": "PROCESSING_RESULTS",
571
+ PROCESSED_RESULTS: 8,
572
+ "8": "PROCESSED_RESULTS",
573
+ SUCCEEDED: 9,
574
+ "9": "SUCCEEDED",
575
+ FAILED: 10,
576
+ "10": "FAILED",
577
+ CANCELLED: 11,
578
+ "11": "CANCELLED"
579
+ });
580
+ /**
581
+ * The kind of a query
582
+ * @enum {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7}
583
+ */
584
+ var QueryType = Object.freeze({
585
+ USER_PROVIDED: 0,
586
+ "0": "USER_PROVIDED",
587
+ CATALOG_QUERY_INFORMATION_SCHEMA: 1,
588
+ "1": "CATALOG_QUERY_INFORMATION_SCHEMA",
589
+ CATALOG_QUERY_PG_ATTRIBUTE: 2,
590
+ "2": "CATALOG_QUERY_PG_ATTRIBUTE",
591
+ CATALOG_QUERY_PG_PROC: 3,
592
+ "3": "CATALOG_QUERY_PG_PROC",
593
+ CATALOG_QUERY_HYPER_CLOUD: 4,
594
+ "4": "CATALOG_QUERY_HYPER_CLOUD",
595
+ HEALTH_CHECK: 5,
596
+ "5": "HEALTH_CHECK",
597
+ INTERNAL_SQLFRAME: 6,
598
+ "6": "INTERNAL_SQLFRAME",
599
+ CLOUD_STORE: 7,
600
+ "7": "CLOUD_STORE"
601
+ });
602
+ /**
603
+ * The status of a task, the numbers of the Rust state
604
+ * @enum {1 | 2 | 3 | 4}
605
+ */
606
+ var TaskStatus = Object.freeze({
607
+ TASK_RUNNING: 1,
608
+ "1": "TASK_RUNNING",
609
+ TASK_SUCCEEDED: 2,
610
+ "2": "TASK_SUCCEEDED",
611
+ TASK_FAILED: 3,
612
+ "3": "TASK_FAILED",
613
+ TASK_CANCELLED: 4,
614
+ "4": "TASK_CANCELLED"
615
+ });
616
+ var CatalogFinalization = typeof FinalizationRegistry === "undefined" ? {
617
+ register: () => {},
618
+ unregister: () => {}
619
+ } : new FinalizationRegistry((ptr) => wasm.__wbg_catalog_free(ptr >>> 0, 1));
620
+ /**
621
+ * A catalog (`dashql_catalog_*`)
622
+ */
623
+ var Catalog = class Catalog {
624
+ static __wrap(ptr) {
625
+ ptr = ptr >>> 0;
626
+ const obj = Object.create(Catalog.prototype);
627
+ obj.__wbg_ptr = ptr;
628
+ CatalogFinalization.register(obj, obj.__wbg_ptr, obj);
629
+ return obj;
630
+ }
631
+ __destroy_into_raw() {
632
+ const ptr = this.__wbg_ptr;
633
+ this.__wbg_ptr = 0;
634
+ CatalogFinalization.unregister(this);
635
+ return ptr;
636
+ }
637
+ free() {
638
+ const ptr = this.__destroy_into_raw();
639
+ wasm.__wbg_catalog_free(ptr, 0);
640
+ }
641
+ /**
642
+ * The `CatalogStatistics`
643
+ * @returns {Uint8Array}
644
+ */
645
+ statistics() {
646
+ const ret = wasm.catalog_statistics(this.__wbg_ptr);
647
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
648
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
649
+ return v1;
650
+ }
651
+ /**
652
+ * Drop a script from the catalog
653
+ * @param {Script} script
654
+ */
655
+ dropScript(script) {
656
+ _assertClass(script, Script);
657
+ const ret = wasm.catalog_dropScript(this.__wbg_ptr, script.__wbg_ptr);
658
+ if (ret[1]) throw takeFromExternrefTable0(ret[0]);
659
+ }
660
+ /**
661
+ * Load the analysis of a script into a `CatalogLayer`
662
+ * @param {Script} script
663
+ * @param {number} layer
664
+ */
665
+ loadScript(script, layer) {
666
+ _assertClass(script, Script);
667
+ const ret = wasm.catalog_loadScript(this.__wbg_ptr, script.__wbg_ptr, layer);
668
+ if (ret[1]) throw takeFromExternrefTable0(ret[0]);
669
+ }
670
+ /**
671
+ * Does the catalog change only through the runtime, the catalog of a connection?
672
+ * @returns {boolean}
673
+ */
674
+ isReadOnly() {
675
+ return wasm.catalog_isReadOnly(this.__wbg_ptr) !== 0;
676
+ }
677
+ /**
678
+ * Load the analyses of several scripts atomically
679
+ * @param {ScriptBatch} batch
680
+ */
681
+ loadScripts(batch) {
682
+ _assertClass(batch, ScriptBatch);
683
+ const ret = wasm.catalog_loadScripts(this.__wbg_ptr, batch.__wbg_ptr);
684
+ if (ret[1]) throw takeFromExternrefTable0(ret[0]);
685
+ }
686
+ /**
687
+ * Update the tables of a descriptor entry with a packed `CatalogTableUpdate`
688
+ * @param {number} id
689
+ * @param {number} layer
690
+ * @param {Uint8Array} update
691
+ */
692
+ replaceTables(id, layer, update) {
693
+ const ptr0 = passArray8ToWasm0(update, wasm.__wbindgen_malloc);
694
+ const len0 = WASM_VECTOR_LEN;
695
+ const ret = wasm.catalog_replaceTables(this.__wbg_ptr, id, layer, ptr0, len0);
696
+ if (ret[1]) throw takeFromExternrefTable0(ret[0]);
697
+ }
698
+ /**
699
+ * @param {number} id
700
+ */
701
+ dropDescriptor(id) {
702
+ const ret = wasm.catalog_dropDescriptor(this.__wbg_ptr, id);
703
+ if (ret[1]) throw takeFromExternrefTable0(ret[0]);
704
+ }
705
+ /**
706
+ * The relations that the connection reported as gone, as packed `TouchedRelations`
707
+ * @returns {Uint8Array}
708
+ */
709
+ absentRelations() {
710
+ const ret = wasm.catalog_absentRelations(this.__wbg_ptr);
711
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
712
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
713
+ return v1;
714
+ }
715
+ /**
716
+ * The `CatalogEntries` of all entries in rank order
717
+ * @returns {Uint8Array}
718
+ */
719
+ describeEntries() {
720
+ const ret = wasm.catalog_describeEntries(this.__wbg_ptr);
721
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
722
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
723
+ return v1;
724
+ }
725
+ /**
726
+ * The packed `CatalogDescriptor` of a descriptor entry
727
+ * @param {number} id
728
+ * @returns {Uint8Array | undefined}
729
+ */
730
+ descriptorBytes(id) {
731
+ const ret = wasm.catalog_descriptorBytes(this.__wbg_ptr, id);
732
+ let v1;
733
+ if (ret[0] !== 0) {
734
+ v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
735
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
736
+ }
737
+ return v1;
738
+ }
739
+ /**
740
+ * @returns {number}
741
+ */
742
+ allocateEntryId() {
743
+ return wasm.catalog_allocateEntryId(this.__wbg_ptr) >>> 0;
744
+ }
745
+ /**
746
+ * @param {number} id
747
+ * @returns {boolean}
748
+ */
749
+ containsEntryId(id) {
750
+ return wasm.catalog_containsEntryId(this.__wbg_ptr, id) !== 0;
751
+ }
752
+ /**
753
+ * Publish descriptor bytes in a `CatalogLayer`
754
+ * @param {number} id
755
+ * @param {number} layer
756
+ * @param {Uint8Array} descriptor
757
+ */
758
+ replaceDescriptor(id, layer, descriptor) {
759
+ const ptr0 = passArray8ToWasm0(descriptor, wasm.__wbindgen_malloc);
760
+ const len0 = WASM_VECTOR_LEN;
761
+ const ret = wasm.catalog_replaceDescriptor(this.__wbg_ptr, id, layer, ptr0, len0);
762
+ if (ret[1]) throw takeFromExternrefTable0(ret[0]);
763
+ }
764
+ /**
765
+ * The `CatalogEntries` of one entry, empty if the entry is unknown
766
+ * @param {number} id
767
+ * @returns {Uint8Array | undefined}
768
+ */
769
+ describeEntriesOf(id) {
770
+ const ret = wasm.catalog_describeEntriesOf(this.__wbg_ptr, id);
771
+ let v1;
772
+ if (ret[0] !== 0) {
773
+ v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
774
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
775
+ }
776
+ return v1;
777
+ }
778
+ /**
779
+ * Drop the client functions of a namespace
780
+ * @param {string} namespace
781
+ */
782
+ dropClientFunctions(namespace) {
783
+ const ptr0 = passStringToWasm0(namespace, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
784
+ const len0 = WASM_VECTOR_LEN;
785
+ const ret = wasm.catalog_dropClientFunctions(this.__wbg_ptr, ptr0, len0);
786
+ if (ret[1]) throw takeFromExternrefTable0(ret[0]);
787
+ }
788
+ /**
789
+ * Register client functions from their JSON spec and return their namespace. The namespace must be free.
790
+ * @param {string} spec
791
+ * @returns {string}
792
+ */
793
+ registerClientFunctions(spec) {
794
+ let deferred3_0;
795
+ let deferred3_1;
796
+ try {
797
+ const ptr0 = passStringToWasm0(spec, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
798
+ const len0 = WASM_VECTOR_LEN;
799
+ const ret = wasm.catalog_registerClientFunctions(this.__wbg_ptr, ptr0, len0);
800
+ var ptr2 = ret[0];
801
+ var len2 = ret[1];
802
+ if (ret[3]) {
803
+ ptr2 = 0;
804
+ len2 = 0;
805
+ throw takeFromExternrefTable0(ret[2]);
806
+ }
807
+ deferred3_0 = ptr2;
808
+ deferred3_1 = len2;
809
+ return getStringFromWasm0(ptr2, len2);
810
+ } finally {
811
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
812
+ }
813
+ }
814
+ constructor() {
815
+ const ret = wasm.catalog_new();
816
+ this.__wbg_ptr = ret >>> 0;
817
+ CatalogFinalization.register(this, this.__wbg_ptr, this);
818
+ return this;
819
+ }
820
+ clear() {
821
+ const ret = wasm.catalog_clear(this.__wbg_ptr);
822
+ if (ret[1]) throw takeFromExternrefTable0(ret[0]);
823
+ }
824
+ /**
825
+ * The `FlatCatalog`
826
+ * @returns {Uint8Array}
827
+ */
828
+ flatten() {
829
+ const ret = wasm.catalog_flatten(this.__wbg_ptr);
830
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
831
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
832
+ return v1;
833
+ }
834
+ /**
835
+ * The version of the catalog, every change of its contents bumps it. Sessions and shells change the catalog
836
+ * too, the version tells JS when its copies of the catalog are outdated.
837
+ * @returns {number}
838
+ */
839
+ version() {
840
+ return wasm.catalog_version(this.__wbg_ptr) >>> 0;
841
+ }
842
+ };
843
+ if (Symbol.dispose) Catalog.prototype[Symbol.dispose] = Catalog.prototype.free;
844
+ var QueryProfileFinalization = typeof FinalizationRegistry === "undefined" ? {
845
+ register: () => {},
846
+ unregister: () => {}
847
+ } : new FinalizationRegistry((ptr) => wasm.__wbg_queryprofile_free(ptr >>> 0, 1));
848
+ /**
849
+ * A query profile (`dashql_query_profile_*`)
850
+ */
851
+ var QueryProfile = class {
852
+ __destroy_into_raw() {
853
+ const ptr = this.__wbg_ptr;
854
+ this.__wbg_ptr = 0;
855
+ QueryProfileFinalization.unregister(this);
856
+ return ptr;
857
+ }
858
+ free() {
859
+ const ptr = this.__destroy_into_raw();
860
+ wasm.__wbg_queryprofile_free(ptr, 0);
861
+ }
862
+ /**
863
+ * Start an empty model for a query of an engine (`ProfileEngine`), the structure appears with the progress
864
+ * @param {number} engine
865
+ */
866
+ startQuery(engine) {
867
+ wasm.queryprofile_startQuery(this.__wbg_ptr, engine);
868
+ }
869
+ /**
870
+ * Apply input events (a JSON array), returns the packed `QueryProfileEvents` of the effective state changes
871
+ * @param {Uint8Array} events
872
+ * @returns {Uint8Array}
873
+ */
874
+ applyEvents(events) {
875
+ const ptr0 = passArray8ToWasm0(events, wasm.__wbindgen_malloc);
876
+ const len0 = WASM_VECTOR_LEN;
877
+ const ret = wasm.queryprofile_applyEvents(this.__wbg_ptr, ptr0, len0);
878
+ if (ret[3]) throw takeFromExternrefTable0(ret[2]);
879
+ var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
880
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
881
+ return v2;
882
+ }
883
+ /**
884
+ * Lay out the loaded plan again with the configured layout, e.g. after configuring the other orientation
885
+ */
886
+ computeLayout() {
887
+ wasm.queryprofile_computeLayout(this.__wbg_ptr);
888
+ }
889
+ /**
890
+ * Load a Hyper plan and compute the layout, throws if the plan cannot be parsed
891
+ * @param {Uint8Array} plan
892
+ */
893
+ loadHyperPlan(plan) {
894
+ const ptr0 = passArray8ToWasm0(plan, wasm.__wbindgen_malloc);
895
+ const len0 = WASM_VECTOR_LEN;
896
+ const ret = wasm.queryprofile_loadHyperPlan(this.__wbg_ptr, ptr0, len0);
897
+ if (ret[1]) throw takeFromExternrefTable0(ret[0]);
898
+ }
899
+ /**
900
+ * Load a Trino plan (EXPLAIN JSON fragments or a QueryInfo with stage plans) and compute the layout, throws
901
+ * if the plan cannot be parsed. Resets the execution state.
902
+ * @param {Uint8Array} plan
903
+ */
904
+ loadTrinoPlan(plan) {
905
+ const ptr0 = passArray8ToWasm0(plan, wasm.__wbindgen_malloc);
906
+ const len0 = WASM_VECTOR_LEN;
907
+ const ret = wasm.queryprofile_loadTrinoPlan(this.__wbg_ptr, ptr0, len0);
908
+ if (ret[1]) throw takeFromExternrefTable0(ret[0]);
909
+ }
910
+ /**
911
+ * Reset the execution state, drops the structure that was registered at runtime
912
+ */
913
+ resetExecution() {
914
+ wasm.queryprofile_resetExecution(this.__wbg_ptr);
915
+ }
916
+ /**
917
+ * The current execution state as packed `QueryProfileEvents`, one update per entity with state
918
+ * @returns {Uint8Array}
919
+ */
920
+ snapshotEvents() {
921
+ const ret = wasm.queryprofile_snapshotEvents(this.__wbg_ptr);
922
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
923
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
924
+ return v1;
925
+ }
926
+ /**
927
+ * The structure version, the structure must be repacked when it changes
928
+ * @returns {number}
929
+ */
930
+ structureVersion() {
931
+ return wasm.queryprofile_structureVersion(this.__wbg_ptr) >>> 0;
932
+ }
933
+ /**
934
+ * Apply a Trino QueryInfo (JSON, pruned or not) received at a time in milliseconds since epoch: the pipelines
935
+ * and slot statistics of the stages. Returns the packed `QueryProfileEvents` of the effective state changes.
936
+ * @param {Uint8Array} info
937
+ * @param {number} time
938
+ * @returns {Uint8Array}
939
+ */
940
+ applyTrinoQueryInfo(info, time) {
941
+ const ptr0 = passArray8ToWasm0(info, wasm.__wbindgen_malloc);
942
+ const len0 = WASM_VECTOR_LEN;
943
+ const ret = wasm.queryprofile_applyTrinoQueryInfo(this.__wbg_ptr, ptr0, len0, time);
944
+ if (ret[3]) throw takeFromExternrefTable0(ret[2]);
945
+ var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
946
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
947
+ return v2;
948
+ }
949
+ /**
950
+ * Apply the `stats` of a Trino `/v1/statement` response (JSON) received at a time in milliseconds since
951
+ * epoch, returns the packed `QueryProfileEvents` of the effective state changes
952
+ * @param {Uint8Array} stats
953
+ * @param {number} time
954
+ * @returns {Uint8Array}
955
+ */
956
+ applyTrinoStatementStats(stats, time) {
957
+ const ptr0 = passArray8ToWasm0(stats, wasm.__wbindgen_malloc);
958
+ const len0 = WASM_VECTOR_LEN;
959
+ const ret = wasm.queryprofile_applyTrinoStatementStats(this.__wbg_ptr, ptr0, len0, time);
960
+ if (ret[3]) throw takeFromExternrefTable0(ret[2]);
961
+ var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
962
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
963
+ return v2;
964
+ }
965
+ constructor() {
966
+ const ret = wasm.queryprofile_new();
967
+ this.__wbg_ptr = ret >>> 0;
968
+ QueryProfileFinalization.register(this, this.__wbg_ptr, this);
969
+ return this;
970
+ }
971
+ /**
972
+ * The packed `QueryProfile`
973
+ * @returns {Uint8Array}
974
+ */
975
+ pack() {
976
+ const ret = wasm.queryprofile_pack(this.__wbg_ptr);
977
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
978
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
979
+ return v1;
980
+ }
981
+ reset() {
982
+ wasm.queryprofile_reset(this.__wbg_ptr);
983
+ }
984
+ /**
985
+ * Configure the layout with a packed `ProfileLayoutConfig`
986
+ * @param {number} level_height
987
+ * @param {number} node_height
988
+ * @param {number} node_margin_horizontal
989
+ * @param {number} node_padding_left
990
+ * @param {number} node_padding_right
991
+ * @param {number} icon_width
992
+ * @param {number} icon_margin_right
993
+ * @param {number} max_label_chars
994
+ * @param {number} width_per_label_char
995
+ * @param {number} node_min_width
996
+ * @param {number} node_margin_vertical
997
+ * @param {number} orientation
998
+ * @param {number} symbol_width
999
+ */
1000
+ configure(level_height, node_height, node_margin_horizontal, node_padding_left, node_padding_right, icon_width, icon_margin_right, max_label_chars, width_per_label_char, node_min_width, node_margin_vertical, orientation, symbol_width) {
1001
+ wasm.queryprofile_configure(this.__wbg_ptr, level_height, node_height, node_margin_horizontal, node_padding_left, node_padding_right, icon_width, icon_margin_right, max_label_chars, width_per_label_char, node_min_width, node_margin_vertical, orientation, symbol_width);
1002
+ }
1003
+ };
1004
+ if (Symbol.dispose) QueryProfile.prototype[Symbol.dispose] = QueryProfile.prototype.free;
1005
+ var QueryProgressFollowerFinalization = typeof FinalizationRegistry === "undefined" ? {
1006
+ register: () => {},
1007
+ unregister: () => {}
1008
+ } : new FinalizationRegistry((ptr) => wasm.__wbg_queryprogressfollower_free(ptr >>> 0, 1));
1009
+ /**
1010
+ * A follower of the progress of a query: it replays the recording of the progress with a layout of its own, e.g. the
1011
+ * other orientation of the plan, and applies the payloads that are recorded later as they come
1012
+ */
1013
+ var QueryProgressFollower = class {
1014
+ __destroy_into_raw() {
1015
+ const ptr = this.__wbg_ptr;
1016
+ this.__wbg_ptr = 0;
1017
+ QueryProgressFollowerFinalization.unregister(this);
1018
+ return ptr;
1019
+ }
1020
+ free() {
1021
+ const ptr = this.__destroy_into_raw();
1022
+ wasm.__wbg_queryprogressfollower_free(ptr, 0);
1023
+ }
1024
+ /**
1025
+ * A follower with the layout of its plans, null for the default one
1026
+ * @param {ProfileLayoutView | null} [layout]
1027
+ */
1028
+ constructor(layout) {
1029
+ const ret = wasm.queryprogressfollower_new(isLikeNone(layout) ? 0 : addToExternrefTable0(layout));
1030
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1031
+ this.__wbg_ptr = ret[0] >>> 0;
1032
+ QueryProgressFollowerFinalization.register(this, this.__wbg_ptr, this);
1033
+ return this;
1034
+ }
1035
+ };
1036
+ if (Symbol.dispose) QueryProgressFollower.prototype[Symbol.dispose] = QueryProgressFollower.prototype.free;
1037
+ var RuntimeFinalization = typeof FinalizationRegistry === "undefined" ? {
1038
+ register: () => {},
1039
+ unregister: () => {}
1040
+ } : new FinalizationRegistry((ptr) => wasm.__wbg_runtime_free(ptr >>> 0, 1));
1041
+ /**
1042
+ * The runtime of DashQL, see the module
1043
+ */
1044
+ var Runtime = class Runtime {
1045
+ static __wrap(ptr) {
1046
+ ptr = ptr >>> 0;
1047
+ const obj = Object.create(Runtime.prototype);
1048
+ obj.__wbg_ptr = ptr;
1049
+ RuntimeFinalization.register(obj, obj.__wbg_ptr, obj);
1050
+ return obj;
1051
+ }
1052
+ __destroy_into_raw() {
1053
+ const ptr = this.__wbg_ptr;
1054
+ this.__wbg_ptr = 0;
1055
+ RuntimeFinalization.unregister(this);
1056
+ return ptr;
1057
+ }
1058
+ free() {
1059
+ const ptr = this.__destroy_into_raw();
1060
+ wasm.__wbg_runtime_free(ptr, 0);
1061
+ }
1062
+ /**
1063
+ * Attach files to a workbook: every Parquet file gets a name whose table parameter takes no name of a script or
1064
+ * another attachment (`sales.parquet` becomes `sales-2.parquet`, a file with the name of an attachment replaces
1065
+ * it), is written through the storage writer and the view of the workbook lists it once the storage does. Resolves
1066
+ * with the names the files got and the refused files, rejects with what the storage failed with.
1067
+ * @param {string} workbook_id
1068
+ * @param {AttachedFile[]} files
1069
+ * @returns {Promise<AttachFilesOutcome>}
1070
+ */
1071
+ attachFiles(workbook_id, files) {
1072
+ const ptr0 = passStringToWasm0(workbook_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1073
+ const len0 = WASM_VECTOR_LEN;
1074
+ const ret = wasm.runtime_attachFiles(this.__wbg_ptr, ptr0, len0, files);
1075
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1076
+ return takeFromExternrefTable0(ret[0]);
1077
+ }
1078
+ /**
1079
+ * Rename an attachment of a workbook like a script: the name is a display name, `.parquet` is added unless it has
1080
+ * it, and the name takes no name of a script or another attachment, `sales` becomes `sales-2` then. The scripts
1081
+ * that read the attachment read the new name at once and its file is renamed through the storage writer. A refused
1082
+ * rename, e.g. of a cloud preview or one whose rewrite of the references fails, rejects before anything changed.
1083
+ * Resolves with the new file name once the file has it and the view lists it, null for a name that is unchanged or
1084
+ * no plain file name. Rejects with what the storage failed with, the writer tries the rename again.
1085
+ * @param {string} workbook_id
1086
+ * @param {string} file_name
1087
+ * @param {string} name
1088
+ * @returns {Promise<string | null>}
1089
+ */
1090
+ renameAttachment(workbook_id, file_name, name) {
1091
+ const ptr0 = passStringToWasm0(workbook_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1092
+ const len0 = WASM_VECTOR_LEN;
1093
+ const ptr1 = passStringToWasm0(file_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1094
+ const len1 = WASM_VECTOR_LEN;
1095
+ const ptr2 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1096
+ const len2 = WASM_VECTOR_LEN;
1097
+ const ret = wasm.runtime_renameAttachment(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
1098
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1099
+ return takeFromExternrefTable0(ret[0]);
1100
+ }
1101
+ /**
1102
+ * List the attachments of a workbook again, e.g. after one was removed or renamed in the storage. Resolves once
1103
+ * the view of the workbook lists them, rejects with what the storage failed with.
1104
+ * @param {string} workbook_id
1105
+ * @returns {Promise<void>}
1106
+ */
1107
+ refreshAttachments(workbook_id) {
1108
+ const ptr0 = passStringToWasm0(workbook_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1109
+ const len0 = WASM_VECTOR_LEN;
1110
+ return wasm.runtime_refreshAttachments(this.__wbg_ptr, ptr0, len0);
1111
+ }
1112
+ /**
1113
+ * The identity of the catalog of a connection, `catalogId` of its view, without reading the view. None for an
1114
+ * unknown connection and while a task holds it.
1115
+ * @param {string} connection_id
1116
+ * @returns {number | undefined}
1117
+ */
1118
+ catalogId(connection_id) {
1119
+ const ptr0 = passStringToWasm0(connection_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1120
+ const len0 = WASM_VECTOR_LEN;
1121
+ const ret = wasm.runtime_catalogId(this.__wbg_ptr, ptr0, len0);
1122
+ return ret[0] === 0 ? void 0 : ret[1];
1123
+ }
1124
+ /**
1125
+ * Write the copies of the last save of a connection into workbooks again, null without a save that wrote the app
1126
+ * manifest
1127
+ * @param {string} connection_id
1128
+ * @param {string[]} workbook_ids
1129
+ * @returns {Promise<ConnectionSaveOutcome | null>}
1130
+ */
1131
+ retrySave(connection_id, workbook_ids) {
1132
+ const ptr0 = passStringToWasm0(connection_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1133
+ const len0 = WASM_VECTOR_LEN;
1134
+ const ptr1 = passArrayJsValueToWasm0(workbook_ids, wasm.__wbindgen_malloc);
1135
+ const len1 = WASM_VECTOR_LEN;
1136
+ return wasm.runtime_retrySave(this.__wbg_ptr, ptr0, len0, ptr1, len1);
1137
+ }
1138
+ /**
1139
+ * Run a script of a workbook with the scripts it references, see `runWorkbook`. A run that holds the workbook
1140
+ * refuses it.
1141
+ * @param {string} workbook_id
1142
+ * @param {number} script_key
1143
+ * @param {RunScriptOptions | null} [options]
1144
+ * @returns {Promise<{ outcome: RunOutcome; error: unknown }>}
1145
+ */
1146
+ runScript(workbook_id, script_key, options) {
1147
+ const ptr0 = passStringToWasm0(workbook_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1148
+ const len0 = WASM_VECTOR_LEN;
1149
+ const ret = wasm.runtime_runScript(this.__wbg_ptr, ptr0, len0, script_key, isLikeNone(options) ? 0 : addToExternrefTable0(options));
1150
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1151
+ return takeFromExternrefTable0(ret[0]);
1152
+ }
1153
+ /**
1154
+ * An id of the sequence of the queries without a query, e.g. for the computation of a result that no query of the
1155
+ * runtime produced. Fails while a task holds the registry.
1156
+ * @returns {number}
1157
+ */
1158
+ allocateId() {
1159
+ const ret = wasm.runtime_allocateId(this.__wbg_ptr);
1160
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1161
+ return ret[0];
1162
+ }
1163
+ /**
1164
+ * Drop an import that was read, its files are released
1165
+ * @param {number} import_id
1166
+ */
1167
+ dropImport(import_id) {
1168
+ wasm.runtime_dropImport(this.__wbg_ptr, import_id);
1169
+ }
1170
+ /**
1171
+ * Read a workbook to import: a `.dashql` archive, a workbook folder or the workbook tables of a cloud. Nothing is
1172
+ * written, the import waits for `commitImport` or `dropImport`. Resolves with what an import would write, the
1173
+ * registered workbook with the same id and the questions about the connections.
1174
+ * @param {ImportSource} source
1175
+ * @returns {Promise<ImportPreview>}
1176
+ */
1177
+ readImport(source) {
1178
+ return wasm.runtime_readImport(this.__wbg_ptr, source);
1179
+ }
1180
+ /**
1181
+ * The reusable result keys of the scripts of a workbook in feed order, the keys that a run reads and writes: of the
1182
+ * targets with what they need, of every script without. Null for a script without one, all null if the analyses as
1183
+ * they are can't be planned.
1184
+ * @param {string} workbook_id
1185
+ * @param {Uint32Array | null} [targets]
1186
+ * @returns {Promise<(string | null)[]>}
1187
+ */
1188
+ resultKeys(workbook_id, targets) {
1189
+ const ptr0 = passStringToWasm0(workbook_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1190
+ const len0 = WASM_VECTOR_LEN;
1191
+ var ptr1 = isLikeNone(targets) ? 0 : passArray32ToWasm0(targets, wasm.__wbindgen_malloc);
1192
+ var len1 = WASM_VECTOR_LEN;
1193
+ const ret = wasm.runtime_resultKeys(this.__wbg_ptr, ptr0, len0, ptr1, len1);
1194
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1195
+ return takeFromExternrefTable0(ret[0]);
1196
+ }
1197
+ /**
1198
+ * Cancel a query, resolves once it ended
1199
+ * @param {number} query_id
1200
+ * @returns {Promise<void>}
1201
+ */
1202
+ cancelQuery(query_id) {
1203
+ const ret = wasm.runtime_cancelQuery(this.__wbg_ptr, query_id);
1204
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1205
+ return takeFromExternrefTable0(ret[0]);
1206
+ }
1207
+ /**
1208
+ * Cancel the setup of a connection or a login that runs, it ends as cancelled at its next step
1209
+ * @param {string} setup_id
1210
+ */
1211
+ cancelSetup(setup_id) {
1212
+ const ptr0 = passStringToWasm0(setup_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1213
+ const len0 = WASM_VECTOR_LEN;
1214
+ wasm.runtime_cancelSetup(this.__wbg_ptr, ptr0, len0);
1215
+ }
1216
+ /**
1217
+ * Run the scripts of a workbook: all of them, the targets with what they need, or the scripts that a change of
1218
+ * inputs affects. A change of inputs while the workbook is busy stops the run that holds it and starts once the
1219
+ * workbook is free. The listener hears the events of the scripts and may prepare the connections. Resolves with how
1220
+ * the run ended, `refused` names why it didn't start; `error` is what the platform failed with.
1221
+ * @param {string} workbook_id
1222
+ * @param {RunWorkbookOptions | null | undefined} options
1223
+ * @param {RunListener | null} listener
1224
+ * @returns {Promise<{ outcome: RunOutcome; error: unknown }>}
1225
+ */
1226
+ runWorkbook(workbook_id, options, listener) {
1227
+ const ptr0 = passStringToWasm0(workbook_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1228
+ const len0 = WASM_VECTOR_LEN;
1229
+ const ret = wasm.runtime_runWorkbook(this.__wbg_ptr, ptr0, len0, isLikeNone(options) ? 0 : addToExternrefTable0(options), listener);
1230
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1231
+ return takeFromExternrefTable0(ret[0]);
1232
+ }
1233
+ /**
1234
+ * Hold the writes of the writer (no workbook) or of a workbook for a reason, e.g. `pause` while the app moves a
1235
+ * workbook or `handover` when another tab takes over. Holds are counted, each is released on its own. A flush
1236
+ * writes past a pause of the writer, never past another hold.
1237
+ * @param {StorageHoldReason} reason
1238
+ * @param {string | null} [workbook_id]
1239
+ */
1240
+ storageHold(reason, workbook_id) {
1241
+ var ptr0 = isLikeNone(workbook_id) ? 0 : passStringToWasm0(workbook_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1242
+ var len0 = WASM_VECTOR_LEN;
1243
+ const ret = wasm.runtime_storageHold(this.__wbg_ptr, reason, ptr0, len0);
1244
+ if (ret[1]) throw takeFromExternrefTable0(ret[0]);
1245
+ }
1246
+ /**
1247
+ * The slices that changed and the effects on handles since the last call: the slices that the services marked,
1248
+ * see `changes.rs`. A slice that is busy is never reported as gone, it follows with the next changes. Changes that
1249
+ * fail to cross come again with the next call.
1250
+ * @returns {ChangeSet}
1251
+ */
1252
+ takeChanges() {
1253
+ const ret = wasm.runtime_takeChanges(this.__wbg_ptr);
1254
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1255
+ return takeFromExternrefTable0(ret[0]);
1256
+ }
1257
+ /**
1258
+ * Tests that stand in for the catalog loader: the catalog of a connection as a handle that writes. Its writes
1259
+ * bypass the runtime, nothing is announced. None for an unknown connection.
1260
+ * @param {string} connection_id
1261
+ * @returns {Catalog | undefined}
1262
+ */
1263
+ testCatalog(connection_id) {
1264
+ const ptr0 = passStringToWasm0(connection_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1265
+ const len0 = WASM_VECTOR_LEN;
1266
+ const ret = wasm.runtime_testCatalog(this.__wbg_ptr, ptr0, len0);
1267
+ return ret === 0 ? void 0 : Catalog.__wrap(ret);
1268
+ }
1269
+ /**
1270
+ * Analyze a result as the computation of a table: its import into the compute database, the statistics, the
1271
+ * system columns, the summaries of the columns and the ordering of the options. The result is a table of the
1272
+ * handle table, the computation takes its handle; an analysis that starts no computation releases it, so does a
1273
+ * call that fails. The module reads only the rows and the schema of the result. A result without columns has
1274
+ * nothing to analyze, its handle is released. Resolves once the analysis is done, rejects with the error of a
1275
+ * failed task.
1276
+ * @param {number} table_id
1277
+ * @param {number} table
1278
+ * @param {AnalyzeTableOptions} options
1279
+ * @returns {Promise<void>}
1280
+ */
1281
+ analyzeTable(table_id, table, options) {
1282
+ const ret = wasm.runtime_analyzeTable(this.__wbg_ptr, table_id, table, options);
1283
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1284
+ return takeFromExternrefTable0(ret[0]);
1285
+ }
1286
+ /**
1287
+ * Import a workbook that was read, with the answers to its questions: the connections are mapped, the cached
1288
+ * results go to the query result cache, the workbook is written and restored. The listener hears the steps.
1289
+ * @param {number} import_id
1290
+ * @param {ImportAnswers} answers
1291
+ * @param {((step: ImportStep, results: ImportedResults | null) => void) | null} listener
1292
+ * @returns {Promise<ImportOutcome>}
1293
+ */
1294
+ commitImport(import_id, answers, listener) {
1295
+ const ret = wasm.runtime_commitImport(this.__wbg_ptr, import_id, answers, listener);
1296
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1297
+ return takeFromExternrefTable0(ret[0]);
1298
+ }
1299
+ /**
1300
+ * Run a query on a connection. The query is in the history of the connection from the start; it runs once the
1301
+ * runtime described it: the target on the channel of the connection, the key of its result in the query result
1302
+ * cache and what the options of the arguments ask for. The caller hears the events of the query (`events`).
1303
+ * `failure` is what a query that the caller failed fails with. Returns the id and the promise of the outcome.
1304
+ * @param {string} connection_id
1305
+ * @param {QueryArgs} args
1306
+ * @param {any} failure
1307
+ * @param {((event: QueryCallerEvent) => void) | null} events
1308
+ * @returns {QueryTicket}
1309
+ */
1310
+ executeQuery(connection_id, args, failure, events) {
1311
+ const ptr0 = passStringToWasm0(connection_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1312
+ const len0 = WASM_VECTOR_LEN;
1313
+ const ret = wasm.runtime_executeQuery(this.__wbg_ptr, ptr0, len0, args, failure, events);
1314
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1315
+ return takeFromExternrefTable0(ret[0]);
1316
+ }
1317
+ /**
1318
+ * A view starts (`shown` true) or stops showing the profile of a query: the connector then fetches the plan and
1319
+ * its statistics
1320
+ * @param {number} query_id
1321
+ * @param {boolean} shown
1322
+ */
1323
+ watchProfile(query_id, shown) {
1324
+ const ret = wasm.runtime_watchProfile(this.__wbg_ptr, query_id, shown);
1325
+ if (ret[1]) throw takeFromExternrefTable0(ret[0]);
1326
+ }
1327
+ /**
1328
+ * The first rows of an analyzed result, at most `limit`, in the order of the result and without the columns of
1329
+ * its computation, as an Arrow IPC stream, e.g. for the table of a terminal. The rows are read from the data
1330
+ * frame of the computation, the result itself doesn't enter the module. Rejects for a table that has no
1331
+ * computation or whose analysis isn't done.
1332
+ * @param {number} table_id
1333
+ * @param {number} limit
1334
+ * @returns {Promise<Uint8Array>}
1335
+ */
1336
+ previewResult(table_id, limit) {
1337
+ const ret = wasm.runtime_previewResult(this.__wbg_ptr, table_id, limit);
1338
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1339
+ return takeFromExternrefTable0(ret[0]);
1340
+ }
1341
+ /**
1342
+ * The session of a script, shared with its workbook, as a handle that reads it. Every call returns a new handle.
1343
+ * None for an unknown script.
1344
+ * @param {number} script_key
1345
+ * @returns {WorkbookScriptSession | undefined}
1346
+ */
1347
+ scriptSession(script_key) {
1348
+ const ret = wasm.runtime_scriptSession(this.__wbg_ptr, script_key);
1349
+ return ret === 0 ? void 0 : WorkbookScriptSession.__wrap(ret);
1350
+ }
1351
+ /**
1352
+ * Export a workbook: a `.dashql` archive (a Blob of the handle table that the caller releases), a link, or the
1353
+ * workbook tables, which go to `consume` and stay readable until it settled. The pending writes of the workbook
1354
+ * are written first, the cached results are retained while the export reads them. Rejects with what the platform
1355
+ * failed with.
1356
+ * @param {string} workbook_id
1357
+ * @param {ExportOptions} options
1358
+ * @param {((tables: ExportedTables) => Promise<void>) | null} consume
1359
+ * @returns {Promise<ExportOutcome>}
1360
+ */
1361
+ exportWorkbook(workbook_id, options, consume) {
1362
+ const ptr0 = passStringToWasm0(workbook_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1363
+ const len0 = WASM_VECTOR_LEN;
1364
+ const ret = wasm.runtime_exportWorkbook(this.__wbg_ptr, ptr0, len0, options, consume);
1365
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1366
+ return takeFromExternrefTable0(ret[0]);
1367
+ }
1368
+ /**
1369
+ * Bring a storage root of the platform to the current storage version and every workbook folder that its workbook
1370
+ * tree registers to the current workbook format, without a runtime: the app runs it at startup before it sets up
1371
+ * its storage. A fresh storage gets a manifest with the current storage version, a storage of a newer version of
1372
+ * the app is refused. The platform holds the lock of the storage meanwhile. The storage of a runtime migrates a
1373
+ * workbook folder that it keeps elsewhere (`storage.workbookFolder`) when it reads an older workbook file.
1374
+ * @param {RuntimeStorageRoot} root
1375
+ * @param {((level: 'debug' | 'info' | 'warn' | 'error', message: string, details: [string, string][], target: string) => void) | null} log
1376
+ * @returns {Promise<StorageMigrationOutcome>}
1377
+ */
1378
+ static migrateStorage(root, log) {
1379
+ return wasm.runtime_migrateStorage(root, log);
1380
+ }
1381
+ /**
1382
+ * Request a refresh of the catalog of a connection, a forced one supersedes a running update. The catalog loader
1383
+ * runs it once the connection is online.
1384
+ * @param {string} connection_id
1385
+ * @param {boolean} force
1386
+ */
1387
+ refreshCatalog(connection_id, force) {
1388
+ const ptr0 = passStringToWasm0(connection_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1389
+ const len0 = WASM_VECTOR_LEN;
1390
+ wasm.runtime_refreshCatalog(this.__wbg_ptr, ptr0, len0, force);
1391
+ }
1392
+ /**
1393
+ * Save a connection: the given params, else its draft, else its params. The app manifest first, then the params
1394
+ * are committed and the copies of the workbooks that use the connection are written. The view of the connection
1395
+ * shows the save while it runs.
1396
+ * @param {string} connection_id
1397
+ * @param {JsonParams | null} [params]
1398
+ * @returns {Promise<ConnectionSaveOutcome>}
1399
+ */
1400
+ saveConnection(connection_id, params) {
1401
+ const ptr0 = passStringToWasm0(connection_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1402
+ const len0 = WASM_VECTOR_LEN;
1403
+ const ret = wasm.runtime_saveConnection(this.__wbg_ptr, ptr0, len0, isLikeNone(params) ? 0 : addToExternrefTable0(params));
1404
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1405
+ return takeFromExternrefTable0(ret[0]);
1406
+ }
1407
+ /**
1408
+ * Run a command of the storage writer that waits for writes: flush and settle it, flush or delete a workbook, hand
1409
+ * over to another tab.
1410
+ * `flushWorkbook` resolves whether every write of the workbook reached the storage, `deleteWorkbook` rejects with
1411
+ * what the storage failed with.
1412
+ * @param {StorageCommand} command
1413
+ * @returns {Promise<unknown>}
1414
+ */
1415
+ storage(command) {
1416
+ const ret = wasm.runtime_storage(this.__wbg_ptr, command);
1417
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1418
+ return takeFromExternrefTable0(ret[0]);
1419
+ }
1420
+ /**
1421
+ * Release one hold of a reason. Once nothing holds them, the pending writes wait for their debounce again.
1422
+ * @param {StorageHoldReason} reason
1423
+ * @param {string | null} [workbook_id]
1424
+ */
1425
+ storageRelease(reason, workbook_id) {
1426
+ var ptr0 = isLikeNone(workbook_id) ? 0 : passStringToWasm0(workbook_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1427
+ var len0 = WASM_VECTOR_LEN;
1428
+ const ret = wasm.runtime_storageRelease(this.__wbg_ptr, reason, ptr0, len0);
1429
+ if (ret[1]) throw takeFromExternrefTable0(ret[0]);
1430
+ }
1431
+ /**
1432
+ * The workbook tables of the format with their columns, e.g. the schema of a cloud
1433
+ * @returns {WorkbookTableSchema[]}
1434
+ */
1435
+ static workbookTables() {
1436
+ const ret = wasm.runtime_workbookTables();
1437
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1438
+ return takeFromExternrefTable0(ret[0]);
1439
+ }
1440
+ /**
1441
+ * The cached results of the scripts of a workbook that an export would carry, counted without reading them
1442
+ * @param {string} workbook_id
1443
+ * @returns {Promise<ExportedResults>}
1444
+ */
1445
+ exportedResults(workbook_id) {
1446
+ const ptr0 = passStringToWasm0(workbook_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1447
+ const len0 = WASM_VECTOR_LEN;
1448
+ return wasm.runtime_exportedResults(this.__wbg_ptr, ptr0, len0);
1449
+ }
1450
+ /**
1451
+ * Are the writes of a workbook held, by a hold of the writer or of the workbook, e.g. after one of its files
1452
+ * changed outside the app?
1453
+ * @param {string} workbook_id
1454
+ * @returns {boolean}
1455
+ */
1456
+ isWorkbookHeld(workbook_id) {
1457
+ const ptr0 = passStringToWasm0(workbook_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1458
+ const len0 = WASM_VECTOR_LEN;
1459
+ return wasm.runtime_isWorkbookHeld(this.__wbg_ptr, ptr0, len0) !== 0;
1460
+ }
1461
+ /**
1462
+ * Restore a single workbook of the storage, e.g. one that was imported or the folder of a run, against the
1463
+ * connections of the runtime. Unknown connections are registered. A workbook with the same id is replaced. Rejects
1464
+ * if the workbook can't be restored.
1465
+ * @param {string} workbook_id
1466
+ * @returns {Promise<RestoreOutcome>}
1467
+ */
1468
+ restoreWorkbook(workbook_id) {
1469
+ const ptr0 = passStringToWasm0(workbook_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1470
+ const len0 = WASM_VECTOR_LEN;
1471
+ const ret = wasm.runtime_restoreWorkbook(this.__wbg_ptr, ptr0, len0);
1472
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1473
+ return takeFromExternrefTable0(ret[0]);
1474
+ }
1475
+ /**
1476
+ * Set up a connection with its connector: the channel of its params or of the params of the options, then the
1477
+ * health check unless the connection is online with its channel. The steps go to the connection as they happen, the
1478
+ * view of the connection shows them and whether a setup runs. A setup of the connection that runs is cancelled.
1479
+ * Resolves with the outcome, a failure is in the view of the connection as well.
1480
+ * @param {string} connection_id
1481
+ * @param {SetupOptions | null} [options]
1482
+ * @returns {Promise<SetupOutcome>}
1483
+ */
1484
+ setupConnection(connection_id, options) {
1485
+ const ptr0 = passStringToWasm0(connection_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1486
+ const len0 = WASM_VECTOR_LEN;
1487
+ const ret = wasm.runtime_setupConnection(this.__wbg_ptr, ptr0, len0, isLikeNone(options) ? 0 : addToExternrefTable0(options));
1488
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1489
+ return takeFromExternrefTable0(ret[0]);
1490
+ }
1491
+ /**
1492
+ * The versions of the storage format of the module: the storage version of the manifest and the format version of
1493
+ * workbook files
1494
+ * @returns {StorageVersions}
1495
+ */
1496
+ static storageVersions() {
1497
+ const ret = wasm.runtime_storageVersions();
1498
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1499
+ return takeFromExternrefTable0(ret[0]);
1500
+ }
1501
+ /**
1502
+ * The link of a connection: an empty workbook that holds only the connection, the params sanitized for sharing
1503
+ * @param {string} connection_id
1504
+ * @param {ConnectionLinkOptions} options
1505
+ * @returns {Promise<string>}
1506
+ */
1507
+ exportConnection(connection_id, options) {
1508
+ const ptr0 = passStringToWasm0(connection_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1509
+ const len0 = WASM_VECTOR_LEN;
1510
+ const ret = wasm.runtime_exportConnection(this.__wbg_ptr, ptr0, len0, options);
1511
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1512
+ return takeFromExternrefTable0(ret[0]);
1513
+ }
1514
+ /**
1515
+ * Apply an event of the editor of a script, a packed `EditorEvent`, and return the packed `EditorUpdate` for the
1516
+ * editor with its key: the workbook takes the update, writes the text and publishes it. The event names the text
1517
+ * version that the editor shows, an editor that missed a change of the text gets the status `STALE_TEXT_VERSION`
1518
+ * and shows the text of the script again. `known` is the key of the update that the editor holds
1519
+ * (`editorUpdateKey`), the update leaves out the analysis if the editor holds the one of the script. An edit of the
1520
+ * user accepts a staged rewrite. Null for an event of a session that the script no longer holds (`sessionGeneration`
1521
+ * of the view of the script).
1522
+ * @param {string} workbook_id
1523
+ * @param {number} script_key
1524
+ * @param {number} session_generation
1525
+ * @param {Uint8Array} event
1526
+ * @param {string | null} [known]
1527
+ * @returns {EditorEventOutcome | undefined}
1528
+ */
1529
+ applyEditorEvent(workbook_id, script_key, session_generation, event, known) {
1530
+ const ptr0 = passStringToWasm0(workbook_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1531
+ const len0 = WASM_VECTOR_LEN;
1532
+ const ptr1 = passArray8ToWasm0(event, wasm.__wbindgen_malloc);
1533
+ const len1 = WASM_VECTOR_LEN;
1534
+ var ptr2 = isLikeNone(known) ? 0 : passStringToWasm0(known, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1535
+ var len2 = WASM_VECTOR_LEN;
1536
+ const ret = wasm.runtime_applyEditorEvent(this.__wbg_ptr, ptr0, len0, script_key, session_generation, ptr1, len1, ptr2, len2);
1537
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1538
+ return takeFromExternrefTable0(ret[0]);
1539
+ }
1540
+ /**
1541
+ * Wait for the writes into the query result cache that run, e.g. before a process ends
1542
+ * @returns {Promise<void>}
1543
+ */
1544
+ flushCacheWrites() {
1545
+ return wasm.runtime_flushCacheWrites(this.__wbg_ptr);
1546
+ }
1547
+ /**
1548
+ * Start or stop the catalog loader. A stopped loader starts no update, the running ones finish.
1549
+ * @param {boolean} running
1550
+ */
1551
+ runCatalogLoader(running) {
1552
+ wasm.runtime_runCatalogLoader(this.__wbg_ptr, running);
1553
+ }
1554
+ /**
1555
+ * The statistics of the writes by key, of a workbook or of all keys, ordered by key. They change with every write
1556
+ * and are no slice: a view of them reads them when it shows them.
1557
+ * @param {string | null} [workbook_id]
1558
+ * @returns {StorageKeyStatistics[]}
1559
+ */
1560
+ storageStatistics(workbook_id) {
1561
+ var ptr0 = isLikeNone(workbook_id) ? 0 : passStringToWasm0(workbook_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1562
+ var len0 = WASM_VECTOR_LEN;
1563
+ const ret = wasm.runtime_storageStatistics(this.__wbg_ptr, ptr0, len0);
1564
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1565
+ return takeFromExternrefTable0(ret[0]);
1566
+ }
1567
+ /**
1568
+ * The layout of the plans of the progress of the queries that start later, null for the default one
1569
+ * @param {ProfileLayoutView | null} [layout]
1570
+ */
1571
+ setProgressLayout(layout) {
1572
+ const ret = wasm.runtime_setProgressLayout(this.__wbg_ptr, isLikeNone(layout) ? 0 : addToExternrefTable0(layout));
1573
+ if (ret[1]) throw takeFromExternrefTable0(ret[0]);
1574
+ }
1575
+ /**
1576
+ * The text of the script with the functions of a connection, none once it is deleted
1577
+ * @param {string} connection_id
1578
+ * @returns {string | undefined}
1579
+ */
1580
+ functionScriptText(connection_id) {
1581
+ const ptr0 = passStringToWasm0(connection_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1582
+ const len0 = WASM_VECTOR_LEN;
1583
+ const ret = wasm.runtime_functionScriptText(this.__wbg_ptr, ptr0, len0);
1584
+ if (ret[3]) throw takeFromExternrefTable0(ret[2]);
1585
+ let v2;
1586
+ if (ret[0] !== 0) {
1587
+ v2 = getStringFromWasm0(ret[0], ret[1]).slice();
1588
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
1589
+ }
1590
+ return v2;
1591
+ }
1592
+ /**
1593
+ * Is the analysis of a script outdated, also by a change that the workbook missed?
1594
+ * @param {number} script_key
1595
+ * @returns {boolean}
1596
+ */
1597
+ isAnalysisOutdated(script_key) {
1598
+ return wasm.runtime_isAnalysisOutdated(this.__wbg_ptr, script_key) !== 0;
1599
+ }
1600
+ /**
1601
+ * Follow the progress of a query with the layout of a follower, none without structured progress. The structure
1602
+ * crosses only when its version differs from the one that the host holds.
1603
+ * @param {number} query_id
1604
+ * @param {QueryProgressFollower} follower
1605
+ * @param {QueryProfileKeys | null} [known]
1606
+ * @returns {QueryProfileProgressView | undefined}
1607
+ */
1608
+ followQueryProgress(query_id, follower, known) {
1609
+ _assertClass(follower, QueryProgressFollower);
1610
+ const ret = wasm.runtime_followQueryProgress(this.__wbg_ptr, query_id, follower.__wbg_ptr, isLikeNone(known) ? 0 : addToExternrefTable0(known));
1611
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1612
+ return takeFromExternrefTable0(ret[0]);
1613
+ }
1614
+ /**
1615
+ * Answer the question about a workbook that changed outside the app: `true` reloads it from disk, `false` keeps the
1616
+ * version of the app and writes it over the disk, `null` gives no answer, e.g. when the question failed. The
1617
+ * answer to an older question is ignored.
1618
+ * @param {string} workbook_id
1619
+ * @param {number} prompt
1620
+ * @param {boolean | null} [reload]
1621
+ */
1622
+ answerExternalChange(workbook_id, prompt, reload) {
1623
+ const ptr0 = passStringToWasm0(workbook_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1624
+ const len0 = WASM_VECTOR_LEN;
1625
+ wasm.runtime_answerExternalChange(this.__wbg_ptr, ptr0, len0, prompt, isLikeNone(reload) ? 16777215 : reload ? 1 : 0);
1626
+ }
1627
+ /**
1628
+ * Check the folders of workbooks that the platform keeps in folders of their own for changes outside the app, e.g.
1629
+ * when the window gets the focus. The checks run one at a time after the ones that are queued. A change of the
1630
+ * scripts asks the question of the `storage` view (`externalChanges`), see `answerExternalChange`.
1631
+ * @param {string[]} workbook_ids
1632
+ */
1633
+ checkWorkbookFolders(workbook_ids) {
1634
+ const ptr0 = passArrayJsValueToWasm0(workbook_ids, wasm.__wbindgen_malloc);
1635
+ const len0 = WASM_VECTOR_LEN;
1636
+ wasm.runtime_checkWorkbookFolders(this.__wbg_ptr, ptr0, len0);
1637
+ }
1638
+ /**
1639
+ * Does storage hold the scripts of a workbook as they are: the same files in the same order, on the same
1640
+ * connections, with the same texts?
1641
+ * @param {string} workbook_id
1642
+ * @param {StoredScriptView[]} scripts
1643
+ * @returns {boolean}
1644
+ */
1645
+ matchesStoredScripts(workbook_id, scripts) {
1646
+ const ptr0 = passStringToWasm0(workbook_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1647
+ const len0 = WASM_VECTOR_LEN;
1648
+ const ptr1 = passArrayJsValueToWasm0(scripts, wasm.__wbindgen_malloc);
1649
+ const len1 = WASM_VECTOR_LEN;
1650
+ const ret = wasm.runtime_matchesStoredScripts(this.__wbg_ptr, ptr0, len0, ptr1, len1);
1651
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1652
+ return ret[0] !== 0;
1653
+ }
1654
+ /**
1655
+ * Set up the connections of a workbook that the app opens and that need nothing of the user: the embedded Hyper
1656
+ * and the Hyper of a link once the tab holds its token. Every connection is considered once, the app calls it
1657
+ * again when the workbook or the tokens of the links change.
1658
+ * @param {string} workbook_id
1659
+ */
1660
+ setUpOpenedWorkbook(workbook_id) {
1661
+ const ptr0 = passStringToWasm0(workbook_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1662
+ const len0 = WASM_VECTOR_LEN;
1663
+ wasm.runtime_setUpOpenedWorkbook(this.__wbg_ptr, ptr0, len0);
1664
+ }
1665
+ /**
1666
+ * Discard the writes of keys and their failures, e.g. a write that failed because its workbook folder is gone. The
1667
+ * writes that waited for them run.
1668
+ * @param {string[]} keys
1669
+ */
1670
+ storageDiscardWrites(keys) {
1671
+ const ptr0 = passArrayJsValueToWasm0(keys, wasm.__wbindgen_malloc);
1672
+ const len0 = WASM_VECTOR_LEN;
1673
+ wasm.runtime_storageDiscardWrites(this.__wbg_ptr, ptr0, len0);
1674
+ }
1675
+ /**
1676
+ * Give the table parameters of a workbook to a session that is no script of it, e.g. the draft of the composer.
1677
+ * Returns whether the analysis of the session is outdated by them.
1678
+ * @param {string} workbook_id
1679
+ * @param {ScriptSession} session
1680
+ * @returns {boolean}
1681
+ */
1682
+ attachTableParameters(workbook_id, session) {
1683
+ const ptr0 = passStringToWasm0(workbook_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1684
+ const len0 = WASM_VECTOR_LEN;
1685
+ _assertClass(session, ScriptSession);
1686
+ const ret = wasm.runtime_attachTableParameters(this.__wbg_ptr, ptr0, len0, session.__wbg_ptr);
1687
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1688
+ return ret[0] !== 0;
1689
+ }
1690
+ /**
1691
+ * Log in to Salesforce with the params of the connector, without a connection, e.g. the login of the shell. The
1692
+ * names of the steps go to the listener (`LoginStep`, e.g. `REQUESTING_CORE_AUTH_TOKEN`), never a code or a token;
1693
+ * `cancelSetup` with the id stops the login. The outcome of a success has the tokens and the user.
1694
+ * @param {string} setup_id
1695
+ * @param {any} params
1696
+ * @param {SetupOptions | null | undefined} options
1697
+ * @param {((step: string) => void) | null} events
1698
+ * @returns {Promise<SetupOutcome>}
1699
+ */
1700
+ authenticateSalesforce(setup_id, params, options, events) {
1701
+ const ptr0 = passStringToWasm0(setup_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1702
+ const len0 = WASM_VECTOR_LEN;
1703
+ const ret = wasm.runtime_authenticateSalesforce(this.__wbg_ptr, ptr0, len0, params, isLikeNone(options) ? 0 : addToExternrefTable0(options), events);
1704
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1705
+ return takeFromExternrefTable0(ret[0]);
1706
+ }
1707
+ /**
1708
+ * Delete the files of a workbook that was refused a load and drop it from the list
1709
+ * @param {string} workbook_id
1710
+ * @returns {Promise<void>}
1711
+ */
1712
+ deleteInvalidWorkbook(workbook_id) {
1713
+ const ptr0 = passStringToWasm0(workbook_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1714
+ const len0 = WASM_VECTOR_LEN;
1715
+ return wasm.runtime_deleteInvalidWorkbook(this.__wbg_ptr, ptr0, len0);
1716
+ }
1717
+ /**
1718
+ * Bring the folder of a workbook that the platform keeps in a folder of its own (`storage.workbookFolder`) to the
1719
+ * current workbook format, e.g. the folder of a run of the command line tool before it reads the workbook id.
1720
+ * Resolves with the outcome (`current`, `migrated`, `missing`, `unsupported`, `newer`), null for a workbook of the
1721
+ * storage root. The restore migrates the folder of a workbook itself.
1722
+ * @param {string} workbook_id
1723
+ * @returns {Promise<'current' | 'migrated' | 'missing' | 'unsupported' | 'newer' | null>}
1724
+ */
1725
+ migrateWorkbookFolder(workbook_id) {
1726
+ const ptr0 = passStringToWasm0(workbook_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1727
+ const len0 = WASM_VECTOR_LEN;
1728
+ return wasm.runtime_migrateWorkbookFolder(this.__wbg_ptr, ptr0, len0);
1729
+ }
1730
+ /**
1731
+ * The recording of the progress of a query as JSON, none without structured progress
1732
+ * @param {number} query_id
1733
+ * @returns {string | undefined}
1734
+ */
1735
+ queryProgressRecording(query_id) {
1736
+ const ret = wasm.runtime_queryProgressRecording(this.__wbg_ptr, query_id);
1737
+ if (ret[3]) throw takeFromExternrefTable0(ret[2]);
1738
+ let v1;
1739
+ if (ret[0] !== 0) {
1740
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
1741
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
1742
+ }
1743
+ return v1;
1744
+ }
1745
+ /**
1746
+ * The params of a new connection of a connector, e.g. `{"trino": {...}}`
1747
+ * @param {ConnectorType} connector
1748
+ * @returns {Record<string, unknown>}
1749
+ */
1750
+ static defaultConnectionParams(connector) {
1751
+ const ret = wasm.runtime_defaultConnectionParams(connector);
1752
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1753
+ return takeFromExternrefTable0(ret[0]);
1754
+ }
1755
+ /**
1756
+ * The tokens of a connection as their JSON, e.g. for the settings of a connection that show them on request. The
1757
+ * views only summarize them. Null without the connection.
1758
+ * @param {string} connection_id
1759
+ * @returns {ConnectionSecrets | null}
1760
+ */
1761
+ revealConnectionSecrets(connection_id) {
1762
+ const ptr0 = passStringToWasm0(connection_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1763
+ const len0 = WASM_VECTOR_LEN;
1764
+ const ret = wasm.runtime_revealConnectionSecrets(this.__wbg_ptr, ptr0, len0);
1765
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1766
+ return takeFromExternrefTable0(ret[0]);
1767
+ }
1768
+ /**
1769
+ * Connection params without their secrets, as a link or a file shares them: the identity stays, the login hint only
1770
+ * `withLoginHint`, the raw form rows of a draft go. Params of an unknown connector stay as they are.
1771
+ * @param {Record<string, unknown>} params
1772
+ * @param {boolean} with_login_hint
1773
+ * @returns {Record<string, unknown>}
1774
+ */
1775
+ static sanitizeConnectionParams(params, with_login_hint) {
1776
+ const ret = wasm.runtime_sanitizeConnectionParams(params, with_login_hint);
1777
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1778
+ return takeFromExternrefTable0(ret[0]);
1779
+ }
1780
+ /**
1781
+ * The database that the catalog of a Salesforce connection names its relations with, also the alias of the Hyper
1782
+ * Cloud database of a Database.com connection
1783
+ * @returns {string}
1784
+ */
1785
+ static salesforceCatalogDatabase() {
1786
+ let deferred1_0;
1787
+ let deferred1_1;
1788
+ try {
1789
+ const ret = wasm.runtime_salesforceCatalogDatabase();
1790
+ deferred1_0 = ret[0];
1791
+ deferred1_1 = ret[1];
1792
+ return getStringFromWasm0(ret[0], ret[1]);
1793
+ } finally {
1794
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1795
+ }
1796
+ }
1797
+ /**
1798
+ * The login hint of connection params (the account username or login), null if there is none. Fails on params of
1799
+ * an unknown connector.
1800
+ * @param {Record<string, unknown>} params
1801
+ * @returns {string | undefined}
1802
+ */
1803
+ static connectionParamsLoginHint(params) {
1804
+ const ret = wasm.runtime_connectionParamsLoginHint(params);
1805
+ if (ret[3]) throw takeFromExternrefTable0(ret[2]);
1806
+ let v1;
1807
+ if (ret[0] !== 0) {
1808
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
1809
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
1810
+ }
1811
+ return v1;
1812
+ }
1813
+ /**
1814
+ * Do two connection params describe the same connection, ignoring everything that sharing strips? A shared
1815
+ * workbook carries the params without secrets and login hints, they still describe the connection of the full
1816
+ * params.
1817
+ * @param {Record<string, unknown>} left
1818
+ * @param {Record<string, unknown>} right
1819
+ * @returns {boolean}
1820
+ */
1821
+ static connectionParamsShareEqual(left, right) {
1822
+ return wasm.runtime_connectionParamsShareEqual(left, right) !== 0;
1823
+ }
1824
+ /**
1825
+ * The Hyper Cloud database of a Database.com connection that names none
1826
+ * @returns {string}
1827
+ */
1828
+ static hyperCloudDefaultDatabaseName() {
1829
+ let deferred1_0;
1830
+ let deferred1_1;
1831
+ try {
1832
+ const ret = wasm.runtime_hyperCloudDefaultDatabaseName();
1833
+ deferred1_0 = ret[0];
1834
+ deferred1_1 = ret[1];
1835
+ return getStringFromWasm0(ret[0], ret[1]);
1836
+ } finally {
1837
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1838
+ }
1839
+ }
1840
+ /**
1841
+ * Connection params without the raw form rows, they belong only to the local draft. Fails on params of an unknown
1842
+ * connector.
1843
+ * @param {Record<string, unknown>} params
1844
+ * @returns {Record<string, unknown>}
1845
+ */
1846
+ static connectionParamsWithoutDraftRows(params) {
1847
+ const ret = wasm.runtime_connectionParamsWithoutDraftRows(params);
1848
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1849
+ return takeFromExternrefTable0(ret[0]);
1850
+ }
1851
+ /**
1852
+ * The views of slices, see the declaration of `views` in `RuntimeViews`. A slice that is busy reads as `'busy'` and
1853
+ * moves with the next changes, the host keeps its previous view.
1854
+ * @param {string} kind
1855
+ * @param {any} ids
1856
+ * @param {any} known
1857
+ * @returns {any}
1858
+ */
1859
+ views(kind, ids, known) {
1860
+ const ptr0 = passStringToWasm0(kind, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1861
+ const len0 = WASM_VECTOR_LEN;
1862
+ const ret = wasm.runtime_views(this.__wbg_ptr, ptr0, len0, ids, known);
1863
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1864
+ return takeFromExternrefTable0(ret[0]);
1865
+ }
1866
+ /**
1867
+ * A runtime on a platform
1868
+ * @param {RuntimePlatform} platform
1869
+ * @returns {Runtime}
1870
+ */
1871
+ static create(platform) {
1872
+ const ret = wasm.runtime_create(platform);
1873
+ return Runtime.__wrap(ret);
1874
+ }
1875
+ /**
1876
+ * The host failed to project slices of a kind, e.g. a projection threw: they move with the next changes, also if
1877
+ * their views didn't change, and the host is told
1878
+ * @param {ViewKind} kind
1879
+ * @param {(string | number)[]} ids
1880
+ */
1881
+ resync(kind, ids) {
1882
+ const ptr0 = passStringToWasm0(kind, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1883
+ const len0 = WASM_VECTOR_LEN;
1884
+ const ret = wasm.runtime_resync(this.__wbg_ptr, ptr0, len0, ids);
1885
+ if (ret[1]) throw takeFromExternrefTable0(ret[0]);
1886
+ }
1887
+ /**
1888
+ * The catalog of a connection, shared with the connection and the scripts that analyze with it. The handle reads
1889
+ * only: the catalog changes through the runtime, which tells the scripts on it. None for an unknown connection.
1890
+ * The identity of the catalog is `catalogId` of the view of the connection.
1891
+ * @param {string} connection_id
1892
+ * @returns {Catalog | undefined}
1893
+ */
1894
+ catalog(connection_id) {
1895
+ const ptr0 = passStringToWasm0(connection_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1896
+ const len0 = WASM_VECTOR_LEN;
1897
+ const ret = wasm.runtime_catalog(this.__wbg_ptr, ptr0, len0);
1898
+ return ret === 0 ? void 0 : Catalog.__wrap(ret);
1899
+ }
1900
+ /**
1901
+ * Restore the connections of the app manifest and the workbooks of the workbook tree of the storage of the
1902
+ * platform. The runtime takes them, the writes after the restore go through its writer. The listener hears the
1903
+ * progress. Resolves with what was restored, the workbooks that were refused a load are in the list of the
1904
+ * workbooks.
1905
+ * @param {((progress: RestoreProgress) => void) | null} progress
1906
+ * @returns {Promise<RestoreOutcome>}
1907
+ */
1908
+ restore(progress) {
1909
+ const ret = wasm.runtime_restore(this.__wbg_ptr, progress);
1910
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1911
+ return takeFromExternrefTable0(ret[0]);
1912
+ }
1913
+ /**
1914
+ * Apply an action to a slice. Never throws: a malformed target or action and a refused action are failed outcomes,
1915
+ * logged as warnings.
1916
+ * @param {Target} target
1917
+ * @param {RuntimeAction} action
1918
+ * @returns {DispatchOutcome}
1919
+ */
1920
+ dispatch(target, action) {
1921
+ return wasm.runtime_dispatch(this.__wbg_ptr, target, action);
1922
+ }
1923
+ /**
1924
+ * Shut the runtime down, in this order: the runs stop, the catalog loader stops, the writes into the query result
1925
+ * cache and the pending writes of the storage finish, then the imports are dropped, the setups and the queries are
1926
+ * cancelled and the computations go, their runs cancelled and their tables released with the next changes.
1927
+ * Resolves once that is done; from then on the runtime calls the platform no more, a task that is still running
1928
+ * fails at its next call. The host takes the last changes and frees the runtime with `free()`.
1929
+ * @returns {Promise<void>}
1930
+ */
1931
+ shutdown() {
1932
+ return wasm.runtime_shutdown(this.__wbg_ptr);
1933
+ }
1934
+ /**
1935
+ * Stop the run of a workbook, the running statements are cancelled
1936
+ * @param {string} workbook_id
1937
+ */
1938
+ stopRun(workbook_id) {
1939
+ const ptr0 = passStringToWasm0(workbook_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1940
+ const len0 = WASM_VECTOR_LEN;
1941
+ wasm.runtime_stopRun(this.__wbg_ptr, ptr0, len0);
1942
+ }
1943
+ /**
1944
+ * Tests of the seam: call a function while a part of the state is borrowed, as a task of the runtime would hold it.
1945
+ * The function may take the changes and read the views. The parts: `workbook:<id>`, `connection:<id>` (its state),
1946
+ * `queries:<connection id>` (its history), `registry`, `workbooks`, `scriptIndex`, `computations`, `runs`,
1947
+ * `storage`.
1948
+ * @param {string} part
1949
+ * @param {Function} f
1950
+ * @returns {any}
1951
+ */
1952
+ testHold(part, f) {
1953
+ const ptr0 = passStringToWasm0(part, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1954
+ const len0 = WASM_VECTOR_LEN;
1955
+ const ret = wasm.runtime_testHold(this.__wbg_ptr, ptr0, len0, f);
1956
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1957
+ return takeFromExternrefTable0(ret[0]);
1958
+ }
1959
+ /**
1960
+ * Lease a connection for a session of the host, a later lease takes the connection over. Returns the lease that
1961
+ * `closeSession` takes.
1962
+ * @param {string} connection_id
1963
+ * @returns {number}
1964
+ */
1965
+ openSession(connection_id) {
1966
+ const ptr0 = passStringToWasm0(connection_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1967
+ const len0 = WASM_VECTOR_LEN;
1968
+ return wasm.runtime_openSession(this.__wbg_ptr, ptr0, len0) >>> 0;
1969
+ }
1970
+ /**
1971
+ * Close a session of the host: the latest lease of the connection resets it, its channel closes the session. The
1972
+ * runtime keeps the connection, a later session sets it up again. An earlier lease changes nothing.
1973
+ * @param {string} connection_id
1974
+ * @param {number} lease
1975
+ */
1976
+ closeSession(connection_id, lease) {
1977
+ const ptr0 = passStringToWasm0(connection_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1978
+ const len0 = WASM_VECTOR_LEN;
1979
+ wasm.runtime_closeSession(this.__wbg_ptr, ptr0, len0, lease);
1980
+ }
1981
+ /**
1982
+ * Resolve once the catalog of a connection settled: no update runs and every relation that statements touched is
1983
+ * answered, e.g. after a statement of the shell. Resolves after the timeout as well (10 s by default), and at once
1984
+ * for an unknown connection: a catalog that doesn't follow never fails a statement.
1985
+ * @param {string} connection_id
1986
+ * @param {number | null} [timeout_ms]
1987
+ * @returns {Promise<void>}
1988
+ */
1989
+ settleCatalog(connection_id, timeout_ms) {
1990
+ const ptr0 = passStringToWasm0(connection_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1991
+ const len0 = WASM_VECTOR_LEN;
1992
+ return wasm.runtime_settleCatalog(this.__wbg_ptr, ptr0, len0, !isLikeNone(timeout_ms), isLikeNone(timeout_ms) ? 0 : timeout_ms);
1993
+ }
1994
+ };
1995
+ if (Symbol.dispose) Runtime.prototype[Symbol.dispose] = Runtime.prototype.free;
1996
+ var ScriptFinalization = typeof FinalizationRegistry === "undefined" ? {
1997
+ register: () => {},
1998
+ unregister: () => {}
1999
+ } : new FinalizationRegistry((ptr) => wasm.__wbg_script_free(ptr >>> 0, 1));
2000
+ /**
2001
+ * A script (`dashql_script_*`)
2002
+ */
2003
+ var Script = class Script {
2004
+ static __wrap(ptr) {
2005
+ ptr = ptr >>> 0;
2006
+ const obj = Object.create(Script.prototype);
2007
+ obj.__wbg_ptr = ptr;
2008
+ ScriptFinalization.register(obj, obj.__wbg_ptr, obj);
2009
+ return obj;
2010
+ }
2011
+ __destroy_into_raw() {
2012
+ const ptr = this.__wbg_ptr;
2013
+ this.__wbg_ptr = 0;
2014
+ ScriptFinalization.unregister(this);
2015
+ return ptr;
2016
+ }
2017
+ free() {
2018
+ const ptr = this.__destroy_into_raw();
2019
+ wasm.__wbg_script_free(ptr, 0);
2020
+ }
2021
+ /**
2022
+ * The packed `ParsedScript`
2023
+ * @returns {Uint8Array}
2024
+ */
2025
+ getParsed() {
2026
+ const ret = wasm.script_getParsed(this.__wbg_ptr);
2027
+ if (ret[3]) throw takeFromExternrefTable0(ret[2]);
2028
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
2029
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
2030
+ return v1;
2031
+ }
2032
+ /**
2033
+ * Format the script into a new script of another catalog
2034
+ * @param {number} dialect
2035
+ * @param {number} mode
2036
+ * @param {number} max_width
2037
+ * @param {number} indentation_width
2038
+ * @param {boolean} debug_mode
2039
+ * @param {number} keyword_case
2040
+ * @param {boolean} parse_if_outdated
2041
+ * @param {Catalog} catalog
2042
+ * @returns {Script}
2043
+ */
2044
+ formatInto(dialect, mode, max_width, indentation_width, debug_mode, keyword_case, parse_if_outdated, catalog) {
2045
+ _assertClass(catalog, Catalog);
2046
+ const ret = wasm.script_formatInto(this.__wbg_ptr, dialect, mode, max_width, indentation_width, debug_mode, keyword_case, parse_if_outdated, catalog.__wbg_ptr);
2047
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
2048
+ return Script.__wrap(ret[0]);
2049
+ }
2050
+ /**
2051
+ * Move the cursor, returns the packed `ScriptCursor`
2052
+ * @param {number} offset
2053
+ * @returns {Uint8Array}
2054
+ */
2055
+ moveCursor(offset) {
2056
+ const ret = wasm.script_moveCursor(this.__wbg_ptr, offset);
2057
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
2058
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
2059
+ return v1;
2060
+ }
2061
+ /**
2062
+ * The packed `ScriptDiff` from this script to a target script
2063
+ * @param {Script} target
2064
+ * @returns {Uint8Array}
2065
+ */
2066
+ computeDiff(target) {
2067
+ _assertClass(target, Script);
2068
+ const ret = wasm.script_computeDiff(this.__wbg_ptr, target.__wbg_ptr);
2069
+ if (ret[3]) throw takeFromExternrefTable0(ret[2]);
2070
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
2071
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
2072
+ return v1;
2073
+ }
2074
+ /**
2075
+ * The packed `AnalyzedScript`
2076
+ * @returns {Uint8Array}
2077
+ */
2078
+ getAnalyzed() {
2079
+ const ret = wasm.script_getAnalyzed(this.__wbg_ptr);
2080
+ if (ret[3]) throw takeFromExternrefTable0(ret[2]);
2081
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
2082
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
2083
+ return v1;
2084
+ }
2085
+ /**
2086
+ * @param {string} text
2087
+ */
2088
+ replaceText(text) {
2089
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2090
+ const len0 = WASM_VECTOR_LEN;
2091
+ wasm.script_replaceText(this.__wbg_ptr, ptr0, len0);
2092
+ }
2093
+ /**
2094
+ * Compile the script into the packed `ScriptCompilationResult`
2095
+ * @param {number} dialect
2096
+ * @param {number} mode
2097
+ * @param {number} max_width
2098
+ * @param {number} indentation_width
2099
+ * @param {boolean} allow_extensions
2100
+ * @param {boolean} parse_if_outdated
2101
+ * @returns {Uint8Array}
2102
+ */
2103
+ compileQuery(dialect, mode, max_width, indentation_width, allow_extensions, parse_if_outdated) {
2104
+ const ret = wasm.script_compileQuery(this.__wbg_ptr, dialect, mode, max_width, indentation_width, allow_extensions, parse_if_outdated);
2105
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
2106
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
2107
+ return v1;
2108
+ }
2109
+ /**
2110
+ * The packed `ScriptStatistics`
2111
+ * @returns {Uint8Array}
2112
+ */
2113
+ getStatistics() {
2114
+ const ret = wasm.script_getStatistics(this.__wbg_ptr);
2115
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
2116
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
2117
+ return v1;
2118
+ }
2119
+ /**
2120
+ * Insert text at a code point offset
2121
+ * @param {number} offset
2122
+ * @param {string} text
2123
+ */
2124
+ insertTextAt(offset, text) {
2125
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2126
+ const len0 = WASM_VECTOR_LEN;
2127
+ wasm.script_insertTextAt(this.__wbg_ptr, offset, ptr0, len0);
2128
+ }
2129
+ /**
2130
+ * The annotation of a statement as JSON, `{"preamble": [...], "tags": [{"name": ..., "lines": [...]}]}`
2131
+ * @param {number} statement_id
2132
+ * @param {boolean} parse_if_outdated
2133
+ * @returns {string}
2134
+ */
2135
+ readAnnotation(statement_id, parse_if_outdated) {
2136
+ let deferred2_0;
2137
+ let deferred2_1;
2138
+ try {
2139
+ const ret = wasm.script_readAnnotation(this.__wbg_ptr, statement_id, parse_if_outdated);
2140
+ var ptr1 = ret[0];
2141
+ var len1 = ret[1];
2142
+ if (ret[3]) {
2143
+ ptr1 = 0;
2144
+ len1 = 0;
2145
+ throw takeFromExternrefTable0(ret[2]);
2146
+ }
2147
+ deferred2_0 = ptr1;
2148
+ deferred2_1 = len1;
2149
+ return getStringFromWasm0(ptr1, len1);
2150
+ } finally {
2151
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
2152
+ }
2153
+ }
2154
+ /**
2155
+ * @returns {number}
2156
+ */
2157
+ catalogEntryId() {
2158
+ return wasm.script_catalogEntryId(this.__wbg_ptr) >>> 0;
2159
+ }
2160
+ /**
2161
+ * Erase a code point range
2162
+ * @param {number} offset
2163
+ * @param {number} count
2164
+ */
2165
+ eraseTextRange(offset, count) {
2166
+ wasm.script_eraseTextRange(this.__wbg_ptr, offset, count);
2167
+ }
2168
+ /**
2169
+ * Visualize the terminal query with a Vega-Lite spec in the text of the script, returns the UTF-8 offset
2170
+ * and length of the written tag
2171
+ * @param {string} spec
2172
+ * @param {boolean} parse_if_outdated
2173
+ * @returns {Uint32Array}
2174
+ */
2175
+ rewriteVegaLite(spec, parse_if_outdated) {
2176
+ const ptr0 = passStringToWasm0(spec, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2177
+ const len0 = WASM_VECTOR_LEN;
2178
+ const ret = wasm.script_rewriteVegaLite(this.__wbg_ptr, ptr0, len0, parse_if_outdated);
2179
+ if (ret[3]) throw takeFromExternrefTable0(ret[2]);
2180
+ var v2 = getArrayU32FromWasm0(ret[0], ret[1]).slice();
2181
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
2182
+ return v2;
2183
+ }
2184
+ /**
2185
+ * Complete at the cursor, returns the packed `Completion`
2186
+ * @param {number} limit
2187
+ * @param {number} keyword_case
2188
+ * @returns {Uint8Array}
2189
+ */
2190
+ completeAtCursor(limit, keyword_case) {
2191
+ const ret = wasm.script_completeAtCursor(this.__wbg_ptr, limit, keyword_case);
2192
+ if (ret[3]) throw takeFromExternrefTable0(ret[2]);
2193
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
2194
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
2195
+ return v1;
2196
+ }
2197
+ /**
2198
+ * The first parsed statement without its separator or surrounding trivia
2199
+ * @param {boolean} parse_if_outdated
2200
+ * @returns {string}
2201
+ */
2202
+ getStatementText(parse_if_outdated) {
2203
+ let deferred2_0;
2204
+ let deferred2_1;
2205
+ try {
2206
+ const ret = wasm.script_getStatementText(this.__wbg_ptr, parse_if_outdated);
2207
+ var ptr1 = ret[0];
2208
+ var len1 = ret[1];
2209
+ if (ret[3]) {
2210
+ ptr1 = 0;
2211
+ len1 = 0;
2212
+ throw takeFromExternrefTable0(ret[2]);
2213
+ }
2214
+ deferred2_0 = ptr1;
2215
+ deferred2_1 = len1;
2216
+ return getStringFromWasm0(ptr1, len1);
2217
+ } finally {
2218
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
2219
+ }
2220
+ }
2221
+ /**
2222
+ * Replace the annotation of a statement, given as JSON like `readAnnotation` returns it. Returns the new
2223
+ * text, the script is not changed.
2224
+ * @param {number} statement_id
2225
+ * @param {string} annotation
2226
+ * @param {boolean} parse_if_outdated
2227
+ * @returns {string}
2228
+ */
2229
+ rewriteAnnotation(statement_id, annotation, parse_if_outdated) {
2230
+ let deferred3_0;
2231
+ let deferred3_1;
2232
+ try {
2233
+ const ptr0 = passStringToWasm0(annotation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2234
+ const len0 = WASM_VECTOR_LEN;
2235
+ const ret = wasm.script_rewriteAnnotation(this.__wbg_ptr, statement_id, ptr0, len0, parse_if_outdated);
2236
+ var ptr2 = ret[0];
2237
+ var len2 = ret[1];
2238
+ if (ret[3]) {
2239
+ ptr2 = 0;
2240
+ len2 = 0;
2241
+ throw takeFromExternrefTable0(ret[2]);
2242
+ }
2243
+ deferred3_0 = ptr2;
2244
+ deferred3_1 = len2;
2245
+ return getStringFromWasm0(ptr2, len2);
2246
+ } finally {
2247
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
2248
+ }
2249
+ }
2250
+ /**
2251
+ * Can formatting represent every node?
2252
+ * @param {number} dialect
2253
+ * @param {number} mode
2254
+ * @param {number} max_width
2255
+ * @param {number} indentation_width
2256
+ * @param {boolean} debug_mode
2257
+ * @param {boolean} parse_if_outdated
2258
+ * @returns {boolean}
2259
+ */
2260
+ isFullyFormattable(dialect, mode, max_width, indentation_width, debug_mode, parse_if_outdated) {
2261
+ const ret = wasm.script_isFullyFormattable(this.__wbg_ptr, dialect, mode, max_width, indentation_width, debug_mode, parse_if_outdated);
2262
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
2263
+ return ret[0] !== 0;
2264
+ }
2265
+ /**
2266
+ * The AST node ids that formatting cannot represent
2267
+ * @param {number} dialect
2268
+ * @param {number} mode
2269
+ * @param {number} max_width
2270
+ * @param {number} indentation_width
2271
+ * @param {boolean} debug_mode
2272
+ * @param {boolean} parse_if_outdated
2273
+ * @returns {Uint32Array}
2274
+ */
2275
+ getUnformattableNodes(dialect, mode, max_width, indentation_width, debug_mode, parse_if_outdated) {
2276
+ const ret = wasm.script_getUnformattableNodes(this.__wbg_ptr, dialect, mode, max_width, indentation_width, debug_mode, parse_if_outdated);
2277
+ if (ret[3]) throw takeFromExternrefTable0(ret[2]);
2278
+ var v1 = getArrayU32FromWasm0(ret[0], ret[1]).slice();
2279
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
2280
+ return v1;
2281
+ }
2282
+ /**
2283
+ * Does a statement of the parsed script start with a call in a namespace with client functions, even if it doesn't parse?
2284
+ * @returns {boolean}
2285
+ */
2286
+ startsClientFunctionCall() {
2287
+ return wasm.script_startsClientFunctionCall(this.__wbg_ptr) !== 0;
2288
+ }
2289
+ /**
2290
+ * @param {Catalog} catalog
2291
+ */
2292
+ constructor(catalog) {
2293
+ _assertClass(catalog, Catalog);
2294
+ const ret = wasm.script_new(catalog.__wbg_ptr);
2295
+ this.__wbg_ptr = ret >>> 0;
2296
+ ScriptFinalization.register(this, this.__wbg_ptr, this);
2297
+ return this;
2298
+ }
2299
+ parse() {
2300
+ wasm.script_parse(this.__wbg_ptr);
2301
+ }
2302
+ /**
2303
+ * Format the script into a new script of the catalog of this script
2304
+ * @param {number} dialect
2305
+ * @param {number} mode
2306
+ * @param {number} max_width
2307
+ * @param {number} indentation_width
2308
+ * @param {boolean} debug_mode
2309
+ * @param {number} keyword_case
2310
+ * @param {boolean} parse_if_outdated
2311
+ * @returns {Script}
2312
+ */
2313
+ format(dialect, mode, max_width, indentation_width, debug_mode, keyword_case, parse_if_outdated) {
2314
+ const ret = wasm.script_format(this.__wbg_ptr, dialect, mode, max_width, indentation_width, debug_mode, keyword_case, parse_if_outdated);
2315
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
2316
+ return Script.__wrap(ret[0]);
2317
+ }
2318
+ /**
2319
+ * @param {boolean} parse_if_outdated
2320
+ */
2321
+ analyze(parse_if_outdated) {
2322
+ const ret = wasm.script_analyze(this.__wbg_ptr, parse_if_outdated);
2323
+ if (ret[1]) throw takeFromExternrefTable0(ret[0]);
2324
+ }
2325
+ /**
2326
+ * The text, or a byte range of it
2327
+ * @param {number | null} [offset]
2328
+ * @param {number | null} [length]
2329
+ * @returns {string}
2330
+ */
2331
+ toString(offset, length) {
2332
+ let deferred1_0;
2333
+ let deferred1_1;
2334
+ try {
2335
+ const ret = wasm.script_toString(this.__wbg_ptr, isLikeNone(offset) ? 4294967297 : offset >>> 0, isLikeNone(length) ? 4294967297 : length >>> 0);
2336
+ deferred1_0 = ret[0];
2337
+ deferred1_1 = ret[1];
2338
+ return getStringFromWasm0(ret[0], ret[1]);
2339
+ } finally {
2340
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2341
+ }
2342
+ }
2343
+ };
2344
+ if (Symbol.dispose) Script.prototype[Symbol.dispose] = Script.prototype.free;
2345
+ var ScriptBatchFinalization = typeof FinalizationRegistry === "undefined" ? {
2346
+ register: () => {},
2347
+ unregister: () => {}
2348
+ } : new FinalizationRegistry((ptr) => wasm.__wbg_scriptbatch_free(ptr >>> 0, 1));
2349
+ /**
2350
+ * A batch of analyzed scripts for `Catalog::loadScripts`
2351
+ */
2352
+ var ScriptBatch = class {
2353
+ __destroy_into_raw() {
2354
+ const ptr = this.__wbg_ptr;
2355
+ this.__wbg_ptr = 0;
2356
+ ScriptBatchFinalization.unregister(this);
2357
+ return ptr;
2358
+ }
2359
+ free() {
2360
+ const ptr = this.__destroy_into_raw();
2361
+ wasm.__wbg_scriptbatch_free(ptr, 0);
2362
+ }
2363
+ /**
2364
+ * Add the analysis of a script in a `CatalogLayer`
2365
+ * @param {Script} script
2366
+ * @param {number} layer
2367
+ */
2368
+ add(script, layer) {
2369
+ _assertClass(script, Script);
2370
+ const ret = wasm.scriptbatch_add(this.__wbg_ptr, script.__wbg_ptr, layer);
2371
+ if (ret[1]) throw takeFromExternrefTable0(ret[0]);
2372
+ }
2373
+ constructor() {
2374
+ const ret = wasm.scriptbatch_new();
2375
+ this.__wbg_ptr = ret >>> 0;
2376
+ ScriptBatchFinalization.register(this, this.__wbg_ptr, this);
2377
+ return this;
2378
+ }
2379
+ };
2380
+ if (Symbol.dispose) ScriptBatch.prototype[Symbol.dispose] = ScriptBatch.prototype.free;
2381
+ var ScriptSessionFinalization = typeof FinalizationRegistry === "undefined" ? {
2382
+ register: () => {},
2383
+ unregister: () => {}
2384
+ } : new FinalizationRegistry((ptr) => wasm.__wbg_scriptsession_free(ptr >>> 0, 1));
2385
+ /**
2386
+ * An editor session (`dashql_script_session_*`). Shared, so that session lists can refer to it.
2387
+ */
2388
+ var ScriptSession = class ScriptSession {
2389
+ static __wrap(ptr) {
2390
+ ptr = ptr >>> 0;
2391
+ const obj = Object.create(ScriptSession.prototype);
2392
+ obj.__wbg_ptr = ptr;
2393
+ ScriptSessionFinalization.register(obj, obj.__wbg_ptr, obj);
2394
+ return obj;
2395
+ }
2396
+ __destroy_into_raw() {
2397
+ const ptr = this.__wbg_ptr;
2398
+ this.__wbg_ptr = 0;
2399
+ ScriptSessionFinalization.unregister(this);
2400
+ return ptr;
2401
+ }
2402
+ free() {
2403
+ const ptr = this.__destroy_into_raw();
2404
+ wasm.__wbg_scriptsession_free(ptr, 0);
2405
+ }
2406
+ /**
2407
+ * Format the script into a new script of another catalog
2408
+ * @param {number} dialect
2409
+ * @param {number} mode
2410
+ * @param {number} max_width
2411
+ * @param {number} indentation_width
2412
+ * @param {boolean} debug_mode
2413
+ * @param {number} keyword_case
2414
+ * @param {boolean} parse_if_outdated
2415
+ * @param {Catalog} catalog
2416
+ * @returns {Script}
2417
+ */
2418
+ formatInto(dialect, mode, max_width, indentation_width, debug_mode, keyword_case, parse_if_outdated, catalog) {
2419
+ _assertClass(catalog, Catalog);
2420
+ const ret = wasm.scriptsession_formatInto(this.__wbg_ptr, dialect, mode, max_width, indentation_width, debug_mode, keyword_case, parse_if_outdated, catalog.__wbg_ptr);
2421
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
2422
+ return Script.__wrap(ret[0]);
2423
+ }
2424
+ /**
2425
+ * The packed `ScriptDiff` from the session script to a target script
2426
+ * @param {Script} target
2427
+ * @returns {Uint8Array}
2428
+ */
2429
+ computeDiff(target) {
2430
+ _assertClass(target, Script);
2431
+ const ret = wasm.scriptsession_computeDiff(this.__wbg_ptr, target.__wbg_ptr);
2432
+ if (ret[3]) throw takeFromExternrefTable0(ret[2]);
2433
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
2434
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
2435
+ return v1;
2436
+ }
2437
+ /**
2438
+ * Replace the text, returns the packed `EditorUpdate`
2439
+ * @param {bigint} expected_text_version
2440
+ * @param {string} text
2441
+ * @returns {Uint8Array}
2442
+ */
2443
+ replaceText(expected_text_version, text) {
2444
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2445
+ const len0 = WASM_VECTOR_LEN;
2446
+ const ret = wasm.scriptsession_replaceText(this.__wbg_ptr, expected_text_version, ptr0, len0);
2447
+ var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
2448
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
2449
+ return v2;
2450
+ }
2451
+ /**
2452
+ * @returns {bigint}
2453
+ */
2454
+ textVersion() {
2455
+ const ret = wasm.scriptsession_textVersion(this.__wbg_ptr);
2456
+ return BigInt.asUintN(64, ret);
2457
+ }
2458
+ /**
2459
+ * Compile the script, returns the packed `ScriptCompilationResult`
2460
+ * @param {number} dialect
2461
+ * @param {number} mode
2462
+ * @param {number} max_width
2463
+ * @param {number} indentation_width
2464
+ * @param {boolean} allow_extensions
2465
+ * @param {boolean} parse_if_outdated
2466
+ * @returns {Uint8Array}
2467
+ */
2468
+ compileQuery(dialect, mode, max_width, indentation_width, allow_extensions, parse_if_outdated) {
2469
+ const ret = wasm.scriptsession_compileQuery(this.__wbg_ptr, dialect, mode, max_width, indentation_width, allow_extensions, parse_if_outdated);
2470
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
2471
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
2472
+ return v1;
2473
+ }
2474
+ /**
2475
+ * A session whose script takes an entry id that the catalogs of the module allocated before
2476
+ * @param {Catalog} catalog
2477
+ * @param {number} offset_unit
2478
+ * @param {number} entry_id
2479
+ * @returns {ScriptSession}
2480
+ */
2481
+ static withEntryId(catalog, offset_unit, entry_id) {
2482
+ _assertClass(catalog, Catalog);
2483
+ const ret = wasm.scriptsession_withEntryId(catalog.__wbg_ptr, offset_unit, entry_id);
2484
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
2485
+ return ScriptSession.__wrap(ret[0]);
2486
+ }
2487
+ /**
2488
+ * @returns {bigint}
2489
+ */
2490
+ stateRevision() {
2491
+ const ret = wasm.scriptsession_stateRevision(this.__wbg_ptr);
2492
+ return BigInt.asUintN(64, ret);
2493
+ }
2494
+ /**
2495
+ * The annotation of a statement as JSON, like `Script.readAnnotation`
2496
+ * @param {number} statement_id
2497
+ * @param {boolean} parse_if_outdated
2498
+ * @returns {string}
2499
+ */
2500
+ readAnnotation(statement_id, parse_if_outdated) {
2501
+ let deferred2_0;
2502
+ let deferred2_1;
2503
+ try {
2504
+ const ret = wasm.scriptsession_readAnnotation(this.__wbg_ptr, statement_id, parse_if_outdated);
2505
+ var ptr1 = ret[0];
2506
+ var len1 = ret[1];
2507
+ if (ret[3]) {
2508
+ ptr1 = 0;
2509
+ len1 = 0;
2510
+ throw takeFromExternrefTable0(ret[2]);
2511
+ }
2512
+ deferred2_0 = ptr1;
2513
+ deferred2_1 = len1;
2514
+ return getStringFromWasm0(ptr1, len1);
2515
+ } finally {
2516
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
2517
+ }
2518
+ }
2519
+ /**
2520
+ * Remove the `@flow` tag of the script. Returns the new text.
2521
+ * @param {boolean} parse_if_outdated
2522
+ * @returns {string}
2523
+ */
2524
+ removeVisFlow(parse_if_outdated) {
2525
+ let deferred2_0;
2526
+ let deferred2_1;
2527
+ try {
2528
+ const ret = wasm.scriptsession_removeVisFlow(this.__wbg_ptr, parse_if_outdated);
2529
+ var ptr1 = ret[0];
2530
+ var len1 = ret[1];
2531
+ if (ret[3]) {
2532
+ ptr1 = 0;
2533
+ len1 = 0;
2534
+ throw takeFromExternrefTable0(ret[2]);
2535
+ }
2536
+ deferred2_0 = ptr1;
2537
+ deferred2_1 = len1;
2538
+ return getStringFromWasm0(ptr1, len1);
2539
+ } finally {
2540
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
2541
+ }
2542
+ }
2543
+ /**
2544
+ * @returns {number}
2545
+ */
2546
+ catalogEntryId() {
2547
+ return wasm.scriptsession_catalogEntryId(this.__wbg_ptr) >>> 0;
2548
+ }
2549
+ /**
2550
+ * @returns {bigint}
2551
+ */
2552
+ catalogRevision() {
2553
+ const ret = wasm.scriptsession_catalogRevision(this.__wbg_ptr);
2554
+ return BigInt.asUintN(64, ret);
2555
+ }
2556
+ /**
2557
+ * Remove the `@param` tags of an input of the script. Returns the new text.
2558
+ * @param {string} name
2559
+ * @param {boolean} parse_if_outdated
2560
+ * @returns {string}
2561
+ */
2562
+ removeParamTag(name, parse_if_outdated) {
2563
+ let deferred3_0;
2564
+ let deferred3_1;
2565
+ try {
2566
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2567
+ const len0 = WASM_VECTOR_LEN;
2568
+ const ret = wasm.scriptsession_removeParamTag(this.__wbg_ptr, ptr0, len0, parse_if_outdated);
2569
+ var ptr2 = ret[0];
2570
+ var len2 = ret[1];
2571
+ if (ret[3]) {
2572
+ ptr2 = 0;
2573
+ len2 = 0;
2574
+ throw takeFromExternrefTable0(ret[2]);
2575
+ }
2576
+ deferred3_0 = ptr2;
2577
+ deferred3_1 = len2;
2578
+ return getStringFromWasm0(ptr2, len2);
2579
+ } finally {
2580
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
2581
+ }
2582
+ }
2583
+ /**
2584
+ * Set the `@flow` tag of the script, its placement on the dataflow canvas: the position if both coordinates are
2585
+ * given, the width of the box and the height of its chart if given. Returns the new text.
2586
+ * @param {number | null | undefined} x
2587
+ * @param {number | null | undefined} y
2588
+ * @param {number | null | undefined} width
2589
+ * @param {number | null | undefined} height
2590
+ * @param {boolean} parse_if_outdated
2591
+ * @returns {string}
2592
+ */
2593
+ rewriteVisFlow(x, y, width, height, parse_if_outdated) {
2594
+ let deferred2_0;
2595
+ let deferred2_1;
2596
+ try {
2597
+ const ret = wasm.scriptsession_rewriteVisFlow(this.__wbg_ptr, isLikeNone(x) ? 4294967297 : x >> 0, isLikeNone(y) ? 4294967297 : y >> 0, isLikeNone(width) ? 4294967297 : width >> 0, isLikeNone(height) ? 4294967297 : height >> 0, parse_if_outdated);
2598
+ var ptr1 = ret[0];
2599
+ var len1 = ret[1];
2600
+ if (ret[3]) {
2601
+ ptr1 = 0;
2602
+ len1 = 0;
2603
+ throw takeFromExternrefTable0(ret[2]);
2604
+ }
2605
+ deferred2_0 = ptr1;
2606
+ deferred2_1 = len1;
2607
+ return getStringFromWasm0(ptr1, len1);
2608
+ } finally {
2609
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
2610
+ }
2611
+ }
2612
+ dropFromCatalog() {
2613
+ const ret = wasm.scriptsession_dropFromCatalog(this.__wbg_ptr);
2614
+ if (ret[1]) throw takeFromExternrefTable0(ret[0]);
2615
+ }
2616
+ /**
2617
+ * Publish the analysis into the session layer of the catalog
2618
+ */
2619
+ loadIntoCatalog() {
2620
+ const ret = wasm.scriptsession_loadIntoCatalog(this.__wbg_ptr);
2621
+ if (ret[1]) throw takeFromExternrefTable0(ret[0]);
2622
+ }
2623
+ /**
2624
+ * Set the `@param` tag of an input of the script, its value. Returns the new text.
2625
+ * @param {string} name
2626
+ * @param {string} value
2627
+ * @param {boolean} parse_if_outdated
2628
+ * @returns {string}
2629
+ */
2630
+ rewriteParamTag(name, value, parse_if_outdated) {
2631
+ let deferred4_0;
2632
+ let deferred4_1;
2633
+ try {
2634
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2635
+ const len0 = WASM_VECTOR_LEN;
2636
+ const ptr1 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2637
+ const len1 = WASM_VECTOR_LEN;
2638
+ const ret = wasm.scriptsession_rewriteParamTag(this.__wbg_ptr, ptr0, len0, ptr1, len1, parse_if_outdated);
2639
+ var ptr3 = ret[0];
2640
+ var len3 = ret[1];
2641
+ if (ret[3]) {
2642
+ ptr3 = 0;
2643
+ len3 = 0;
2644
+ throw takeFromExternrefTable0(ret[2]);
2645
+ }
2646
+ deferred4_0 = ptr3;
2647
+ deferred4_1 = len3;
2648
+ return getStringFromWasm0(ptr3, len3);
2649
+ } finally {
2650
+ wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
2651
+ }
2652
+ }
2653
+ /**
2654
+ * Set the `@board` tag of a query, negative rows and columns are absent. Returns the new text.
2655
+ * @param {number} statement_id
2656
+ * @param {number} row
2657
+ * @param {number} column
2658
+ * @param {number} width
2659
+ * @param {number} height
2660
+ * @param {boolean} parse_if_outdated
2661
+ * @returns {string}
2662
+ */
2663
+ rewriteVisBoard(statement_id, row, column, width, height, parse_if_outdated) {
2664
+ let deferred2_0;
2665
+ let deferred2_1;
2666
+ try {
2667
+ const ret = wasm.scriptsession_rewriteVisBoard(this.__wbg_ptr, statement_id, row, column, width, height, parse_if_outdated);
2668
+ var ptr1 = ret[0];
2669
+ var len1 = ret[1];
2670
+ if (ret[3]) {
2671
+ ptr1 = 0;
2672
+ len1 = 0;
2673
+ throw takeFromExternrefTable0(ret[2]);
2674
+ }
2675
+ deferred2_0 = ptr1;
2676
+ deferred2_1 = len1;
2677
+ return getStringFromWasm0(ptr1, len1);
2678
+ } finally {
2679
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
2680
+ }
2681
+ }
2682
+ /**
2683
+ * Complete at the primary cursor, returns the packed `Completion`
2684
+ * @param {number} limit
2685
+ * @param {number} keyword_case
2686
+ * @returns {Uint8Array}
2687
+ */
2688
+ completeAtCursor(limit, keyword_case) {
2689
+ const ret = wasm.scriptsession_completeAtCursor(this.__wbg_ptr, limit, keyword_case);
2690
+ if (ret[3]) throw takeFromExternrefTable0(ret[2]);
2691
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
2692
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
2693
+ return v1;
2694
+ }
2695
+ /**
2696
+ * Replace the annotation of a statement, given as JSON. Returns the new text.
2697
+ * @param {number} statement_id
2698
+ * @param {string} annotation
2699
+ * @param {boolean} parse_if_outdated
2700
+ * @returns {string}
2701
+ */
2702
+ rewriteAnnotation(statement_id, annotation, parse_if_outdated) {
2703
+ let deferred3_0;
2704
+ let deferred3_1;
2705
+ try {
2706
+ const ptr0 = passStringToWasm0(annotation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2707
+ const len0 = WASM_VECTOR_LEN;
2708
+ const ret = wasm.scriptsession_rewriteAnnotation(this.__wbg_ptr, statement_id, ptr0, len0, parse_if_outdated);
2709
+ var ptr2 = ret[0];
2710
+ var len2 = ret[1];
2711
+ if (ret[3]) {
2712
+ ptr2 = 0;
2713
+ len2 = 0;
2714
+ throw takeFromExternrefTable0(ret[2]);
2715
+ }
2716
+ deferred3_0 = ptr2;
2717
+ deferred3_1 = len2;
2718
+ return getStringFromWasm0(ptr2, len2);
2719
+ } finally {
2720
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
2721
+ }
2722
+ }
2723
+ /**
2724
+ * Move the primary cursor, returns the packed `EditorUpdate`
2725
+ * @param {bigint} expected_text_version
2726
+ * @param {bigint} offset
2727
+ * @returns {Uint8Array}
2728
+ */
2729
+ setPrimaryCursor(expected_text_version, offset) {
2730
+ const ret = wasm.scriptsession_setPrimaryCursor(this.__wbg_ptr, expected_text_version, offset);
2731
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
2732
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
2733
+ return v1;
2734
+ }
2735
+ /**
2736
+ * Can formatting represent every node?
2737
+ * @param {number} dialect
2738
+ * @param {number} mode
2739
+ * @param {number} max_width
2740
+ * @param {number} indentation_width
2741
+ * @param {boolean} debug_mode
2742
+ * @param {boolean} parse_if_outdated
2743
+ * @returns {boolean}
2744
+ */
2745
+ isFullyFormattable(dialect, mode, max_width, indentation_width, debug_mode, parse_if_outdated) {
2746
+ const ret = wasm.scriptsession_isFullyFormattable(this.__wbg_ptr, dialect, mode, max_width, indentation_width, debug_mode, parse_if_outdated);
2747
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
2748
+ return ret[0] !== 0;
2749
+ }
2750
+ /**
2751
+ * Set the renderer tag of a query (`vegalite` with a JSON object, `markdown` with a template or
2752
+ * `table`), an empty kind removes it. Returns the new text.
2753
+ * @param {number} statement_id
2754
+ * @param {string} kind
2755
+ * @param {string} body
2756
+ * @param {boolean} parse_if_outdated
2757
+ * @returns {string}
2758
+ */
2759
+ rewriteVisRenderer(statement_id, kind, body, parse_if_outdated) {
2760
+ let deferred4_0;
2761
+ let deferred4_1;
2762
+ try {
2763
+ const ptr0 = passStringToWasm0(kind, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2764
+ const len0 = WASM_VECTOR_LEN;
2765
+ const ptr1 = passStringToWasm0(body, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2766
+ const len1 = WASM_VECTOR_LEN;
2767
+ const ret = wasm.scriptsession_rewriteVisRenderer(this.__wbg_ptr, statement_id, ptr0, len0, ptr1, len1, parse_if_outdated);
2768
+ var ptr3 = ret[0];
2769
+ var len3 = ret[1];
2770
+ if (ret[3]) {
2771
+ ptr3 = 0;
2772
+ len3 = 0;
2773
+ throw takeFromExternrefTable0(ret[2]);
2774
+ }
2775
+ deferred4_0 = ptr3;
2776
+ deferred4_1 = len3;
2777
+ return getStringFromWasm0(ptr3, len3);
2778
+ } finally {
2779
+ wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
2780
+ }
2781
+ }
2782
+ /**
2783
+ * The named table parameters of the analysis that reference scripts, with the script that each finds among
2784
+ * `names`: triples of the offset, the length and the script index (u32::MAX if none), in the offset unit
2785
+ * @param {string[]} names
2786
+ * @returns {Uint32Array}
2787
+ */
2788
+ findScriptReferences(names) {
2789
+ const ptr0 = passArrayJsValueToWasm0(names, wasm.__wbindgen_malloc);
2790
+ const len0 = WASM_VECTOR_LEN;
2791
+ const ret = wasm.scriptsession_findScriptReferences(this.__wbg_ptr, ptr0, len0);
2792
+ var v2 = getArrayU32FromWasm0(ret[0], ret[1]).slice();
2793
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
2794
+ return v2;
2795
+ }
2796
+ /**
2797
+ * @param {Catalog} catalog
2798
+ * @param {number} offset_unit
2799
+ */
2800
+ constructor(catalog, offset_unit) {
2801
+ _assertClass(catalog, Catalog);
2802
+ const ret = wasm.scriptsession_new(catalog.__wbg_ptr, offset_unit);
2803
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
2804
+ this.__wbg_ptr = ret[0] >>> 0;
2805
+ ScriptSessionFinalization.register(this, this.__wbg_ptr, this);
2806
+ return this;
2807
+ }
2808
+ /**
2809
+ * @returns {string}
2810
+ */
2811
+ text() {
2812
+ let deferred1_0;
2813
+ let deferred1_1;
2814
+ try {
2815
+ const ret = wasm.scriptsession_text(this.__wbg_ptr);
2816
+ deferred1_0 = ret[0];
2817
+ deferred1_1 = ret[1];
2818
+ return getStringFromWasm0(ret[0], ret[1]);
2819
+ } finally {
2820
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2821
+ }
2822
+ }
2823
+ /**
2824
+ * Apply a packed `EditorEvent`, returns the packed `EditorUpdate`
2825
+ * @param {Uint8Array} event
2826
+ * @returns {Uint8Array}
2827
+ */
2828
+ apply(event) {
2829
+ const ptr0 = passArray8ToWasm0(event, wasm.__wbindgen_malloc);
2830
+ const len0 = WASM_VECTOR_LEN;
2831
+ const ret = wasm.scriptsession_apply(this.__wbg_ptr, ptr0, len0);
2832
+ var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
2833
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
2834
+ return v2;
2835
+ }
2836
+ /**
2837
+ * Format the script into a new script of the session catalog
2838
+ * @param {number} dialect
2839
+ * @param {number} mode
2840
+ * @param {number} max_width
2841
+ * @param {number} indentation_width
2842
+ * @param {boolean} debug_mode
2843
+ * @param {number} keyword_case
2844
+ * @param {boolean} parse_if_outdated
2845
+ * @returns {Script}
2846
+ */
2847
+ format(dialect, mode, max_width, indentation_width, debug_mode, keyword_case, parse_if_outdated) {
2848
+ const ret = wasm.scriptsession_format(this.__wbg_ptr, dialect, mode, max_width, indentation_width, debug_mode, keyword_case, parse_if_outdated);
2849
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
2850
+ return Script.__wrap(ret[0]);
2851
+ }
2852
+ /**
2853
+ * Analyze, returns the packed `EditorUpdate`
2854
+ * @returns {Uint8Array}
2855
+ */
2856
+ analyze() {
2857
+ const ret = wasm.scriptsession_analyze(this.__wbg_ptr);
2858
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
2859
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
2860
+ return v1;
2861
+ }
2862
+ };
2863
+ if (Symbol.dispose) ScriptSession.prototype[Symbol.dispose] = ScriptSession.prototype.free;
2864
+ var SessionPlanRequestFinalization = typeof FinalizationRegistry === "undefined" ? {
2865
+ register: () => {},
2866
+ unregister: () => {}
2867
+ } : new FinalizationRegistry((ptr) => wasm.__wbg_sessionplanrequest_free(ptr >>> 0, 1));
2868
+ /**
2869
+ * A request to plan the scripts of a session across connections (`planner::SessionPlanRequest`)
2870
+ */
2871
+ var SessionPlanRequest = class {
2872
+ __destroy_into_raw() {
2873
+ const ptr = this.__wbg_ptr;
2874
+ this.__wbg_ptr = 0;
2875
+ SessionPlanRequestFinalization.unregister(this);
2876
+ return ptr;
2877
+ }
2878
+ free() {
2879
+ const ptr = this.__destroy_into_raw();
2880
+ wasm.__wbg_sessionplanrequest_free(ptr, 0);
2881
+ }
2882
+ /**
2883
+ * Add a script in session order, returns its index. A materialized result of the script is written to
2884
+ * `materialization_file` below the mount prefix, `s<index>.parquet` if absent.
2885
+ * @param {string} name
2886
+ * @param {number} connection
2887
+ * @param {ScriptSession} session
2888
+ * @param {string | null} [materialization_file]
2889
+ * @returns {number}
2890
+ */
2891
+ addScript(name, connection, session, materialization_file) {
2892
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2893
+ const len0 = WASM_VECTOR_LEN;
2894
+ _assertClass(session, ScriptSession);
2895
+ var ptr1 = isLikeNone(materialization_file) ? 0 : passStringToWasm0(materialization_file, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2896
+ var len1 = WASM_VECTOR_LEN;
2897
+ return wasm.sessionplanrequest_addScript(this.__wbg_ptr, ptr0, len0, connection, session.__wbg_ptr, ptr1, len1) >>> 0;
2898
+ }
2899
+ /**
2900
+ * Plan the target scripts and what they need instead of the whole session
2901
+ * @param {Uint32Array} targets
2902
+ */
2903
+ setTargets(targets) {
2904
+ const ptr0 = passArray32ToWasm0(targets, wasm.__wbindgen_malloc);
2905
+ const len0 = WASM_VECTOR_LEN;
2906
+ wasm.sessionplanrequest_setTargets(this.__wbg_ptr, ptr0, len0);
2907
+ }
2908
+ /**
2909
+ * Add an attachment, a Parquet file of the session that the table parameter `:name` reads, returns its index. The
2910
+ * stamp changes when the file changes, e.g. its size and modification time. The columns are absent if the host
2911
+ * didn't read them yet.
2912
+ * @param {string} name
2913
+ * @param {string} file
2914
+ * @param {string} stamp
2915
+ * @param {string[] | null} [columns]
2916
+ * @returns {number}
2917
+ */
2918
+ addAttachment(name, file, stamp, columns) {
2919
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2920
+ const len0 = WASM_VECTOR_LEN;
2921
+ const ptr1 = passStringToWasm0(file, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2922
+ const len1 = WASM_VECTOR_LEN;
2923
+ const ptr2 = passStringToWasm0(stamp, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2924
+ const len2 = WASM_VECTOR_LEN;
2925
+ var ptr3 = isLikeNone(columns) ? 0 : passArrayJsValueToWasm0(columns, wasm.__wbindgen_malloc);
2926
+ var len3 = WASM_VECTOR_LEN;
2927
+ return wasm.sessionplanrequest_addAttachment(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3) >>> 0;
2928
+ }
2929
+ /**
2930
+ * Add a connection, returns its index
2931
+ * @param {string} id
2932
+ * @param {boolean} local
2933
+ * @param {Catalog} catalog
2934
+ * @param {number} dialect
2935
+ * @param {string} default_database
2936
+ * @param {string} default_schema
2937
+ * @returns {number}
2938
+ */
2939
+ addConnection(id, local, catalog, dialect, default_database, default_schema) {
2940
+ const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2941
+ const len0 = WASM_VECTOR_LEN;
2942
+ _assertClass(catalog, Catalog);
2943
+ const ptr1 = passStringToWasm0(default_database, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2944
+ const len1 = WASM_VECTOR_LEN;
2945
+ const ptr2 = passStringToWasm0(default_schema, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2946
+ const len2 = WASM_VECTOR_LEN;
2947
+ return wasm.sessionplanrequest_addConnection(this.__wbg_ptr, ptr0, len0, local, catalog.__wbg_ptr, dialect, ptr1, len1, ptr2, len2) >>> 0;
2948
+ }
2949
+ /**
2950
+ * The scripts whose materialized results the host provides
2951
+ * @param {Uint32Array} materialized
2952
+ */
2953
+ setMaterialized(materialized) {
2954
+ const ptr0 = passArray32ToWasm0(materialized, wasm.__wbindgen_malloc);
2955
+ const len0 = WASM_VECTOR_LEN;
2956
+ wasm.sessionplanrequest_setMaterialized(this.__wbg_ptr, ptr0, len0);
2957
+ }
2958
+ /**
2959
+ * The directory the host mounts materialized results in
2960
+ * @param {string} prefix
2961
+ */
2962
+ setMountPrefix(prefix) {
2963
+ const ptr0 = passStringToWasm0(prefix, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2964
+ const len0 = WASM_VECTOR_LEN;
2965
+ wasm.sessionplanrequest_setMountPrefix(this.__wbg_ptr, ptr0, len0);
2966
+ }
2967
+ /**
2968
+ * The directory the host mounts the attachments in
2969
+ * @param {string} prefix
2970
+ */
2971
+ setAttachmentPrefix(prefix) {
2972
+ const ptr0 = passStringToWasm0(prefix, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2973
+ const len0 = WASM_VECTOR_LEN;
2974
+ wasm.sessionplanrequest_setAttachmentPrefix(this.__wbg_ptr, ptr0, len0);
2975
+ }
2976
+ constructor() {
2977
+ const ret = wasm.sessionplanrequest_new();
2978
+ this.__wbg_ptr = ret >>> 0;
2979
+ SessionPlanRequestFinalization.register(this, this.__wbg_ptr, this);
2980
+ return this;
2981
+ }
2982
+ };
2983
+ if (Symbol.dispose) SessionPlanRequest.prototype[Symbol.dispose] = SessionPlanRequest.prototype.free;
2984
+ var ShellFinalization = typeof FinalizationRegistry === "undefined" ? {
2985
+ register: () => {},
2986
+ unregister: () => {}
2987
+ } : new FinalizationRegistry((ptr) => wasm.__wbg_shell_free(ptr >>> 0, 1));
2988
+ /**
2989
+ * A shell session on a catalog
2990
+ */
2991
+ var Shell = class {
2992
+ __destroy_into_raw() {
2993
+ const ptr = this.__wbg_ptr;
2994
+ this.__wbg_ptr = 0;
2995
+ ShellFinalization.unregister(this);
2996
+ return ptr;
2997
+ }
2998
+ free() {
2999
+ const ptr = this.__destroy_into_raw();
3000
+ wasm.__wbg_shell_free(ptr, 0);
3001
+ }
3002
+ /**
3003
+ * @param {string} text
3004
+ * @returns {ShellPromptResult}
3005
+ */
3006
+ setPrompt(text) {
3007
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3008
+ const len0 = WASM_VECTOR_LEN;
3009
+ const ret = wasm.shell_setPrompt(this.__wbg_ptr, ptr0, len0);
3010
+ return ShellPromptResult.__wrap(ret);
3011
+ }
3012
+ /**
3013
+ * @param {string} query
3014
+ * @returns {ShellOperation}
3015
+ */
3016
+ startQuery(query) {
3017
+ const ptr0 = passStringToWasm0(query, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3018
+ const len0 = WASM_VECTOR_LEN;
3019
+ const ret = wasm.shell_startQuery(this.__wbg_ptr, ptr0, len0);
3020
+ return ShellOperation.__wrap(ret);
3021
+ }
3022
+ /**
3023
+ * Register dot commands, one name per line, returns the status
3024
+ * @param {string} commands
3025
+ * @returns {number}
3026
+ */
3027
+ setCommands(commands) {
3028
+ const ptr0 = passStringToWasm0(commands, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3029
+ const len0 = WASM_VECTOR_LEN;
3030
+ return wasm.shell_setCommands(this.__wbg_ptr, ptr0, len0) >>> 0;
3031
+ }
3032
+ /**
3033
+ * @param {bigint} effect_id
3034
+ * @returns {ShellOperation}
3035
+ */
3036
+ cancelEffect(effect_id) {
3037
+ const ret = wasm.shell_cancelEffect(this.__wbg_ptr, effect_id);
3038
+ return ShellOperation.__wrap(ret);
3039
+ }
3040
+ /**
3041
+ * @param {string} text
3042
+ * @returns {ShellPromptResult}
3043
+ */
3044
+ insertPrompt(text) {
3045
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3046
+ const len0 = WASM_VECTOR_LEN;
3047
+ const ret = wasm.shell_insertPrompt(this.__wbg_ptr, ptr0, len0);
3048
+ return ShellPromptResult.__wrap(ret);
3049
+ }
3050
+ /**
3051
+ * @param {string} prompt
3052
+ * @returns {ShellTerminalResult}
3053
+ */
3054
+ openTerminal(prompt) {
3055
+ const ptr0 = passStringToWasm0(prompt, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3056
+ const len0 = WASM_VECTOR_LEN;
3057
+ const ret = wasm.shell_openTerminal(this.__wbg_ptr, ptr0, len0);
3058
+ return ShellTerminalResult.__wrap(ret);
3059
+ }
3060
+ /**
3061
+ * @returns {ShellOperation}
3062
+ */
3063
+ submitPrompt() {
3064
+ const ret = wasm.shell_submitPrompt(this.__wbg_ptr);
3065
+ return ShellOperation.__wrap(ret);
3066
+ }
3067
+ /**
3068
+ * The history as length-prefixed (u32 little-endian) UTF-8 entries
3069
+ * @returns {Uint8Array}
3070
+ */
3071
+ exportHistory() {
3072
+ const ret = wasm.shell_exportHistory(this.__wbg_ptr);
3073
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
3074
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
3075
+ return v1;
3076
+ }
3077
+ /**
3078
+ * Replace the history with exported entries, returns the status
3079
+ * @param {Uint8Array} data
3080
+ * @returns {number}
3081
+ */
3082
+ importHistory(data) {
3083
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
3084
+ const len0 = WASM_VECTOR_LEN;
3085
+ return wasm.shell_importHistory(this.__wbg_ptr, ptr0, len0) >>> 0;
3086
+ }
3087
+ /**
3088
+ * Finish an effect with a `DashQLShellEffectCompletionStatus` and its data (for queries a `QueryResultTag` and a
3089
+ * status line or a preview of the result, a flag byte and the output for dot commands, the message for errors)
3090
+ * @param {bigint} effect_id
3091
+ * @param {number} completion_status
3092
+ * @param {Uint8Array} data
3093
+ * @returns {ShellOperation}
3094
+ */
3095
+ completeEffect(effect_id, completion_status, data) {
3096
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
3097
+ const len0 = WASM_VECTOR_LEN;
3098
+ const ret = wasm.shell_completeEffect(this.__wbg_ptr, effect_id, completion_status, ptr0, len0);
3099
+ return ShellOperation.__wrap(ret);
3100
+ }
3101
+ /**
3102
+ * Complete at the cursor, throws if the completion fails
3103
+ * @param {number} limit
3104
+ * @returns {ShellCompletionCandidate[]}
3105
+ */
3106
+ completePrompt(limit) {
3107
+ const ret = wasm.shell_completePrompt(this.__wbg_ptr, limit);
3108
+ if (ret[3]) throw takeFromExternrefTable0(ret[2]);
3109
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
3110
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
3111
+ return v1;
3112
+ }
3113
+ /**
3114
+ * @param {string} display_text
3115
+ * @param {string} completion_text
3116
+ * @param {number} target_offset
3117
+ * @param {number} target_length
3118
+ * @returns {ShellPromptResult}
3119
+ */
3120
+ applyCompletion(display_text, completion_text, target_offset, target_length) {
3121
+ const ptr0 = passStringToWasm0(display_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3122
+ const len0 = WASM_VECTOR_LEN;
3123
+ const ptr1 = passStringToWasm0(completion_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3124
+ const len1 = WASM_VECTOR_LEN;
3125
+ const ret = wasm.shell_applyCompletion(this.__wbg_ptr, ptr0, len0, ptr1, len1, target_offset, target_length);
3126
+ return ShellPromptResult.__wrap(ret);
3127
+ }
3128
+ /**
3129
+ * @returns {ShellPromptResult}
3130
+ */
3131
+ movePromptLeft() {
3132
+ const ret = wasm.shell_movePromptLeft(this.__wbg_ptr);
3133
+ return ShellPromptResult.__wrap(ret);
3134
+ }
3135
+ /**
3136
+ * The `KeywordCase` of completions (1 is upper case)
3137
+ * @param {number} keyword_case
3138
+ */
3139
+ setKeywordCase(keyword_case) {
3140
+ wasm.shell_setKeywordCase(this.__wbg_ptr, keyword_case);
3141
+ }
3142
+ /**
3143
+ * @returns {ShellPromptResult}
3144
+ */
3145
+ movePromptRight() {
3146
+ const ret = wasm.shell_movePromptRight(this.__wbg_ptr);
3147
+ return ShellPromptResult.__wrap(ret);
3148
+ }
3149
+ /**
3150
+ * Consume a `DashQLShellPromptInput` with its text
3151
+ * @param {number} key
3152
+ * @param {string} text
3153
+ * @returns {ShellPromptResult}
3154
+ */
3155
+ consumePromptInput(key, text) {
3156
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3157
+ const len0 = WASM_VECTOR_LEN;
3158
+ const ret = wasm.shell_consumePromptInput(this.__wbg_ptr, key, ptr0, len0);
3159
+ return ShellPromptResult.__wrap(ret);
3160
+ }
3161
+ /**
3162
+ * @returns {ShellPromptResult}
3163
+ */
3164
+ deletePromptForward() {
3165
+ const ret = wasm.shell_deletePromptForward(this.__wbg_ptr);
3166
+ return ShellPromptResult.__wrap(ret);
3167
+ }
3168
+ /**
3169
+ * @param {string} output
3170
+ * @param {boolean} error
3171
+ * @returns {ShellTerminalResult}
3172
+ */
3173
+ finishTerminalQuery(output, error) {
3174
+ const ptr0 = passStringToWasm0(output, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3175
+ const len0 = WASM_VECTOR_LEN;
3176
+ const ret = wasm.shell_finishTerminalQuery(this.__wbg_ptr, ptr0, len0, error);
3177
+ return ShellTerminalResult.__wrap(ret);
3178
+ }
3179
+ /**
3180
+ * Consume a `DashQLShellPromptInput` with its text
3181
+ * @param {number} key
3182
+ * @param {string} text
3183
+ * @returns {ShellTerminalResult}
3184
+ */
3185
+ consumeTerminalInput(key, text) {
3186
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3187
+ const len0 = WASM_VECTOR_LEN;
3188
+ const ret = wasm.shell_consumeTerminalInput(this.__wbg_ptr, key, ptr0, len0);
3189
+ return ShellTerminalResult.__wrap(ret);
3190
+ }
3191
+ /**
3192
+ * @returns {ShellPromptResult}
3193
+ */
3194
+ deletePromptBackward() {
3195
+ const ret = wasm.shell_deletePromptBackward(this.__wbg_ptr);
3196
+ return ShellPromptResult.__wrap(ret);
3197
+ }
3198
+ /**
3199
+ * @param {string} message
3200
+ * @returns {ShellTerminalResult}
3201
+ */
3202
+ renderTerminalStatus(message) {
3203
+ const ptr0 = passStringToWasm0(message, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3204
+ const len0 = WASM_VECTOR_LEN;
3205
+ const ret = wasm.shell_renderTerminalStatus(this.__wbg_ptr, ptr0, len0);
3206
+ return ShellTerminalResult.__wrap(ret);
3207
+ }
3208
+ /**
3209
+ * The completion list that the host shows over the terminal, undefined if there is none
3210
+ * @returns {ShellCompletionList | undefined}
3211
+ */
3212
+ terminalCompletionList() {
3213
+ const ret = wasm.shell_terminalCompletionList(this.__wbg_ptr);
3214
+ return ret === 0 ? void 0 : ShellCompletionList.__wrap(ret);
3215
+ }
3216
+ /**
3217
+ * The color of the terminal prompt as 0xRRGGBB, bold in the default foreground color if undefined
3218
+ * @param {number | null} [rgb]
3219
+ */
3220
+ setTerminalPromptColor(rgb) {
3221
+ wasm.shell_setTerminalPromptColor(this.__wbg_ptr, isLikeNone(rgb) ? 4294967297 : rgb >>> 0);
3222
+ }
3223
+ /**
3224
+ * The packed `Completion` of the completion list, undefined if there is none
3225
+ * @returns {Uint8Array | undefined}
3226
+ */
3227
+ terminalCompletionBuffer() {
3228
+ const ret = wasm.shell_terminalCompletionBuffer(this.__wbg_ptr);
3229
+ let v1;
3230
+ if (ret[0] !== 0) {
3231
+ v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
3232
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
3233
+ }
3234
+ return v1;
3235
+ }
3236
+ /**
3237
+ * @returns {ShellTerminalResult}
3238
+ */
3239
+ clearTerminalQueryProgress() {
3240
+ const ret = wasm.shell_clearTerminalQueryProgress(this.__wbg_ptr);
3241
+ return ShellTerminalResult.__wrap(ret);
3242
+ }
3243
+ /**
3244
+ * @param {string} message
3245
+ * @param {boolean} advance_frame
3246
+ * @returns {ShellTerminalResult}
3247
+ */
3248
+ renderTerminalQueryProgress(message, advance_frame) {
3249
+ const ptr0 = passStringToWasm0(message, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3250
+ const len0 = WASM_VECTOR_LEN;
3251
+ const ret = wasm.shell_renderTerminalQueryProgress(this.__wbg_ptr, ptr0, len0, advance_frame);
3252
+ return ShellTerminalResult.__wrap(ret);
3253
+ }
3254
+ /**
3255
+ * Create a shell on a catalog for a terminal width
3256
+ * @param {Catalog} catalog
3257
+ * @param {number} terminal_columns
3258
+ * @param {boolean} auto_qualify_non_default_database_tables
3259
+ */
3260
+ constructor(catalog, terminal_columns, auto_qualify_non_default_database_tables) {
3261
+ _assertClass(catalog, Catalog);
3262
+ const ret = wasm.shell_new(catalog.__wbg_ptr, terminal_columns, auto_qualify_non_default_database_tables);
3263
+ this.__wbg_ptr = ret >>> 0;
3264
+ ShellFinalization.register(this, this.__wbg_ptr, this);
3265
+ return this;
3266
+ }
3267
+ /**
3268
+ * @param {number} terminal_columns
3269
+ */
3270
+ resize(terminal_columns) {
3271
+ wasm.shell_resize(this.__wbg_ptr, terminal_columns);
3272
+ }
3273
+ };
3274
+ if (Symbol.dispose) Shell.prototype[Symbol.dispose] = Shell.prototype.free;
3275
+ var ShellCompletionCandidateFinalization = typeof FinalizationRegistry === "undefined" ? {
3276
+ register: () => {},
3277
+ unregister: () => {}
3278
+ } : new FinalizationRegistry((ptr) => wasm.__wbg_shellcompletioncandidate_free(ptr >>> 0, 1));
3279
+ /**
3280
+ * A completion candidate
3281
+ */
3282
+ var ShellCompletionCandidate = class ShellCompletionCandidate {
3283
+ static __wrap(ptr) {
3284
+ ptr = ptr >>> 0;
3285
+ const obj = Object.create(ShellCompletionCandidate.prototype);
3286
+ obj.__wbg_ptr = ptr;
3287
+ ShellCompletionCandidateFinalization.register(obj, obj.__wbg_ptr, obj);
3288
+ return obj;
3289
+ }
3290
+ __destroy_into_raw() {
3291
+ const ptr = this.__wbg_ptr;
3292
+ this.__wbg_ptr = 0;
3293
+ ShellCompletionCandidateFinalization.unregister(this);
3294
+ return ptr;
3295
+ }
3296
+ free() {
3297
+ const ptr = this.__destroy_into_raw();
3298
+ wasm.__wbg_shellcompletioncandidate_free(ptr, 0);
3299
+ }
3300
+ /**
3301
+ * @returns {string}
3302
+ */
3303
+ get displayText() {
3304
+ let deferred1_0;
3305
+ let deferred1_1;
3306
+ try {
3307
+ const ret = wasm.shellcompletioncandidate_displayText(this.__wbg_ptr);
3308
+ deferred1_0 = ret[0];
3309
+ deferred1_1 = ret[1];
3310
+ return getStringFromWasm0(ret[0], ret[1]);
3311
+ } finally {
3312
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
3313
+ }
3314
+ }
3315
+ /**
3316
+ * The UTF-8 byte length of the replaced text
3317
+ * @returns {number}
3318
+ */
3319
+ get targetLength() {
3320
+ return wasm.shellcompletioncandidate_targetLength(this.__wbg_ptr) >>> 0;
3321
+ }
3322
+ /**
3323
+ * The UTF-8 byte offset of the replaced text
3324
+ * @returns {number}
3325
+ */
3326
+ get targetOffset() {
3327
+ return wasm.shellcompletioncandidate_targetOffset(this.__wbg_ptr) >>> 0;
3328
+ }
3329
+ /**
3330
+ * @returns {string}
3331
+ */
3332
+ get completionText() {
3333
+ let deferred1_0;
3334
+ let deferred1_1;
3335
+ try {
3336
+ const ret = wasm.shellcompletioncandidate_completionText(this.__wbg_ptr);
3337
+ deferred1_0 = ret[0];
3338
+ deferred1_1 = ret[1];
3339
+ return getStringFromWasm0(ret[0], ret[1]);
3340
+ } finally {
3341
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
3342
+ }
3343
+ }
3344
+ };
3345
+ if (Symbol.dispose) ShellCompletionCandidate.prototype[Symbol.dispose] = ShellCompletionCandidate.prototype.free;
3346
+ var ShellCompletionListFinalization = typeof FinalizationRegistry === "undefined" ? {
3347
+ register: () => {},
3348
+ unregister: () => {}
3349
+ } : new FinalizationRegistry((ptr) => wasm.__wbg_shellcompletionlist_free(ptr >>> 0, 1));
3350
+ /**
3351
+ * The completion list that the host shows over the terminal
3352
+ */
3353
+ var ShellCompletionList = class ShellCompletionList {
3354
+ static __wrap(ptr) {
3355
+ ptr = ptr >>> 0;
3356
+ const obj = Object.create(ShellCompletionList.prototype);
3357
+ obj.__wbg_ptr = ptr;
3358
+ ShellCompletionListFinalization.register(obj, obj.__wbg_ptr, obj);
3359
+ return obj;
3360
+ }
3361
+ __destroy_into_raw() {
3362
+ const ptr = this.__wbg_ptr;
3363
+ this.__wbg_ptr = 0;
3364
+ ShellCompletionListFinalization.unregister(this);
3365
+ return ptr;
3366
+ }
3367
+ free() {
3368
+ const ptr = this.__destroy_into_raw();
3369
+ wasm.__wbg_shellcompletionlist_free(ptr, 0);
3370
+ }
3371
+ /**
3372
+ * The terminal column of the start of the replaced text
3373
+ * @returns {number}
3374
+ */
3375
+ get anchorColumn() {
3376
+ return wasm.shellcompletionlist_anchorColumn(this.__wbg_ptr) >>> 0;
3377
+ }
3378
+ /**
3379
+ * The index of the selected catalog object of the selected candidate
3380
+ * @returns {number}
3381
+ */
3382
+ get variant() {
3383
+ return wasm.shellcompletionlist_variant(this.__wbg_ptr) >>> 0;
3384
+ }
3385
+ /**
3386
+ * Changes when the candidates change, `terminalCompletionBuffer` only has to be read then
3387
+ * @returns {bigint}
3388
+ */
3389
+ get revision() {
3390
+ const ret = wasm.shellcompletionlist_revision(this.__wbg_ptr);
3391
+ return BigInt.asUintN(64, ret);
3392
+ }
3393
+ /**
3394
+ * The index of the selected candidate
3395
+ * @returns {number}
3396
+ */
3397
+ get selection() {
3398
+ return wasm.shellcompletionlist_selection(this.__wbg_ptr) >>> 0;
3399
+ }
3400
+ };
3401
+ if (Symbol.dispose) ShellCompletionList.prototype[Symbol.dispose] = ShellCompletionList.prototype.free;
3402
+ var ShellOperationFinalization = typeof FinalizationRegistry === "undefined" ? {
3403
+ register: () => {},
3404
+ unregister: () => {}
3405
+ } : new FinalizationRegistry((ptr) => wasm.__wbg_shelloperation_free(ptr >>> 0, 1));
3406
+ /**
3407
+ * The result of an operation: rendered output, an effect or an error
3408
+ */
3409
+ var ShellOperation = class ShellOperation {
3410
+ static __wrap(ptr) {
3411
+ ptr = ptr >>> 0;
3412
+ const obj = Object.create(ShellOperation.prototype);
3413
+ obj.__wbg_ptr = ptr;
3414
+ ShellOperationFinalization.register(obj, obj.__wbg_ptr, obj);
3415
+ return obj;
3416
+ }
3417
+ __destroy_into_raw() {
3418
+ const ptr = this.__wbg_ptr;
3419
+ this.__wbg_ptr = 0;
3420
+ ShellOperationFinalization.unregister(this);
3421
+ return ptr;
3422
+ }
3423
+ free() {
3424
+ const ptr = this.__destroy_into_raw();
3425
+ wasm.__wbg_shelloperation_free(ptr, 0);
3426
+ }
3427
+ /**
3428
+ * The effect type of a pending operation (`DashQLShellEffectType`)
3429
+ * @returns {number | undefined}
3430
+ */
3431
+ get effectType() {
3432
+ const ret = wasm.shelloperation_effectType(this.__wbg_ptr);
3433
+ return ret === 4294967297 ? void 0 : ret;
3434
+ }
3435
+ /**
3436
+ * The effect payload of a pending operation: the query or the dot command
3437
+ * @returns {string | undefined}
3438
+ */
3439
+ get effectPayload() {
3440
+ const ret = wasm.shelloperation_effectPayload(this.__wbg_ptr);
3441
+ let v1;
3442
+ if (ret[0] !== 0) {
3443
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
3444
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
3445
+ }
3446
+ return v1;
3447
+ }
3448
+ /**
3449
+ * The data as text (output or error message)
3450
+ * @returns {string}
3451
+ */
3452
+ get text() {
3453
+ let deferred1_0;
3454
+ let deferred1_1;
3455
+ try {
3456
+ const ret = wasm.shelloperation_text(this.__wbg_ptr);
3457
+ deferred1_0 = ret[0];
3458
+ deferred1_1 = ret[1];
3459
+ return getStringFromWasm0(ret[0], ret[1]);
3460
+ } finally {
3461
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
3462
+ }
3463
+ }
3464
+ /**
3465
+ * The `DashQLShellStatus`, `PENDING` if the operation waits for an effect
3466
+ * @returns {number}
3467
+ */
3468
+ get status() {
3469
+ return wasm.shelloperation_status(this.__wbg_ptr) >>> 0;
3470
+ }
3471
+ /**
3472
+ * The effect id of a pending operation
3473
+ * @returns {bigint | undefined}
3474
+ */
3475
+ get effectId() {
3476
+ const ret = wasm.shelloperation_effectId(this.__wbg_ptr);
3477
+ return ret[0] === 0 ? void 0 : BigInt.asUintN(64, ret[1]);
3478
+ }
3479
+ };
3480
+ if (Symbol.dispose) ShellOperation.prototype[Symbol.dispose] = ShellOperation.prototype.free;
3481
+ var ShellPromptResultFinalization = typeof FinalizationRegistry === "undefined" ? {
3482
+ register: () => {},
3483
+ unregister: () => {}
3484
+ } : new FinalizationRegistry((ptr) => wasm.__wbg_shellpromptresult_free(ptr >>> 0, 1));
3485
+ /**
3486
+ * A prompt after an input
3487
+ */
3488
+ var ShellPromptResult = class ShellPromptResult {
3489
+ static __wrap(ptr) {
3490
+ ptr = ptr >>> 0;
3491
+ const obj = Object.create(ShellPromptResult.prototype);
3492
+ obj.__wbg_ptr = ptr;
3493
+ ShellPromptResultFinalization.register(obj, obj.__wbg_ptr, obj);
3494
+ return obj;
3495
+ }
3496
+ __destroy_into_raw() {
3497
+ const ptr = this.__wbg_ptr;
3498
+ this.__wbg_ptr = 0;
3499
+ ShellPromptResultFinalization.unregister(this);
3500
+ return ptr;
3501
+ }
3502
+ free() {
3503
+ const ptr = this.__destroy_into_raw();
3504
+ wasm.__wbg_shellpromptresult_free(ptr, 0);
3505
+ }
3506
+ /**
3507
+ * The UTF-8 byte offset of the cursor
3508
+ * @returns {number}
3509
+ */
3510
+ get cursorByteOffset() {
3511
+ return wasm.shellcompletionlist_selection(this.__wbg_ptr) >>> 0;
3512
+ }
3513
+ /**
3514
+ * @returns {string}
3515
+ */
3516
+ get text() {
3517
+ let deferred1_0;
3518
+ let deferred1_1;
3519
+ try {
3520
+ const ret = wasm.shellpromptresult_text(this.__wbg_ptr);
3521
+ deferred1_0 = ret[0];
3522
+ deferred1_1 = ret[1];
3523
+ return getStringFromWasm0(ret[0], ret[1]);
3524
+ } finally {
3525
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
3526
+ }
3527
+ }
3528
+ /**
3529
+ * The `DashQLShellPromptAction`
3530
+ * @returns {number}
3531
+ */
3532
+ get action() {
3533
+ return wasm.shellpromptresult_action(this.__wbg_ptr) >>> 0;
3534
+ }
3535
+ /**
3536
+ * The `DashQLShellStatus`
3537
+ * @returns {number}
3538
+ */
3539
+ get status() {
3540
+ return wasm.shellpromptresult_status(this.__wbg_ptr) >>> 0;
3541
+ }
3542
+ /**
3543
+ * The error message if the status is not OK
3544
+ * @returns {string}
3545
+ */
3546
+ get message() {
3547
+ let deferred1_0;
3548
+ let deferred1_1;
3549
+ try {
3550
+ const ret = wasm.shellpromptresult_message(this.__wbg_ptr);
3551
+ deferred1_0 = ret[0];
3552
+ deferred1_1 = ret[1];
3553
+ return getStringFromWasm0(ret[0], ret[1]);
3554
+ } finally {
3555
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
3556
+ }
3557
+ }
3558
+ /**
3559
+ * The prompt revision, bumped by every edit
3560
+ * @returns {bigint}
3561
+ */
3562
+ get revision() {
3563
+ const ret = wasm.shellcompletionlist_revision(this.__wbg_ptr);
3564
+ return BigInt.asUintN(64, ret);
3565
+ }
3566
+ };
3567
+ if (Symbol.dispose) ShellPromptResult.prototype[Symbol.dispose] = ShellPromptResult.prototype.free;
3568
+ var ShellTerminalResultFinalization = typeof FinalizationRegistry === "undefined" ? {
3569
+ register: () => {},
3570
+ unregister: () => {}
3571
+ } : new FinalizationRegistry((ptr) => wasm.__wbg_shellterminalresult_free(ptr >>> 0, 1));
3572
+ /**
3573
+ * Terminal output
3574
+ */
3575
+ var ShellTerminalResult = class ShellTerminalResult {
3576
+ static __wrap(ptr) {
3577
+ ptr = ptr >>> 0;
3578
+ const obj = Object.create(ShellTerminalResult.prototype);
3579
+ obj.__wbg_ptr = ptr;
3580
+ ShellTerminalResultFinalization.register(obj, obj.__wbg_ptr, obj);
3581
+ return obj;
3582
+ }
3583
+ __destroy_into_raw() {
3584
+ const ptr = this.__wbg_ptr;
3585
+ this.__wbg_ptr = 0;
3586
+ ShellTerminalResultFinalization.unregister(this);
3587
+ return ptr;
3588
+ }
3589
+ free() {
3590
+ const ptr = this.__destroy_into_raw();
3591
+ wasm.__wbg_shellterminalresult_free(ptr, 0);
3592
+ }
3593
+ /**
3594
+ * The VT100 output, or the error message if the status is not OK
3595
+ * @returns {string}
3596
+ */
3597
+ get data() {
3598
+ let deferred1_0;
3599
+ let deferred1_1;
3600
+ try {
3601
+ const ret = wasm.shellterminalresult_data(this.__wbg_ptr);
3602
+ deferred1_0 = ret[0];
3603
+ deferred1_1 = ret[1];
3604
+ return getStringFromWasm0(ret[0], ret[1]);
3605
+ } finally {
3606
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
3607
+ }
3608
+ }
3609
+ /**
3610
+ * The `DashQLShellPromptAction`
3611
+ * @returns {number}
3612
+ */
3613
+ get action() {
3614
+ return wasm.shellterminalresult_action(this.__wbg_ptr) >>> 0;
3615
+ }
3616
+ /**
3617
+ * The `DashQLShellStatus`
3618
+ * @returns {number}
3619
+ */
3620
+ get status() {
3621
+ return wasm.shellterminalresult_status(this.__wbg_ptr) >>> 0;
3622
+ }
3623
+ };
3624
+ if (Symbol.dispose) ShellTerminalResult.prototype[Symbol.dispose] = ShellTerminalResult.prototype.free;
3625
+ var TableParametersFinalization = typeof FinalizationRegistry === "undefined" ? {
3626
+ register: () => {},
3627
+ unregister: () => {}
3628
+ } : new FinalizationRegistry((ptr) => wasm.__wbg_tableparameters_free(ptr >>> 0, 1));
3629
+ /**
3630
+ * The table parameters of a session (`table_parameters::TableParameters`)
3631
+ */
3632
+ var TableParameters = class {
3633
+ __destroy_into_raw() {
3634
+ const ptr = this.__wbg_ptr;
3635
+ this.__wbg_ptr = 0;
3636
+ TableParametersFinalization.unregister(this);
3637
+ return ptr;
3638
+ }
3639
+ free() {
3640
+ const ptr = this.__destroy_into_raw();
3641
+ wasm.__wbg_tableparameters_free(ptr, 0);
3642
+ }
3643
+ constructor() {
3644
+ const ret = wasm.tableparameters_new();
3645
+ this.__wbg_ptr = ret >>> 0;
3646
+ TableParametersFinalization.register(this, this.__wbg_ptr, this);
3647
+ return this;
3648
+ }
3649
+ /**
3650
+ * Give the published table parameters to a session that is no script of the session, e.g. a draft
3651
+ * @param {ScriptSession} session
3652
+ * @returns {boolean}
3653
+ */
3654
+ attach(session) {
3655
+ _assertClass(session, ScriptSession);
3656
+ return wasm.tableparameters_attach(this.__wbg_ptr, session.__wbg_ptr) !== 0;
3657
+ }
3658
+ /**
3659
+ * Derive the table parameters from the analyses of the scripts and the attachments of a request and give them to
3660
+ * the sessions of the scripts. Returns the indexes of the scripts whose analysis is outdated by them, every script
3661
+ * if they changed. A script whose analysis lags behind its text keeps its previous result.
3662
+ * @param {SessionPlanRequest} request
3663
+ * @returns {Uint32Array}
3664
+ */
3665
+ publish(request) {
3666
+ _assertClass(request, SessionPlanRequest);
3667
+ const ret = wasm.tableparameters_publish(this.__wbg_ptr, request.__wbg_ptr);
3668
+ var v1 = getArrayU32FromWasm0(ret[0], ret[1]).slice();
3669
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
3670
+ return v1;
3671
+ }
3672
+ };
3673
+ if (Symbol.dispose) TableParameters.prototype[Symbol.dispose] = TableParameters.prototype.free;
3674
+ var WorkbookScriptSessionFinalization = typeof FinalizationRegistry === "undefined" ? {
3675
+ register: () => {},
3676
+ unregister: () => {}
3677
+ } : new FinalizationRegistry((ptr) => wasm.__wbg_workbookscriptsession_free(ptr >>> 0, 1));
3678
+ /**
3679
+ * The session of a script of a workbook of a runtime, shared with the workbook. It reads the script and computes texts
3680
+ * from it, it never changes the text, the analysis or the cursor of the session: the editors change it through the
3681
+ * runtime (`Runtime.applyEditorEvent`), which writes and publishes what changed. A session that the runtime holds
3682
+ * borrowed fails the call instead of panicking.
3683
+ */
3684
+ var WorkbookScriptSession = class WorkbookScriptSession {
3685
+ static __wrap(ptr) {
3686
+ ptr = ptr >>> 0;
3687
+ const obj = Object.create(WorkbookScriptSession.prototype);
3688
+ obj.__wbg_ptr = ptr;
3689
+ WorkbookScriptSessionFinalization.register(obj, obj.__wbg_ptr, obj);
3690
+ return obj;
3691
+ }
3692
+ __destroy_into_raw() {
3693
+ const ptr = this.__wbg_ptr;
3694
+ this.__wbg_ptr = 0;
3695
+ WorkbookScriptSessionFinalization.unregister(this);
3696
+ return ptr;
3697
+ }
3698
+ free() {
3699
+ const ptr = this.__destroy_into_raw();
3700
+ wasm.__wbg_workbookscriptsession_free(ptr, 0);
3701
+ }
3702
+ /**
3703
+ * Format the script into a new script of another catalog
3704
+ * @param {number} dialect
3705
+ * @param {number} mode
3706
+ * @param {number} max_width
3707
+ * @param {number} indentation_width
3708
+ * @param {boolean} debug_mode
3709
+ * @param {number} keyword_case
3710
+ * @param {boolean} parse_if_outdated
3711
+ * @param {Catalog} catalog
3712
+ * @returns {Script}
3713
+ */
3714
+ formatInto(dialect, mode, max_width, indentation_width, debug_mode, keyword_case, parse_if_outdated, catalog) {
3715
+ _assertClass(catalog, Catalog);
3716
+ const ret = wasm.workbookscriptsession_formatInto(this.__wbg_ptr, dialect, mode, max_width, indentation_width, debug_mode, keyword_case, parse_if_outdated, catalog.__wbg_ptr);
3717
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
3718
+ return Script.__wrap(ret[0]);
3719
+ }
3720
+ /**
3721
+ * The packed `ScriptDiff` from the session script to a target script
3722
+ * @param {Script} target
3723
+ * @returns {Uint8Array}
3724
+ */
3725
+ computeDiff(target) {
3726
+ _assertClass(target, Script);
3727
+ const ret = wasm.workbookscriptsession_computeDiff(this.__wbg_ptr, target.__wbg_ptr);
3728
+ if (ret[3]) throw takeFromExternrefTable0(ret[2]);
3729
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
3730
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
3731
+ return v1;
3732
+ }
3733
+ /**
3734
+ * @returns {bigint}
3735
+ */
3736
+ textVersion() {
3737
+ const ret = wasm.workbookscriptsession_textVersion(this.__wbg_ptr);
3738
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
3739
+ return BigInt.asUintN(64, ret[0]);
3740
+ }
3741
+ /**
3742
+ * Compile the script, returns the packed `ScriptCompilationResult`
3743
+ * @param {number} dialect
3744
+ * @param {number} mode
3745
+ * @param {number} max_width
3746
+ * @param {number} indentation_width
3747
+ * @param {boolean} allow_extensions
3748
+ * @param {boolean} parse_if_outdated
3749
+ * @returns {Uint8Array}
3750
+ */
3751
+ compileQuery(dialect, mode, max_width, indentation_width, allow_extensions, parse_if_outdated) {
3752
+ const ret = wasm.workbookscriptsession_compileQuery(this.__wbg_ptr, dialect, mode, max_width, indentation_width, allow_extensions, parse_if_outdated);
3753
+ if (ret[3]) throw takeFromExternrefTable0(ret[2]);
3754
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
3755
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
3756
+ return v1;
3757
+ }
3758
+ /**
3759
+ * @returns {bigint}
3760
+ */
3761
+ stateRevision() {
3762
+ const ret = wasm.workbookscriptsession_stateRevision(this.__wbg_ptr);
3763
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
3764
+ return BigInt.asUintN(64, ret[0]);
3765
+ }
3766
+ /**
3767
+ * The annotation of a statement as JSON, like `Script.readAnnotation`
3768
+ * @param {number} statement_id
3769
+ * @param {boolean} parse_if_outdated
3770
+ * @returns {string}
3771
+ */
3772
+ readAnnotation(statement_id, parse_if_outdated) {
3773
+ let deferred2_0;
3774
+ let deferred2_1;
3775
+ try {
3776
+ const ret = wasm.workbookscriptsession_readAnnotation(this.__wbg_ptr, statement_id, parse_if_outdated);
3777
+ var ptr1 = ret[0];
3778
+ var len1 = ret[1];
3779
+ if (ret[3]) {
3780
+ ptr1 = 0;
3781
+ len1 = 0;
3782
+ throw takeFromExternrefTable0(ret[2]);
3783
+ }
3784
+ deferred2_0 = ptr1;
3785
+ deferred2_1 = len1;
3786
+ return getStringFromWasm0(ptr1, len1);
3787
+ } finally {
3788
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
3789
+ }
3790
+ }
3791
+ /**
3792
+ * Remove the `@flow` tag of the script. Returns the new text, the session stays.
3793
+ * @param {boolean} parse_if_outdated
3794
+ * @returns {string}
3795
+ */
3796
+ removeVisFlow(parse_if_outdated) {
3797
+ let deferred2_0;
3798
+ let deferred2_1;
3799
+ try {
3800
+ const ret = wasm.workbookscriptsession_removeVisFlow(this.__wbg_ptr, parse_if_outdated);
3801
+ var ptr1 = ret[0];
3802
+ var len1 = ret[1];
3803
+ if (ret[3]) {
3804
+ ptr1 = 0;
3805
+ len1 = 0;
3806
+ throw takeFromExternrefTable0(ret[2]);
3807
+ }
3808
+ deferred2_0 = ptr1;
3809
+ deferred2_1 = len1;
3810
+ return getStringFromWasm0(ptr1, len1);
3811
+ } finally {
3812
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
3813
+ }
3814
+ }
3815
+ /**
3816
+ * @returns {number}
3817
+ */
3818
+ catalogEntryId() {
3819
+ const ret = wasm.workbookscriptsession_catalogEntryId(this.__wbg_ptr);
3820
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
3821
+ return ret[0] >>> 0;
3822
+ }
3823
+ /**
3824
+ * @returns {bigint}
3825
+ */
3826
+ catalogRevision() {
3827
+ const ret = wasm.workbookscriptsession_catalogRevision(this.__wbg_ptr);
3828
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
3829
+ return BigInt.asUintN(64, ret[0]);
3830
+ }
3831
+ /**
3832
+ * Remove the `@param` tags of an input of the script. Returns the new text, the session stays.
3833
+ * @param {string} name
3834
+ * @param {boolean} parse_if_outdated
3835
+ * @returns {string}
3836
+ */
3837
+ removeParamTag(name, parse_if_outdated) {
3838
+ let deferred3_0;
3839
+ let deferred3_1;
3840
+ try {
3841
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3842
+ const len0 = WASM_VECTOR_LEN;
3843
+ const ret = wasm.workbookscriptsession_removeParamTag(this.__wbg_ptr, ptr0, len0, parse_if_outdated);
3844
+ var ptr2 = ret[0];
3845
+ var len2 = ret[1];
3846
+ if (ret[3]) {
3847
+ ptr2 = 0;
3848
+ len2 = 0;
3849
+ throw takeFromExternrefTable0(ret[2]);
3850
+ }
3851
+ deferred3_0 = ptr2;
3852
+ deferred3_1 = len2;
3853
+ return getStringFromWasm0(ptr2, len2);
3854
+ } finally {
3855
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
3856
+ }
3857
+ }
3858
+ /**
3859
+ * Set the `@flow` tag of the script. Returns the new text, the session stays.
3860
+ * @param {number | null | undefined} x
3861
+ * @param {number | null | undefined} y
3862
+ * @param {number | null | undefined} width
3863
+ * @param {number | null | undefined} height
3864
+ * @param {boolean} parse_if_outdated
3865
+ * @returns {string}
3866
+ */
3867
+ rewriteVisFlow(x, y, width, height, parse_if_outdated) {
3868
+ let deferred2_0;
3869
+ let deferred2_1;
3870
+ try {
3871
+ const ret = wasm.workbookscriptsession_rewriteVisFlow(this.__wbg_ptr, isLikeNone(x) ? 4294967297 : x >> 0, isLikeNone(y) ? 4294967297 : y >> 0, isLikeNone(width) ? 4294967297 : width >> 0, isLikeNone(height) ? 4294967297 : height >> 0, parse_if_outdated);
3872
+ var ptr1 = ret[0];
3873
+ var len1 = ret[1];
3874
+ if (ret[3]) {
3875
+ ptr1 = 0;
3876
+ len1 = 0;
3877
+ throw takeFromExternrefTable0(ret[2]);
3878
+ }
3879
+ deferred2_0 = ptr1;
3880
+ deferred2_1 = len1;
3881
+ return getStringFromWasm0(ptr1, len1);
3882
+ } finally {
3883
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
3884
+ }
3885
+ }
3886
+ /**
3887
+ * Set the `@param` tag of an input of the script. Returns the new text, the session stays.
3888
+ * @param {string} name
3889
+ * @param {string} value
3890
+ * @param {boolean} parse_if_outdated
3891
+ * @returns {string}
3892
+ */
3893
+ rewriteParamTag(name, value, parse_if_outdated) {
3894
+ let deferred4_0;
3895
+ let deferred4_1;
3896
+ try {
3897
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3898
+ const len0 = WASM_VECTOR_LEN;
3899
+ const ptr1 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3900
+ const len1 = WASM_VECTOR_LEN;
3901
+ const ret = wasm.workbookscriptsession_rewriteParamTag(this.__wbg_ptr, ptr0, len0, ptr1, len1, parse_if_outdated);
3902
+ var ptr3 = ret[0];
3903
+ var len3 = ret[1];
3904
+ if (ret[3]) {
3905
+ ptr3 = 0;
3906
+ len3 = 0;
3907
+ throw takeFromExternrefTable0(ret[2]);
3908
+ }
3909
+ deferred4_0 = ptr3;
3910
+ deferred4_1 = len3;
3911
+ return getStringFromWasm0(ptr3, len3);
3912
+ } finally {
3913
+ wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
3914
+ }
3915
+ }
3916
+ /**
3917
+ * Set the `@board` tag of a query, negative rows and columns are absent. Returns the new text, the session stays.
3918
+ * @param {number} statement_id
3919
+ * @param {number} row
3920
+ * @param {number} column
3921
+ * @param {number} width
3922
+ * @param {number} height
3923
+ * @param {boolean} parse_if_outdated
3924
+ * @returns {string}
3925
+ */
3926
+ rewriteVisBoard(statement_id, row, column, width, height, parse_if_outdated) {
3927
+ let deferred2_0;
3928
+ let deferred2_1;
3929
+ try {
3930
+ const ret = wasm.workbookscriptsession_rewriteVisBoard(this.__wbg_ptr, statement_id, row, column, width, height, parse_if_outdated);
3931
+ var ptr1 = ret[0];
3932
+ var len1 = ret[1];
3933
+ if (ret[3]) {
3934
+ ptr1 = 0;
3935
+ len1 = 0;
3936
+ throw takeFromExternrefTable0(ret[2]);
3937
+ }
3938
+ deferred2_0 = ptr1;
3939
+ deferred2_1 = len1;
3940
+ return getStringFromWasm0(ptr1, len1);
3941
+ } finally {
3942
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
3943
+ }
3944
+ }
3945
+ /**
3946
+ * Complete at the primary cursor, returns the packed `Completion`
3947
+ * @param {number} limit
3948
+ * @param {number} keyword_case
3949
+ * @returns {Uint8Array}
3950
+ */
3951
+ completeAtCursor(limit, keyword_case) {
3952
+ const ret = wasm.workbookscriptsession_completeAtCursor(this.__wbg_ptr, limit, keyword_case);
3953
+ if (ret[3]) throw takeFromExternrefTable0(ret[2]);
3954
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
3955
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
3956
+ return v1;
3957
+ }
3958
+ /**
3959
+ * Replace the annotation of a statement, given as JSON. Returns the new text, the session stays.
3960
+ * @param {number} statement_id
3961
+ * @param {string} annotation
3962
+ * @param {boolean} parse_if_outdated
3963
+ * @returns {string}
3964
+ */
3965
+ rewriteAnnotation(statement_id, annotation, parse_if_outdated) {
3966
+ let deferred3_0;
3967
+ let deferred3_1;
3968
+ try {
3969
+ const ptr0 = passStringToWasm0(annotation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3970
+ const len0 = WASM_VECTOR_LEN;
3971
+ const ret = wasm.workbookscriptsession_rewriteAnnotation(this.__wbg_ptr, statement_id, ptr0, len0, parse_if_outdated);
3972
+ var ptr2 = ret[0];
3973
+ var len2 = ret[1];
3974
+ if (ret[3]) {
3975
+ ptr2 = 0;
3976
+ len2 = 0;
3977
+ throw takeFromExternrefTable0(ret[2]);
3978
+ }
3979
+ deferred3_0 = ptr2;
3980
+ deferred3_1 = len2;
3981
+ return getStringFromWasm0(ptr2, len2);
3982
+ } finally {
3983
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
3984
+ }
3985
+ }
3986
+ /**
3987
+ * Can formatting represent every node?
3988
+ * @param {number} dialect
3989
+ * @param {number} mode
3990
+ * @param {number} max_width
3991
+ * @param {number} indentation_width
3992
+ * @param {boolean} debug_mode
3993
+ * @param {boolean} parse_if_outdated
3994
+ * @returns {boolean}
3995
+ */
3996
+ isFullyFormattable(dialect, mode, max_width, indentation_width, debug_mode, parse_if_outdated) {
3997
+ const ret = wasm.workbookscriptsession_isFullyFormattable(this.__wbg_ptr, dialect, mode, max_width, indentation_width, debug_mode, parse_if_outdated);
3998
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
3999
+ return ret[0] !== 0;
4000
+ }
4001
+ /**
4002
+ * Set the renderer tag of a query, an empty kind removes it. Returns the new text, the session stays.
4003
+ * @param {number} statement_id
4004
+ * @param {string} kind
4005
+ * @param {string} body
4006
+ * @param {boolean} parse_if_outdated
4007
+ * @returns {string}
4008
+ */
4009
+ rewriteVisRenderer(statement_id, kind, body, parse_if_outdated) {
4010
+ let deferred4_0;
4011
+ let deferred4_1;
4012
+ try {
4013
+ const ptr0 = passStringToWasm0(kind, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
4014
+ const len0 = WASM_VECTOR_LEN;
4015
+ const ptr1 = passStringToWasm0(body, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
4016
+ const len1 = WASM_VECTOR_LEN;
4017
+ const ret = wasm.workbookscriptsession_rewriteVisRenderer(this.__wbg_ptr, statement_id, ptr0, len0, ptr1, len1, parse_if_outdated);
4018
+ var ptr3 = ret[0];
4019
+ var len3 = ret[1];
4020
+ if (ret[3]) {
4021
+ ptr3 = 0;
4022
+ len3 = 0;
4023
+ throw takeFromExternrefTable0(ret[2]);
4024
+ }
4025
+ deferred4_0 = ptr3;
4026
+ deferred4_1 = len3;
4027
+ return getStringFromWasm0(ptr3, len3);
4028
+ } finally {
4029
+ wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
4030
+ }
4031
+ }
4032
+ /**
4033
+ * See `ScriptSession.findScriptReferences`
4034
+ * @param {string[]} names
4035
+ * @returns {Uint32Array}
4036
+ */
4037
+ findScriptReferences(names) {
4038
+ const ptr0 = passArrayJsValueToWasm0(names, wasm.__wbindgen_malloc);
4039
+ const len0 = WASM_VECTOR_LEN;
4040
+ const ret = wasm.workbookscriptsession_findScriptReferences(this.__wbg_ptr, ptr0, len0);
4041
+ if (ret[3]) throw takeFromExternrefTable0(ret[2]);
4042
+ var v2 = getArrayU32FromWasm0(ret[0], ret[1]).slice();
4043
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
4044
+ return v2;
4045
+ }
4046
+ /**
4047
+ * @returns {string}
4048
+ */
4049
+ text() {
4050
+ let deferred2_0;
4051
+ let deferred2_1;
4052
+ try {
4053
+ const ret = wasm.workbookscriptsession_text(this.__wbg_ptr);
4054
+ var ptr1 = ret[0];
4055
+ var len1 = ret[1];
4056
+ if (ret[3]) {
4057
+ ptr1 = 0;
4058
+ len1 = 0;
4059
+ throw takeFromExternrefTable0(ret[2]);
4060
+ }
4061
+ deferred2_0 = ptr1;
4062
+ deferred2_1 = len1;
4063
+ return getStringFromWasm0(ptr1, len1);
4064
+ } finally {
4065
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
4066
+ }
4067
+ }
4068
+ /**
4069
+ * Format the script into a new script of the session catalog
4070
+ * @param {number} dialect
4071
+ * @param {number} mode
4072
+ * @param {number} max_width
4073
+ * @param {number} indentation_width
4074
+ * @param {boolean} debug_mode
4075
+ * @param {number} keyword_case
4076
+ * @param {boolean} parse_if_outdated
4077
+ * @returns {Script}
4078
+ */
4079
+ format(dialect, mode, max_width, indentation_width, debug_mode, keyword_case, parse_if_outdated) {
4080
+ const ret = wasm.workbookscriptsession_format(this.__wbg_ptr, dialect, mode, max_width, indentation_width, debug_mode, keyword_case, parse_if_outdated);
4081
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
4082
+ return Script.__wrap(ret[0]);
4083
+ }
4084
+ };
4085
+ if (Symbol.dispose) WorkbookScriptSession.prototype[Symbol.dispose] = WorkbookScriptSession.prototype.free;
4086
+ var EXPECTED_RESPONSE_TYPES = /* @__PURE__ */ new Set([
4087
+ "basic",
4088
+ "cors",
4089
+ "default"
4090
+ ]);
4091
+ async function __wbg_load(module, imports) {
4092
+ if (typeof Response === "function" && module instanceof Response) {
4093
+ if (typeof WebAssembly.instantiateStreaming === "function") try {
4094
+ return await WebAssembly.instantiateStreaming(module, imports);
4095
+ } catch (e) {
4096
+ if (module.ok && EXPECTED_RESPONSE_TYPES.has(module.type) && module.headers.get("Content-Type") !== "application/wasm") console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
4097
+ else throw e;
4098
+ }
4099
+ const bytes = await module.arrayBuffer();
4100
+ return await WebAssembly.instantiate(bytes, imports);
4101
+ } else {
4102
+ const instance = await WebAssembly.instantiate(module, imports);
4103
+ if (instance instanceof WebAssembly.Instance) return {
4104
+ instance,
4105
+ module
4106
+ };
4107
+ else return instance;
4108
+ }
4109
+ }
4110
+ function __wbg_get_imports() {
4111
+ const imports = {};
4112
+ imports.wbg = {};
4113
+ imports.wbg.__wbg_Error_e83987f665cf5504 = function(arg0, arg1) {
4114
+ return Error(getStringFromWasm0(arg0, arg1));
4115
+ };
4116
+ imports.wbg.__wbg_Number_bb48ca12f395cd08 = function(arg0) {
4117
+ return Number(arg0);
4118
+ };
4119
+ imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
4120
+ const ptr1 = passStringToWasm0(String(arg1), wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
4121
+ const len1 = WASM_VECTOR_LEN;
4122
+ getDataViewMemory0().setInt32(arg0 + 4, len1, true);
4123
+ getDataViewMemory0().setInt32(arg0 + 0, ptr1, true);
4124
+ };
4125
+ imports.wbg.__wbg___dashqlCorePanic_9fd9283c31c10930 = function() {
4126
+ return handleError(function(arg0, arg1) {
4127
+ globalThis.__dashqlCorePanic(getStringFromWasm0(arg0, arg1));
4128
+ }, arguments);
4129
+ };
4130
+ imports.wbg.__wbg___wbindgen_bigint_get_as_i64_f3ebc5a755000afd = function(arg0, arg1) {
4131
+ const v = arg1;
4132
+ const ret = typeof v === "bigint" ? v : void 0;
4133
+ getDataViewMemory0().setBigInt64(arg0 + 8, isLikeNone(ret) ? BigInt(0) : ret, true);
4134
+ getDataViewMemory0().setInt32(arg0 + 0, !isLikeNone(ret), true);
4135
+ };
4136
+ imports.wbg.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68 = function(arg0) {
4137
+ const v = arg0;
4138
+ const ret = typeof v === "boolean" ? v : void 0;
4139
+ return isLikeNone(ret) ? 16777215 : ret ? 1 : 0;
4140
+ };
4141
+ imports.wbg.__wbg___wbindgen_debug_string_df47ffb5e35e6763 = function(arg0, arg1) {
4142
+ const ptr1 = passStringToWasm0(debugString(arg1), wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
4143
+ const len1 = WASM_VECTOR_LEN;
4144
+ getDataViewMemory0().setInt32(arg0 + 4, len1, true);
4145
+ getDataViewMemory0().setInt32(arg0 + 0, ptr1, true);
4146
+ };
4147
+ imports.wbg.__wbg___wbindgen_in_bb933bd9e1b3bc0f = function(arg0, arg1) {
4148
+ return arg0 in arg1;
4149
+ };
4150
+ imports.wbg.__wbg___wbindgen_is_bigint_cb320707dcd35f0b = function(arg0) {
4151
+ return typeof arg0 === "bigint";
4152
+ };
4153
+ imports.wbg.__wbg___wbindgen_is_falsy_46b8d2f2aba49112 = function(arg0) {
4154
+ return !arg0;
4155
+ };
4156
+ imports.wbg.__wbg___wbindgen_is_function_ee8a6c5833c90377 = function(arg0) {
4157
+ return typeof arg0 === "function";
4158
+ };
4159
+ imports.wbg.__wbg___wbindgen_is_null_5e69f72e906cc57c = function(arg0) {
4160
+ return arg0 === null;
4161
+ };
4162
+ imports.wbg.__wbg___wbindgen_is_object_c818261d21f283a4 = function(arg0) {
4163
+ const val = arg0;
4164
+ return typeof val === "object" && val !== null;
4165
+ };
4166
+ imports.wbg.__wbg___wbindgen_is_string_fbb76cb2940daafd = function(arg0) {
4167
+ return typeof arg0 === "string";
4168
+ };
4169
+ imports.wbg.__wbg___wbindgen_is_symbol_aee00aa499a60051 = function(arg0) {
4170
+ return typeof arg0 === "symbol";
4171
+ };
4172
+ imports.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478 = function(arg0) {
4173
+ return arg0 === void 0;
4174
+ };
4175
+ imports.wbg.__wbg___wbindgen_jsval_eq_6b13ab83478b1c50 = function(arg0, arg1) {
4176
+ return arg0 === arg1;
4177
+ };
4178
+ imports.wbg.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147 = function(arg0, arg1) {
4179
+ return arg0 == arg1;
4180
+ };
4181
+ imports.wbg.__wbg___wbindgen_number_get_a20bf9b85341449d = function(arg0, arg1) {
4182
+ const obj = arg1;
4183
+ const ret = typeof obj === "number" ? obj : void 0;
4184
+ getDataViewMemory0().setFloat64(arg0 + 8, isLikeNone(ret) ? 0 : ret, true);
4185
+ getDataViewMemory0().setInt32(arg0 + 0, !isLikeNone(ret), true);
4186
+ };
4187
+ imports.wbg.__wbg___wbindgen_string_get_e4f06c90489ad01b = function(arg0, arg1) {
4188
+ const obj = arg1;
4189
+ const ret = typeof obj === "string" ? obj : void 0;
4190
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
4191
+ var len1 = WASM_VECTOR_LEN;
4192
+ getDataViewMemory0().setInt32(arg0 + 4, len1, true);
4193
+ getDataViewMemory0().setInt32(arg0 + 0, ptr1, true);
4194
+ };
4195
+ imports.wbg.__wbg___wbindgen_throw_b855445ff6a94295 = function(arg0, arg1) {
4196
+ throw new Error(getStringFromWasm0(arg0, arg1));
4197
+ };
4198
+ imports.wbg.__wbg__wbg_cb_unref_2454a539ea5790d9 = function(arg0) {
4199
+ arg0._wbg_cb_unref();
4200
+ };
4201
+ imports.wbg.__wbg_apply_04097a755e1e4a1e = function() {
4202
+ return handleError(function(arg0, arg1, arg2) {
4203
+ return arg0.apply(arg1, arg2);
4204
+ }, arguments);
4205
+ };
4206
+ imports.wbg.__wbg_call_357bb72daee10695 = function() {
4207
+ return handleError(function(arg0, arg1, arg2, arg3, arg4) {
4208
+ return arg0.call(arg1, arg2, arg3, arg4);
4209
+ }, arguments);
4210
+ };
4211
+ imports.wbg.__wbg_call_525440f72fbfc0ea = function() {
4212
+ return handleError(function(arg0, arg1, arg2) {
4213
+ return arg0.call(arg1, arg2);
4214
+ }, arguments);
4215
+ };
4216
+ imports.wbg.__wbg_call_e45d2cf9fc925fcf = function() {
4217
+ return handleError(function(arg0, arg1, arg2, arg3) {
4218
+ return arg0.call(arg1, arg2, arg3);
4219
+ }, arguments);
4220
+ };
4221
+ imports.wbg.__wbg_call_e762c39fa8ea36bf = function() {
4222
+ return handleError(function(arg0, arg1) {
4223
+ return arg0.call(arg1);
4224
+ }, arguments);
4225
+ };
4226
+ imports.wbg.__wbg_catch_943836faa5d29bfb = function(arg0, arg1) {
4227
+ return arg0.catch(arg1);
4228
+ };
4229
+ imports.wbg.__wbg_construct_7c20558959139eb1 = function() {
4230
+ return handleError(function(arg0, arg1) {
4231
+ return Reflect.construct(arg0, arg1);
4232
+ }, arguments);
4233
+ };
4234
+ imports.wbg.__wbg_done_2042aa2670fb1db1 = function(arg0) {
4235
+ return arg0.done;
4236
+ };
4237
+ imports.wbg.__wbg_entries_e171b586f8f6bdbf = function(arg0) {
4238
+ return Object.entries(arg0);
4239
+ };
4240
+ imports.wbg.__wbg_from_a4ad7cbddd0d7135 = function(arg0) {
4241
+ return Array.from(arg0);
4242
+ };
4243
+ imports.wbg.__wbg_get_7bed016f185add81 = function(arg0, arg1) {
4244
+ return arg0[arg1 >>> 0];
4245
+ };
4246
+ imports.wbg.__wbg_get_efcb449f58ec27c2 = function() {
4247
+ return handleError(function(arg0, arg1) {
4248
+ return Reflect.get(arg0, arg1);
4249
+ }, arguments);
4250
+ };
4251
+ imports.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe = function(arg0, arg1) {
4252
+ return arg0[arg1];
4253
+ };
4254
+ imports.wbg.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38 = function(arg0) {
4255
+ let result;
4256
+ try {
4257
+ result = arg0 instanceof ArrayBuffer;
4258
+ } catch (_) {
4259
+ result = false;
4260
+ }
4261
+ return result;
4262
+ };
4263
+ imports.wbg.__wbg_instanceof_Map_8579b5e2ab5437c7 = function(arg0) {
4264
+ let result;
4265
+ try {
4266
+ result = arg0 instanceof Map;
4267
+ } catch (_) {
4268
+ result = false;
4269
+ }
4270
+ return result;
4271
+ };
4272
+ imports.wbg.__wbg_instanceof_Uint8Array_20c8e73002f7af98 = function(arg0) {
4273
+ let result;
4274
+ try {
4275
+ result = arg0 instanceof Uint8Array;
4276
+ } catch (_) {
4277
+ result = false;
4278
+ }
4279
+ return result;
4280
+ };
4281
+ imports.wbg.__wbg_isArray_96e0af9891d0945d = function(arg0) {
4282
+ return Array.isArray(arg0);
4283
+ };
4284
+ imports.wbg.__wbg_isSafeInteger_d216eda7911dde36 = function(arg0) {
4285
+ return Number.isSafeInteger(arg0);
4286
+ };
4287
+ imports.wbg.__wbg_iterator_e5822695327a3c39 = function() {
4288
+ return Symbol.iterator;
4289
+ };
4290
+ imports.wbg.__wbg_length_69bca3cb64fc8748 = function(arg0) {
4291
+ return arg0.length;
4292
+ };
4293
+ imports.wbg.__wbg_length_cdd215e10d9dd507 = function(arg0) {
4294
+ return arg0.length;
4295
+ };
4296
+ imports.wbg.__wbg_new_0_f9740686d739025c = function() {
4297
+ return /* @__PURE__ */ new Date();
4298
+ };
4299
+ imports.wbg.__wbg_new_1acc0b6eea89d040 = function() {
4300
+ return /* @__PURE__ */ new Object();
4301
+ };
4302
+ imports.wbg.__wbg_new_3c3d849046688a66 = function(arg0, arg1) {
4303
+ try {
4304
+ var state0 = {
4305
+ a: arg0,
4306
+ b: arg1
4307
+ };
4308
+ var cb0 = (arg0, arg1) => {
4309
+ const a = state0.a;
4310
+ state0.a = 0;
4311
+ try {
4312
+ return wasm_bindgen__convert__closures_____invoke__h3cb6850919769fd7(a, state0.b, arg0, arg1);
4313
+ } finally {
4314
+ state0.a = a;
4315
+ }
4316
+ };
4317
+ return new Promise(cb0);
4318
+ } finally {
4319
+ state0.a = state0.b = 0;
4320
+ }
4321
+ };
4322
+ imports.wbg.__wbg_new_5a79be3ab53b8aa5 = function(arg0) {
4323
+ return new Uint8Array(arg0);
4324
+ };
4325
+ imports.wbg.__wbg_new_68651c719dcda04e = function() {
4326
+ return /* @__PURE__ */ new Map();
4327
+ };
4328
+ imports.wbg.__wbg_new_93d9417ed3fb115d = function(arg0) {
4329
+ return new Date(arg0);
4330
+ };
4331
+ imports.wbg.__wbg_new_e17d9f43105b08be = function() {
4332
+ return new Array();
4333
+ };
4334
+ imports.wbg.__wbg_new_from_slice_92f4d78ca282a2d2 = function(arg0, arg1) {
4335
+ return new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
4336
+ };
4337
+ imports.wbg.__wbg_new_no_args_ee98eee5275000a4 = function(arg0, arg1) {
4338
+ return new Function(getStringFromWasm0(arg0, arg1));
4339
+ };
4340
+ imports.wbg.__wbg_next_020810e0ae8ebcb0 = function() {
4341
+ return handleError(function(arg0) {
4342
+ return arg0.next();
4343
+ }, arguments);
4344
+ };
4345
+ imports.wbg.__wbg_next_2c826fe5dfec6b6a = function(arg0) {
4346
+ return arg0.next;
4347
+ };
4348
+ imports.wbg.__wbg_now_793306c526e2e3b6 = function() {
4349
+ return Date.now();
4350
+ };
4351
+ imports.wbg.__wbg_of_288d2471f5767a12 = function(arg0, arg1) {
4352
+ return Array.of(arg0, arg1);
4353
+ };
4354
+ imports.wbg.__wbg_prototypesetcall_2a6620b6922694b2 = function(arg0, arg1, arg2) {
4355
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
4356
+ };
4357
+ imports.wbg.__wbg_push_df81a39d04db858c = function(arg0, arg1) {
4358
+ return arg0.push(arg1);
4359
+ };
4360
+ imports.wbg.__wbg_queueMicrotask_34d692c25c47d05b = function(arg0) {
4361
+ return arg0.queueMicrotask;
4362
+ };
4363
+ imports.wbg.__wbg_queueMicrotask_9d76cacb20c84d58 = function(arg0) {
4364
+ queueMicrotask(arg0);
4365
+ };
4366
+ imports.wbg.__wbg_reject_9d4761245c015a33 = function(arg0) {
4367
+ return Promise.reject(arg0);
4368
+ };
4369
+ imports.wbg.__wbg_resolve_caf97c30b83f7053 = function(arg0) {
4370
+ return Promise.resolve(arg0);
4371
+ };
4372
+ imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
4373
+ arg0[arg1] = arg2;
4374
+ };
4375
+ imports.wbg.__wbg_set_907fb406c34a251d = function(arg0, arg1, arg2) {
4376
+ return arg0.set(arg1, arg2);
4377
+ };
4378
+ imports.wbg.__wbg_set_c213c871859d6500 = function(arg0, arg1, arg2) {
4379
+ arg0[arg1 >>> 0] = arg2;
4380
+ };
4381
+ imports.wbg.__wbg_set_c2abbebe8b9ebee1 = function() {
4382
+ return handleError(function(arg0, arg1, arg2) {
4383
+ return Reflect.set(arg0, arg1, arg2);
4384
+ }, arguments);
4385
+ };
4386
+ imports.wbg.__wbg_shellcompletioncandidate_new = function(arg0) {
4387
+ return ShellCompletionCandidate.__wrap(arg0);
4388
+ };
4389
+ imports.wbg.__wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e = function() {
4390
+ const ret = typeof global === "undefined" ? null : global;
4391
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
4392
+ };
4393
+ imports.wbg.__wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac = function() {
4394
+ const ret = typeof globalThis === "undefined" ? null : globalThis;
4395
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
4396
+ };
4397
+ imports.wbg.__wbg_static_accessor_SELF_6fdf4b64710cc91b = function() {
4398
+ const ret = typeof self === "undefined" ? null : self;
4399
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
4400
+ };
4401
+ imports.wbg.__wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2 = function() {
4402
+ const ret = typeof window === "undefined" ? null : window;
4403
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
4404
+ };
4405
+ imports.wbg.__wbg_stringify_b5fb28f6465d9c3e = function() {
4406
+ return handleError(function(arg0) {
4407
+ return JSON.stringify(arg0);
4408
+ }, arguments);
4409
+ };
4410
+ imports.wbg.__wbg_then_4f46f6544e6b4a28 = function(arg0, arg1) {
4411
+ return arg0.then(arg1);
4412
+ };
4413
+ imports.wbg.__wbg_then_70d05cf780a18d77 = function(arg0, arg1, arg2) {
4414
+ return arg0.then(arg1, arg2);
4415
+ };
4416
+ imports.wbg.__wbg_toISOString_48d92f5754d01b49 = function(arg0) {
4417
+ return arg0.toISOString();
4418
+ };
4419
+ imports.wbg.__wbg_value_692627309814bb8c = function(arg0) {
4420
+ return arg0.value;
4421
+ };
4422
+ imports.wbg.__wbindgen_cast_0e05e56a777982dd = function(arg0, arg1) {
4423
+ return makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h74bdb7d22b702b82, wasm_bindgen__convert__closures_____invoke__ha7a2b373f2a9ce09);
4424
+ };
4425
+ imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
4426
+ return getStringFromWasm0(arg0, arg1);
4427
+ };
4428
+ imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
4429
+ return BigInt.asUintN(64, arg0);
4430
+ };
4431
+ imports.wbg.__wbindgen_cast_78cac990f1b79fcb = function(arg0, arg1) {
4432
+ return makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__he52a6c160ad8bcc6, wasm_bindgen__convert__closures_____invoke__hc9cbe033348e018d);
4433
+ };
4434
+ imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
4435
+ return arg0;
4436
+ };
4437
+ imports.wbg.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
4438
+ return getArrayU8FromWasm0(arg0, arg1);
4439
+ };
4440
+ imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
4441
+ return arg0;
4442
+ };
4443
+ imports.wbg.__wbindgen_init_externref_table = function() {
4444
+ const table = wasm.__wbindgen_externrefs;
4445
+ const offset = table.grow(4);
4446
+ table.set(0, void 0);
4447
+ table.set(offset + 0, void 0);
4448
+ table.set(offset + 1, null);
4449
+ table.set(offset + 2, true);
4450
+ table.set(offset + 3, false);
4451
+ };
4452
+ return imports;
4453
+ }
4454
+ function __wbg_finalize_init(instance, module) {
4455
+ wasm = instance.exports;
4456
+ __wbg_init.__wbindgen_wasm_module = module;
4457
+ cachedDataViewMemory0 = null;
4458
+ cachedUint32ArrayMemory0 = null;
4459
+ cachedUint8ArrayMemory0 = null;
4460
+ wasm.__wbindgen_start();
4461
+ return wasm;
4462
+ }
4463
+ function initSync(module) {
4464
+ if (wasm !== void 0) return wasm;
4465
+ if (typeof module !== "undefined") {
4466
+ if (Object.getPrototypeOf(module) === Object.prototype) ({module} = module);
4467
+ else console.warn("using deprecated parameters for `initSync()`; pass a single object instead");
4468
+ }
4469
+ const imports = __wbg_get_imports();
4470
+ if (!(module instanceof WebAssembly.Module)) module = new WebAssembly.Module(module);
4471
+ return __wbg_finalize_init(new WebAssembly.Instance(module, imports), module);
4472
+ }
4473
+ async function __wbg_init(module_or_path) {
4474
+ if (wasm !== void 0) return wasm;
4475
+ if (typeof module_or_path !== "undefined") {
4476
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) ({module_or_path} = module_or_path);
4477
+ else console.warn("using deprecated parameters for the initialization function; pass a single object instead");
4478
+ }
4479
+ if (typeof module_or_path === "undefined") module_or_path = new URL("dashql_core.wasm", import.meta.url);
4480
+ const imports = __wbg_get_imports();
4481
+ if (typeof module_or_path === "string" || typeof Request === "function" && module_or_path instanceof Request || typeof URL === "function" && module_or_path instanceof URL) module_or_path = fetch(module_or_path);
4482
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
4483
+ return __wbg_finalize_init(instance, module);
4484
+ }
4485
+ /** The URL of the module next to this glue */
4486
+ var wasmUrl = new URL("./dashql_core.wasm", import.meta.url);
4487
+ export { Catalog, CatalogUpdateTaskStatus, CatalogUpdateVariant, ConnectionHealth, ConnectionStatus, ConnectorType, QueryExecutionStatus, QueryProfile, QueryProgressFollower, QueryType, Runtime, Script, ScriptBatch, ScriptSession, SessionPlanRequest, Shell, ShellCompletionCandidate, ShellCompletionList, ShellOperation, ShellPromptResult, ShellTerminalResult, TableParameters, TaskStatus, WorkbookScriptSession, checkScriptReferences, collectSessionInputs, dashql_core_exports, __wbg_init as default, deriveSessionDataflow, initSync, inputLiteral, installPanicHook, planSession, processBatch, quoteColumnName, quoteIdentifier, replayQueryProgress, textChange, touchedRelations, wasmUrl };