@akohn/dashql 0.0.0-stage → 0.0.2-dev.17

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 (813) hide show
  1. package/LICENSE +373 -0
  2. package/NOTICE +66 -0
  3. package/README.md +154 -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 +21 -0
  692. package/dist/platform/session/agent_session_client.js +142 -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 +60 -0
  696. package/dist/platform/session/agent_session_state.js +100 -0
  697. package/dist/platform/session/workbook_journal.d.ts +77 -0
  698. package/dist/platform/session/workbook_journal.js +184 -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/script_compilation.d.ts +4 -0
  752. package/dist/platform/workbook/script_compilation.js +52 -0
  753. package/dist/platform/workbook/script_editor_state.d.ts +12 -0
  754. package/dist/platform/workbook/script_editor_state.js +0 -0
  755. package/dist/platform/workbook/script_reference_check.d.ts +27 -0
  756. package/dist/platform/workbook/script_reference_check.js +59 -0
  757. package/dist/platform/workbook/script_types.d.ts +53 -0
  758. package/dist/platform/workbook/script_types.js +21 -0
  759. package/dist/platform/workbook/workbook_attachments.d.ts +3 -0
  760. package/dist/platform/workbook/workbook_attachments.js +9 -0
  761. package/dist/platform/workbook/workbook_execution.d.ts +31 -0
  762. package/dist/platform/workbook/workbook_execution.js +28 -0
  763. package/dist/platform/workbook/workbook_inputs.d.ts +41 -0
  764. package/dist/platform/workbook/workbook_inputs.js +94 -0
  765. package/dist/platform/workbook/workbook_scripts.d.ts +58 -0
  766. package/dist/platform/workbook/workbook_scripts.js +21 -0
  767. package/dist/platform/workbook/workbook_zip.d.ts +5 -0
  768. package/dist/platform/workbook/workbook_zip.js +28 -0
  769. package/dist/runtime/compute_database.d.ts +18 -0
  770. package/dist/runtime/compute_database.js +56 -0
  771. package/dist/runtime/compute_platform.d.ts +5 -0
  772. package/dist/runtime/compute_platform.js +76 -0
  773. package/dist/runtime/embedded_session.d.ts +8 -0
  774. package/dist/runtime/embedded_session.js +23 -0
  775. package/dist/runtime/node/node_platform.d.ts +12 -0
  776. package/dist/runtime/node/node_platform.js +23 -0
  777. package/dist/runtime/platform_requests.d.ts +18 -0
  778. package/dist/runtime/platform_requests.js +104 -0
  779. package/dist/runtime/query/cache_pins.d.ts +8 -0
  780. package/dist/runtime/query/cache_pins.js +27 -0
  781. package/dist/runtime/query/query_channels.d.ts +34 -0
  782. package/dist/runtime/query/query_channels.js +250 -0
  783. package/dist/runtime/query/query_projection.d.ts +4 -0
  784. package/dist/runtime/query/query_projection.js +41 -0
  785. package/dist/runtime/query/query_result_stream.d.ts +15 -0
  786. package/dist/runtime/query/query_result_stream.js +100 -0
  787. package/dist/runtime/run_mounts.d.ts +6 -0
  788. package/dist/runtime/run_mounts.js +44 -0
  789. package/dist/runtime/runtime.d.ts +150 -0
  790. package/dist/runtime/runtime.js +429 -0
  791. package/dist/runtime/runtime_storage.d.ts +47 -0
  792. package/dist/runtime/runtime_storage.js +118 -0
  793. package/dist/runtime/store/handles.d.ts +30 -0
  794. package/dist/runtime/store/handles.js +46 -0
  795. package/dist/runtime/store/projection.d.ts +8 -0
  796. package/dist/runtime/store/projection.js +51 -0
  797. package/dist/runtime/store/runtime_store.d.ts +53 -0
  798. package/dist/runtime/store/runtime_store.js +195 -0
  799. package/dist/runtime/store/runtime_tables.d.ts +10 -0
  800. package/dist/runtime/store/runtime_tables.js +115 -0
  801. package/dist/runtime/store/update_scheduler.d.ts +6 -0
  802. package/dist/runtime/store/update_scheduler.js +7 -0
  803. package/dist/runtime/workbook_archives.d.ts +7 -0
  804. package/dist/runtime/workbook_archives.js +103 -0
  805. package/dist/runtime/workbook_projection.d.ts +28 -0
  806. package/dist/runtime/workbook_projection.js +178 -0
  807. package/dist/wasm/dashql_core.d.ts +4184 -0
  808. package/dist/wasm/dashql_core.js +4519 -0
  809. package/dist/wasm/dashql_core.wasm +0 -0
  810. package/dist/wasm/dashql_dataflow.d.ts +148 -0
  811. package/dist/wasm/dashql_dataflow.js +474 -0
  812. package/dist/wasm/dashql_dataflow.wasm +0 -0
  813. package/package.json +44 -4
@@ -0,0 +1,4519 @@
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
+ function getArrayU32FromWasm0(ptr, len) {
237
+ ptr = ptr >>> 0;
238
+ return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
239
+ }
240
+ /**
241
+ * The literal of the value of an input control, in the Hyper dialect: `sql_type` is the SQL text of the type of the
242
+ * input, `SqlType.sql`, absent without a type
243
+ * @param {string} value
244
+ * @param {string | null} [sql_type]
245
+ * @returns {string}
246
+ */
247
+ function inputLiteral(value, sql_type) {
248
+ let deferred4_0;
249
+ let deferred4_1;
250
+ try {
251
+ const ptr0 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
252
+ const len0 = WASM_VECTOR_LEN;
253
+ var ptr1 = isLikeNone(sql_type) ? 0 : passStringToWasm0(sql_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
254
+ var len1 = WASM_VECTOR_LEN;
255
+ const ret = wasm.inputLiteral(ptr0, len0, ptr1, len1);
256
+ var ptr3 = ret[0];
257
+ var len3 = ret[1];
258
+ if (ret[3]) {
259
+ ptr3 = 0;
260
+ len3 = 0;
261
+ throw takeFromExternrefTable0(ret[2]);
262
+ }
263
+ deferred4_0 = ptr3;
264
+ deferred4_1 = len3;
265
+ return getStringFromWasm0(ptr3, len3);
266
+ } finally {
267
+ wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
268
+ }
269
+ }
270
+ /**
271
+ * Process a batch request into a `BatchResult`
272
+ * @param {Uint8Array} request
273
+ * @returns {Uint8Array}
274
+ */
275
+ function processBatch(request) {
276
+ const ptr0 = passArray8ToWasm0(request, wasm.__wbindgen_malloc);
277
+ const len0 = WASM_VECTOR_LEN;
278
+ const ret = wasm.processBatch(ptr0, len0);
279
+ if (ret[3]) throw takeFromExternrefTable0(ret[2]);
280
+ var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
281
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
282
+ return v2;
283
+ }
284
+ /**
285
+ * Quote an identifier if it would not read back unquoted, e.g. the name of a script reference `:"foo-2"`
286
+ * @param {string} text
287
+ * @returns {string}
288
+ */
289
+ function quoteIdentifier(text) {
290
+ let deferred2_0;
291
+ let deferred2_1;
292
+ try {
293
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
294
+ const len0 = WASM_VECTOR_LEN;
295
+ const ret = wasm.quoteIdentifier(ptr0, len0);
296
+ deferred2_0 = ret[0];
297
+ deferred2_1 = ret[1];
298
+ return getStringFromWasm0(ret[0], ret[1]);
299
+ } finally {
300
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
301
+ }
302
+ }
303
+ /**
304
+ * The relations that the statements of a text create or drop, returns packed `TouchedRelations`
305
+ * @param {string} text
306
+ * @returns {Uint8Array}
307
+ */
308
+ function touchedRelations(text) {
309
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
310
+ const len0 = WASM_VECTOR_LEN;
311
+ const ret = wasm.touchedRelations(ptr0, len0);
312
+ var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
313
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
314
+ return v2;
315
+ }
316
+ /**
317
+ * Derive the dataflow of the scripts of a session (`dataflow::derive_session_dataflow`), returns the packed
318
+ * `SessionDataflow`. The text spans are in the offset unit of the session of each script.
319
+ * @param {SessionPlanRequest} request
320
+ * @returns {Uint8Array}
321
+ */
322
+ function deriveSessionDataflow(request) {
323
+ _assertClass(request, SessionPlanRequest);
324
+ const ret = wasm.deriveSessionDataflow(request.__wbg_ptr);
325
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
326
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
327
+ return v1;
328
+ }
329
+ /**
330
+ * Check the script references of the scripts of a session, returns the packed `ScriptReferenceCheck`. The text spans
331
+ * are in the offset unit of the session of each script. Ignores the targets, the materialized scripts and the mount
332
+ * prefix.
333
+ * @param {SessionPlanRequest} request
334
+ * @returns {Uint8Array}
335
+ */
336
+ function checkScriptReferences(request) {
337
+ _assertClass(request, SessionPlanRequest);
338
+ const ret = wasm.checkScriptReferences(request.__wbg_ptr);
339
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
340
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
341
+ return v1;
342
+ }
343
+ /**
344
+ * Report panics to `globalThis.__dashqlCorePanic` before the module traps.
345
+ *
346
+ * A panic aborts: the call traps without dropping its guards, so the objects it borrowed stay borrowed and the
347
+ * module must not be used anymore. JS sees only the trap, the hook tells it why.
348
+ */
349
+ function installPanicHook() {
350
+ wasm.installPanicHook();
351
+ }
352
+ /**
353
+ * Collect the inputs of the scripts of a session (`session_inputs::collect_session_inputs`), returns the packed
354
+ * `SessionInputs`. Ignores the targets, the materialized scripts and the mount prefix.
355
+ * @param {SessionPlanRequest} request
356
+ * @returns {Uint8Array}
357
+ */
358
+ function collectSessionInputs(request) {
359
+ _assertClass(request, SessionPlanRequest);
360
+ const ret = wasm.collectSessionInputs(request.__wbg_ptr);
361
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
362
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
363
+ return v1;
364
+ }
365
+ /**
366
+ * Plan the current analysis of the scripts of a session across connections, returns the packed `ExecutionGraph`
367
+ * @param {SessionPlanRequest} request
368
+ * @returns {Uint8Array}
369
+ */
370
+ function planSession(request) {
371
+ _assertClass(request, SessionPlanRequest);
372
+ const ret = wasm.planSession(request.__wbg_ptr);
373
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
374
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
375
+ return v1;
376
+ }
377
+ /**
378
+ * Quote a column name for a column reference in SQL text, also quotes keywords that are not unreserved, e.g. `"user"`
379
+ * @param {string} text
380
+ * @returns {string}
381
+ */
382
+ function quoteColumnName(text) {
383
+ let deferred2_0;
384
+ let deferred2_1;
385
+ try {
386
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
387
+ const len0 = WASM_VECTOR_LEN;
388
+ const ret = wasm.quoteColumnName(ptr0, len0);
389
+ deferred2_0 = ret[0];
390
+ deferred2_1 = ret[1];
391
+ return getStringFromWasm0(ret[0], ret[1]);
392
+ } finally {
393
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
394
+ }
395
+ }
396
+ /**
397
+ * The change from one text to another (`workbook::text_change`): the range between their common prefix and suffix, on
398
+ * character boundaries, its offsets in UTF-16 code units like those of the editors
399
+ * @param {string} from
400
+ * @param {string} to
401
+ * @returns {WorkbookTextChange}
402
+ */
403
+ function textChange(from, to) {
404
+ const ptr0 = passStringToWasm0(from, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
405
+ const len0 = WASM_VECTOR_LEN;
406
+ const ptr1 = passStringToWasm0(to, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
407
+ const len1 = WASM_VECTOR_LEN;
408
+ const ret = wasm.textChange(ptr0, len0, ptr1, len1);
409
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
410
+ return takeFromExternrefTable0(ret[0]);
411
+ }
412
+ function getArrayJsValueFromWasm0(ptr, len) {
413
+ ptr = ptr >>> 0;
414
+ const mem = getDataViewMemory0();
415
+ const result = [];
416
+ for (let i = ptr; i < ptr + 4 * len; i += 4) result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true)));
417
+ wasm.__externref_drop_slice(ptr, len);
418
+ return result;
419
+ }
420
+ /**
421
+ * Replay a recording of the progress of a query (JSON, see `ProfileRecording`) up to a point in time in milliseconds
422
+ * since its first payload, with a layout of the plan or the default one. None if nothing happened until then.
423
+ * @param {string} recording
424
+ * @param {number} until_ms
425
+ * @param {ProfileLayoutView | null} [layout]
426
+ * @returns {QueryProfileProgressView | undefined}
427
+ */
428
+ function replayQueryProgress(recording, until_ms, layout) {
429
+ const ptr0 = passStringToWasm0(recording, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
430
+ const len0 = WASM_VECTOR_LEN;
431
+ const ret = wasm.replayQueryProgress(ptr0, len0, until_ms, isLikeNone(layout) ? 0 : addToExternrefTable0(layout));
432
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
433
+ return takeFromExternrefTable0(ret[0]);
434
+ }
435
+ function wasm_bindgen__convert__closures_____invoke__hc9cbe033348e018d(arg0, arg1, arg2) {
436
+ wasm.wasm_bindgen__convert__closures_____invoke__hc9cbe033348e018d(arg0, arg1, arg2);
437
+ }
438
+ function wasm_bindgen__convert__closures_____invoke__ha7a2b373f2a9ce09(arg0, arg1, arg2) {
439
+ return wasm.wasm_bindgen__convert__closures_____invoke__ha7a2b373f2a9ce09(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
+ * Add a result of a key to the query result cache, e.g. one that a run of the command line tool wrote, from a file of
1594
+ * the handle table that the caller keeps and releases. A key that is cached already keeps its files. An added file
1595
+ * is followed by the eviction of a written one, and the workbooks look up the cached results of their scripts
1596
+ * again. Resolves whether the file was added.
1597
+ * @param {string} key
1598
+ * @param {number} file
1599
+ * @returns {Promise<boolean>}
1600
+ */
1601
+ importCachedResult(key, file) {
1602
+ const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1603
+ const len0 = WASM_VECTOR_LEN;
1604
+ const ret = wasm.runtime_importCachedResult(this.__wbg_ptr, ptr0, len0, file);
1605
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1606
+ return takeFromExternrefTable0(ret[0]);
1607
+ }
1608
+ /**
1609
+ * Is the analysis of a script outdated, also by a change that the workbook missed?
1610
+ * @param {number} script_key
1611
+ * @returns {boolean}
1612
+ */
1613
+ isAnalysisOutdated(script_key) {
1614
+ return wasm.runtime_isAnalysisOutdated(this.__wbg_ptr, script_key) !== 0;
1615
+ }
1616
+ /**
1617
+ * Follow the progress of a query with the layout of a follower, none without structured progress. The structure
1618
+ * crosses only when its version differs from the one that the host holds.
1619
+ * @param {number} query_id
1620
+ * @param {QueryProgressFollower} follower
1621
+ * @param {QueryProfileKeys | null} [known]
1622
+ * @returns {QueryProfileProgressView | undefined}
1623
+ */
1624
+ followQueryProgress(query_id, follower, known) {
1625
+ _assertClass(follower, QueryProgressFollower);
1626
+ const ret = wasm.runtime_followQueryProgress(this.__wbg_ptr, query_id, follower.__wbg_ptr, isLikeNone(known) ? 0 : addToExternrefTable0(known));
1627
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1628
+ return takeFromExternrefTable0(ret[0]);
1629
+ }
1630
+ /**
1631
+ * Answer the question about a workbook that changed outside the app: `true` reloads it from disk, `false` keeps the
1632
+ * version of the app and writes it over the disk, `null` gives no answer, e.g. when the question failed. The
1633
+ * answer to an older question is ignored.
1634
+ * @param {string} workbook_id
1635
+ * @param {number} prompt
1636
+ * @param {boolean | null} [reload]
1637
+ */
1638
+ answerExternalChange(workbook_id, prompt, reload) {
1639
+ const ptr0 = passStringToWasm0(workbook_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1640
+ const len0 = WASM_VECTOR_LEN;
1641
+ wasm.runtime_answerExternalChange(this.__wbg_ptr, ptr0, len0, prompt, isLikeNone(reload) ? 16777215 : reload ? 1 : 0);
1642
+ }
1643
+ /**
1644
+ * Check the folders of workbooks that the platform keeps in folders of their own for changes outside the app, e.g.
1645
+ * when the window gets the focus. The checks run one at a time after the ones that are queued. A change of the
1646
+ * scripts asks the question of the `storage` view (`externalChanges`), see `answerExternalChange`.
1647
+ * @param {string[]} workbook_ids
1648
+ */
1649
+ checkWorkbookFolders(workbook_ids) {
1650
+ const ptr0 = passArrayJsValueToWasm0(workbook_ids, wasm.__wbindgen_malloc);
1651
+ const len0 = WASM_VECTOR_LEN;
1652
+ wasm.runtime_checkWorkbookFolders(this.__wbg_ptr, ptr0, len0);
1653
+ }
1654
+ /**
1655
+ * Does storage hold the scripts of a workbook as they are: the same files in the same order, on the same
1656
+ * connections, with the same texts?
1657
+ * @param {string} workbook_id
1658
+ * @param {StoredScriptView[]} scripts
1659
+ * @returns {boolean}
1660
+ */
1661
+ matchesStoredScripts(workbook_id, scripts) {
1662
+ const ptr0 = passStringToWasm0(workbook_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1663
+ const len0 = WASM_VECTOR_LEN;
1664
+ const ptr1 = passArrayJsValueToWasm0(scripts, wasm.__wbindgen_malloc);
1665
+ const len1 = WASM_VECTOR_LEN;
1666
+ const ret = wasm.runtime_matchesStoredScripts(this.__wbg_ptr, ptr0, len0, ptr1, len1);
1667
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1668
+ return ret[0] !== 0;
1669
+ }
1670
+ /**
1671
+ * Set up the connections of a workbook that the app opens and that need nothing of the user: the embedded Hyper
1672
+ * and the Hyper of a link once the tab holds its token. Every connection is considered once, the app calls it
1673
+ * again when the workbook or the tokens of the links change.
1674
+ * @param {string} workbook_id
1675
+ */
1676
+ setUpOpenedWorkbook(workbook_id) {
1677
+ const ptr0 = passStringToWasm0(workbook_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1678
+ const len0 = WASM_VECTOR_LEN;
1679
+ wasm.runtime_setUpOpenedWorkbook(this.__wbg_ptr, ptr0, len0);
1680
+ }
1681
+ /**
1682
+ * Discard the writes of keys and their failures, e.g. a write that failed because its workbook folder is gone. The
1683
+ * writes that waited for them run.
1684
+ * @param {string[]} keys
1685
+ */
1686
+ storageDiscardWrites(keys) {
1687
+ const ptr0 = passArrayJsValueToWasm0(keys, wasm.__wbindgen_malloc);
1688
+ const len0 = WASM_VECTOR_LEN;
1689
+ wasm.runtime_storageDiscardWrites(this.__wbg_ptr, ptr0, len0);
1690
+ }
1691
+ /**
1692
+ * Give the table parameters of a workbook to a session that is no script of it, e.g. the draft of the composer.
1693
+ * Returns whether the analysis of the session is outdated by them.
1694
+ * @param {string} workbook_id
1695
+ * @param {ScriptSession} session
1696
+ * @returns {boolean}
1697
+ */
1698
+ attachTableParameters(workbook_id, session) {
1699
+ const ptr0 = passStringToWasm0(workbook_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1700
+ const len0 = WASM_VECTOR_LEN;
1701
+ _assertClass(session, ScriptSession);
1702
+ const ret = wasm.runtime_attachTableParameters(this.__wbg_ptr, ptr0, len0, session.__wbg_ptr);
1703
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1704
+ return ret[0] !== 0;
1705
+ }
1706
+ /**
1707
+ * Log in to Salesforce with the params of the connector, without a connection, e.g. the login of the shell. The
1708
+ * names of the steps go to the listener (`LoginStep`, e.g. `REQUESTING_CORE_AUTH_TOKEN`), never a code or a token;
1709
+ * `cancelSetup` with the id stops the login. The outcome of a success has the tokens and the user.
1710
+ * @param {string} setup_id
1711
+ * @param {any} params
1712
+ * @param {SetupOptions | null | undefined} options
1713
+ * @param {((step: string) => void) | null} events
1714
+ * @returns {Promise<SetupOutcome>}
1715
+ */
1716
+ authenticateSalesforce(setup_id, params, options, events) {
1717
+ const ptr0 = passStringToWasm0(setup_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1718
+ const len0 = WASM_VECTOR_LEN;
1719
+ const ret = wasm.runtime_authenticateSalesforce(this.__wbg_ptr, ptr0, len0, params, isLikeNone(options) ? 0 : addToExternrefTable0(options), events);
1720
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1721
+ return takeFromExternrefTable0(ret[0]);
1722
+ }
1723
+ /**
1724
+ * Delete the files of a workbook that was refused a load and drop it from the list
1725
+ * @param {string} workbook_id
1726
+ * @returns {Promise<void>}
1727
+ */
1728
+ deleteInvalidWorkbook(workbook_id) {
1729
+ const ptr0 = passStringToWasm0(workbook_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1730
+ const len0 = WASM_VECTOR_LEN;
1731
+ return wasm.runtime_deleteInvalidWorkbook(this.__wbg_ptr, ptr0, len0);
1732
+ }
1733
+ /**
1734
+ * Bring the folder of a workbook that the platform keeps in a folder of its own (`storage.workbookFolder`) to the
1735
+ * current workbook format, e.g. the folder of a run of the command line tool before it reads the workbook id.
1736
+ * Resolves with the outcome (`current`, `migrated`, `missing`, `unsupported`, `newer`), null for a workbook of the
1737
+ * storage root. The restore migrates the folder of a workbook itself.
1738
+ * @param {string} workbook_id
1739
+ * @returns {Promise<'current' | 'migrated' | 'missing' | 'unsupported' | 'newer' | null>}
1740
+ */
1741
+ migrateWorkbookFolder(workbook_id) {
1742
+ const ptr0 = passStringToWasm0(workbook_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1743
+ const len0 = WASM_VECTOR_LEN;
1744
+ return wasm.runtime_migrateWorkbookFolder(this.__wbg_ptr, ptr0, len0);
1745
+ }
1746
+ /**
1747
+ * The auth of a connection as it goes with its requests, for a process that sends the requests of the connection
1748
+ * for another one, e.g. the relay of `dashql connect`: the auth headers by the origin of the endpoints, with
1749
+ * tokens that are refreshed first if they are about to expire, the account and the stand-in responses of the
1750
+ * token requests of the login. Null for a connection without a channel of Trino or Salesforce or with a Trino
1751
+ * channel that has no token yet, rejects when the refresh fails.
1752
+ * @param {string} connection_id
1753
+ * @returns {Promise<ConnectionAuthorization | null>}
1754
+ */
1755
+ connectionAuthorization(connection_id) {
1756
+ const ptr0 = passStringToWasm0(connection_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1757
+ const len0 = WASM_VECTOR_LEN;
1758
+ const ret = wasm.runtime_connectionAuthorization(this.__wbg_ptr, ptr0, len0);
1759
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1760
+ return takeFromExternrefTable0(ret[0]);
1761
+ }
1762
+ /**
1763
+ * The recording of the progress of a query as JSON, none without structured progress
1764
+ * @param {number} query_id
1765
+ * @returns {string | undefined}
1766
+ */
1767
+ queryProgressRecording(query_id) {
1768
+ const ret = wasm.runtime_queryProgressRecording(this.__wbg_ptr, query_id);
1769
+ if (ret[3]) throw takeFromExternrefTable0(ret[2]);
1770
+ let v1;
1771
+ if (ret[0] !== 0) {
1772
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
1773
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
1774
+ }
1775
+ return v1;
1776
+ }
1777
+ /**
1778
+ * The params of a new connection of a connector, e.g. `{"trino": {...}}`
1779
+ * @param {ConnectorType} connector
1780
+ * @returns {Record<string, unknown>}
1781
+ */
1782
+ static defaultConnectionParams(connector) {
1783
+ const ret = wasm.runtime_defaultConnectionParams(connector);
1784
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1785
+ return takeFromExternrefTable0(ret[0]);
1786
+ }
1787
+ /**
1788
+ * The tokens of a connection as their JSON, e.g. for the settings of a connection that show them on request. The
1789
+ * views only summarize them. Null without the connection.
1790
+ * @param {string} connection_id
1791
+ * @returns {ConnectionSecrets | null}
1792
+ */
1793
+ revealConnectionSecrets(connection_id) {
1794
+ const ptr0 = passStringToWasm0(connection_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1795
+ const len0 = WASM_VECTOR_LEN;
1796
+ const ret = wasm.runtime_revealConnectionSecrets(this.__wbg_ptr, ptr0, len0);
1797
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1798
+ return takeFromExternrefTable0(ret[0]);
1799
+ }
1800
+ /**
1801
+ * Connection params without their secrets, as a link or a file shares them: the identity stays, the login hint only
1802
+ * `withLoginHint`, the raw form rows of a draft go. Params of an unknown connector stay as they are.
1803
+ * @param {Record<string, unknown>} params
1804
+ * @param {boolean} with_login_hint
1805
+ * @returns {Record<string, unknown>}
1806
+ */
1807
+ static sanitizeConnectionParams(params, with_login_hint) {
1808
+ const ret = wasm.runtime_sanitizeConnectionParams(params, with_login_hint);
1809
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1810
+ return takeFromExternrefTable0(ret[0]);
1811
+ }
1812
+ /**
1813
+ * The database that the catalog of a Salesforce connection names its relations with, also the alias of the Hyper
1814
+ * Cloud database of a Database.com connection
1815
+ * @returns {string}
1816
+ */
1817
+ static salesforceCatalogDatabase() {
1818
+ let deferred1_0;
1819
+ let deferred1_1;
1820
+ try {
1821
+ const ret = wasm.runtime_salesforceCatalogDatabase();
1822
+ deferred1_0 = ret[0];
1823
+ deferred1_1 = ret[1];
1824
+ return getStringFromWasm0(ret[0], ret[1]);
1825
+ } finally {
1826
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1827
+ }
1828
+ }
1829
+ /**
1830
+ * The login hint of connection params (the account username or login), null if there is none. Fails on params of
1831
+ * an unknown connector.
1832
+ * @param {Record<string, unknown>} params
1833
+ * @returns {string | undefined}
1834
+ */
1835
+ static connectionParamsLoginHint(params) {
1836
+ const ret = wasm.runtime_connectionParamsLoginHint(params);
1837
+ if (ret[3]) throw takeFromExternrefTable0(ret[2]);
1838
+ let v1;
1839
+ if (ret[0] !== 0) {
1840
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
1841
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
1842
+ }
1843
+ return v1;
1844
+ }
1845
+ /**
1846
+ * Do two connection params describe the same connection, ignoring everything that sharing strips? A shared
1847
+ * workbook carries the params without secrets and login hints, they still describe the connection of the full
1848
+ * params.
1849
+ * @param {Record<string, unknown>} left
1850
+ * @param {Record<string, unknown>} right
1851
+ * @returns {boolean}
1852
+ */
1853
+ static connectionParamsShareEqual(left, right) {
1854
+ return wasm.runtime_connectionParamsShareEqual(left, right) !== 0;
1855
+ }
1856
+ /**
1857
+ * The Hyper Cloud database of a Database.com connection that names none
1858
+ * @returns {string}
1859
+ */
1860
+ static hyperCloudDefaultDatabaseName() {
1861
+ let deferred1_0;
1862
+ let deferred1_1;
1863
+ try {
1864
+ const ret = wasm.runtime_hyperCloudDefaultDatabaseName();
1865
+ deferred1_0 = ret[0];
1866
+ deferred1_1 = ret[1];
1867
+ return getStringFromWasm0(ret[0], ret[1]);
1868
+ } finally {
1869
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1870
+ }
1871
+ }
1872
+ /**
1873
+ * Connection params without the raw form rows, they belong only to the local draft. Fails on params of an unknown
1874
+ * connector.
1875
+ * @param {Record<string, unknown>} params
1876
+ * @returns {Record<string, unknown>}
1877
+ */
1878
+ static connectionParamsWithoutDraftRows(params) {
1879
+ const ret = wasm.runtime_connectionParamsWithoutDraftRows(params);
1880
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1881
+ return takeFromExternrefTable0(ret[0]);
1882
+ }
1883
+ /**
1884
+ * The views of slices, see the declaration of `views` in `RuntimeViews`. A slice that is busy reads as `'busy'` and
1885
+ * moves with the next changes, the host keeps its previous view.
1886
+ * @param {string} kind
1887
+ * @param {any} ids
1888
+ * @param {any} known
1889
+ * @returns {any}
1890
+ */
1891
+ views(kind, ids, known) {
1892
+ const ptr0 = passStringToWasm0(kind, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1893
+ const len0 = WASM_VECTOR_LEN;
1894
+ const ret = wasm.runtime_views(this.__wbg_ptr, ptr0, len0, ids, known);
1895
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1896
+ return takeFromExternrefTable0(ret[0]);
1897
+ }
1898
+ /**
1899
+ * A runtime on a platform
1900
+ * @param {RuntimePlatform} platform
1901
+ * @returns {Runtime}
1902
+ */
1903
+ static create(platform) {
1904
+ const ret = wasm.runtime_create(platform);
1905
+ return Runtime.__wrap(ret);
1906
+ }
1907
+ /**
1908
+ * The host failed to project slices of a kind, e.g. a projection threw: they move with the next changes, also if
1909
+ * their views didn't change, and the host is told
1910
+ * @param {ViewKind} kind
1911
+ * @param {(string | number)[]} ids
1912
+ */
1913
+ resync(kind, ids) {
1914
+ const ptr0 = passStringToWasm0(kind, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1915
+ const len0 = WASM_VECTOR_LEN;
1916
+ const ret = wasm.runtime_resync(this.__wbg_ptr, ptr0, len0, ids);
1917
+ if (ret[1]) throw takeFromExternrefTable0(ret[0]);
1918
+ }
1919
+ /**
1920
+ * The catalog of a connection, shared with the connection and the scripts that analyze with it. The handle reads
1921
+ * only: the catalog changes through the runtime, which tells the scripts on it. None for an unknown connection.
1922
+ * The identity of the catalog is `catalogId` of the view of the connection.
1923
+ * @param {string} connection_id
1924
+ * @returns {Catalog | undefined}
1925
+ */
1926
+ catalog(connection_id) {
1927
+ const ptr0 = passStringToWasm0(connection_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1928
+ const len0 = WASM_VECTOR_LEN;
1929
+ const ret = wasm.runtime_catalog(this.__wbg_ptr, ptr0, len0);
1930
+ return ret === 0 ? void 0 : Catalog.__wrap(ret);
1931
+ }
1932
+ /**
1933
+ * Restore the connections of the app manifest and the workbooks of the workbook tree of the storage of the
1934
+ * platform. The runtime takes them, the writes after the restore go through its writer. The listener hears the
1935
+ * progress. Resolves with what was restored, the workbooks that were refused a load are in the list of the
1936
+ * workbooks.
1937
+ * @param {((progress: RestoreProgress) => void) | null} progress
1938
+ * @returns {Promise<RestoreOutcome>}
1939
+ */
1940
+ restore(progress) {
1941
+ const ret = wasm.runtime_restore(this.__wbg_ptr, progress);
1942
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1943
+ return takeFromExternrefTable0(ret[0]);
1944
+ }
1945
+ /**
1946
+ * Apply an action to a slice. Never throws: a malformed target or action and a refused action are failed outcomes,
1947
+ * logged as warnings.
1948
+ * @param {Target} target
1949
+ * @param {RuntimeAction} action
1950
+ * @returns {DispatchOutcome}
1951
+ */
1952
+ dispatch(target, action) {
1953
+ return wasm.runtime_dispatch(this.__wbg_ptr, target, action);
1954
+ }
1955
+ /**
1956
+ * Shut the runtime down, in this order: the runs stop, the catalog loader stops, the writes into the query result
1957
+ * cache and the pending writes of the storage finish, then the imports are dropped, the setups and the queries are
1958
+ * cancelled and the computations go, their runs cancelled and their tables released with the next changes.
1959
+ * Resolves once that is done; from then on the runtime calls the platform no more, a task that is still running
1960
+ * fails at its next call. The host takes the last changes and frees the runtime with `free()`.
1961
+ * @returns {Promise<void>}
1962
+ */
1963
+ shutdown() {
1964
+ return wasm.runtime_shutdown(this.__wbg_ptr);
1965
+ }
1966
+ /**
1967
+ * Stop the run of a workbook, the running statements are cancelled
1968
+ * @param {string} workbook_id
1969
+ */
1970
+ stopRun(workbook_id) {
1971
+ const ptr0 = passStringToWasm0(workbook_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1972
+ const len0 = WASM_VECTOR_LEN;
1973
+ wasm.runtime_stopRun(this.__wbg_ptr, ptr0, len0);
1974
+ }
1975
+ /**
1976
+ * Tests of the seam: call a function while a part of the state is borrowed, as a task of the runtime would hold it.
1977
+ * The function may take the changes and read the views. The parts: `workbook:<id>`, `connection:<id>` (its state),
1978
+ * `queries:<connection id>` (its history), `registry`, `workbooks`, `scriptIndex`, `computations`, `runs`,
1979
+ * `storage`.
1980
+ * @param {string} part
1981
+ * @param {Function} f
1982
+ * @returns {any}
1983
+ */
1984
+ testHold(part, f) {
1985
+ const ptr0 = passStringToWasm0(part, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1986
+ const len0 = WASM_VECTOR_LEN;
1987
+ const ret = wasm.runtime_testHold(this.__wbg_ptr, ptr0, len0, f);
1988
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
1989
+ return takeFromExternrefTable0(ret[0]);
1990
+ }
1991
+ /**
1992
+ * Lease a connection for a session of the host, a later lease takes the connection over. Returns the lease that
1993
+ * `closeSession` takes.
1994
+ * @param {string} connection_id
1995
+ * @returns {number}
1996
+ */
1997
+ openSession(connection_id) {
1998
+ const ptr0 = passStringToWasm0(connection_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1999
+ const len0 = WASM_VECTOR_LEN;
2000
+ return wasm.runtime_openSession(this.__wbg_ptr, ptr0, len0) >>> 0;
2001
+ }
2002
+ /**
2003
+ * Close a session of the host: the latest lease of the connection resets it, its channel closes the session. The
2004
+ * runtime keeps the connection, a later session sets it up again. An earlier lease changes nothing.
2005
+ * @param {string} connection_id
2006
+ * @param {number} lease
2007
+ */
2008
+ closeSession(connection_id, lease) {
2009
+ const ptr0 = passStringToWasm0(connection_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2010
+ const len0 = WASM_VECTOR_LEN;
2011
+ wasm.runtime_closeSession(this.__wbg_ptr, ptr0, len0, lease);
2012
+ }
2013
+ /**
2014
+ * Resolve once the catalog of a connection settled: no update runs and every relation that statements touched is
2015
+ * answered, e.g. after a statement of the shell. Resolves after the timeout as well (10 s by default), and at once
2016
+ * for an unknown connection: a catalog that doesn't follow never fails a statement.
2017
+ * @param {string} connection_id
2018
+ * @param {number | null} [timeout_ms]
2019
+ * @returns {Promise<void>}
2020
+ */
2021
+ settleCatalog(connection_id, timeout_ms) {
2022
+ const ptr0 = passStringToWasm0(connection_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2023
+ const len0 = WASM_VECTOR_LEN;
2024
+ return wasm.runtime_settleCatalog(this.__wbg_ptr, ptr0, len0, !isLikeNone(timeout_ms), isLikeNone(timeout_ms) ? 0 : timeout_ms);
2025
+ }
2026
+ };
2027
+ if (Symbol.dispose) Runtime.prototype[Symbol.dispose] = Runtime.prototype.free;
2028
+ var ScriptFinalization = typeof FinalizationRegistry === "undefined" ? {
2029
+ register: () => {},
2030
+ unregister: () => {}
2031
+ } : new FinalizationRegistry((ptr) => wasm.__wbg_script_free(ptr >>> 0, 1));
2032
+ /**
2033
+ * A script (`dashql_script_*`)
2034
+ */
2035
+ var Script = class Script {
2036
+ static __wrap(ptr) {
2037
+ ptr = ptr >>> 0;
2038
+ const obj = Object.create(Script.prototype);
2039
+ obj.__wbg_ptr = ptr;
2040
+ ScriptFinalization.register(obj, obj.__wbg_ptr, obj);
2041
+ return obj;
2042
+ }
2043
+ __destroy_into_raw() {
2044
+ const ptr = this.__wbg_ptr;
2045
+ this.__wbg_ptr = 0;
2046
+ ScriptFinalization.unregister(this);
2047
+ return ptr;
2048
+ }
2049
+ free() {
2050
+ const ptr = this.__destroy_into_raw();
2051
+ wasm.__wbg_script_free(ptr, 0);
2052
+ }
2053
+ /**
2054
+ * The packed `ParsedScript`
2055
+ * @returns {Uint8Array}
2056
+ */
2057
+ getParsed() {
2058
+ const ret = wasm.script_getParsed(this.__wbg_ptr);
2059
+ if (ret[3]) throw takeFromExternrefTable0(ret[2]);
2060
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
2061
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
2062
+ return v1;
2063
+ }
2064
+ /**
2065
+ * Format the script into a new script of another catalog
2066
+ * @param {number} dialect
2067
+ * @param {number} mode
2068
+ * @param {number} max_width
2069
+ * @param {number} indentation_width
2070
+ * @param {boolean} debug_mode
2071
+ * @param {number} keyword_case
2072
+ * @param {boolean} parse_if_outdated
2073
+ * @param {Catalog} catalog
2074
+ * @returns {Script}
2075
+ */
2076
+ formatInto(dialect, mode, max_width, indentation_width, debug_mode, keyword_case, parse_if_outdated, catalog) {
2077
+ _assertClass(catalog, Catalog);
2078
+ const ret = wasm.script_formatInto(this.__wbg_ptr, dialect, mode, max_width, indentation_width, debug_mode, keyword_case, parse_if_outdated, catalog.__wbg_ptr);
2079
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
2080
+ return Script.__wrap(ret[0]);
2081
+ }
2082
+ /**
2083
+ * Move the cursor, returns the packed `ScriptCursor`
2084
+ * @param {number} offset
2085
+ * @returns {Uint8Array}
2086
+ */
2087
+ moveCursor(offset) {
2088
+ const ret = wasm.script_moveCursor(this.__wbg_ptr, offset);
2089
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
2090
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
2091
+ return v1;
2092
+ }
2093
+ /**
2094
+ * The packed `ScriptDiff` from this script to a target script
2095
+ * @param {Script} target
2096
+ * @returns {Uint8Array}
2097
+ */
2098
+ computeDiff(target) {
2099
+ _assertClass(target, Script);
2100
+ const ret = wasm.script_computeDiff(this.__wbg_ptr, target.__wbg_ptr);
2101
+ if (ret[3]) throw takeFromExternrefTable0(ret[2]);
2102
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
2103
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
2104
+ return v1;
2105
+ }
2106
+ /**
2107
+ * The packed `AnalyzedScript`
2108
+ * @returns {Uint8Array}
2109
+ */
2110
+ getAnalyzed() {
2111
+ const ret = wasm.script_getAnalyzed(this.__wbg_ptr);
2112
+ if (ret[3]) throw takeFromExternrefTable0(ret[2]);
2113
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
2114
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
2115
+ return v1;
2116
+ }
2117
+ /**
2118
+ * @param {string} text
2119
+ */
2120
+ replaceText(text) {
2121
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2122
+ const len0 = WASM_VECTOR_LEN;
2123
+ wasm.script_replaceText(this.__wbg_ptr, ptr0, len0);
2124
+ }
2125
+ /**
2126
+ * Compile the script into the packed `ScriptCompilationResult`
2127
+ * @param {number} dialect
2128
+ * @param {number} mode
2129
+ * @param {number} max_width
2130
+ * @param {number} indentation_width
2131
+ * @param {boolean} allow_extensions
2132
+ * @param {boolean} parse_if_outdated
2133
+ * @returns {Uint8Array}
2134
+ */
2135
+ compileQuery(dialect, mode, max_width, indentation_width, allow_extensions, parse_if_outdated) {
2136
+ const ret = wasm.script_compileQuery(this.__wbg_ptr, dialect, mode, max_width, indentation_width, allow_extensions, parse_if_outdated);
2137
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
2138
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
2139
+ return v1;
2140
+ }
2141
+ /**
2142
+ * The packed `ScriptStatistics`
2143
+ * @returns {Uint8Array}
2144
+ */
2145
+ getStatistics() {
2146
+ const ret = wasm.script_getStatistics(this.__wbg_ptr);
2147
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
2148
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
2149
+ return v1;
2150
+ }
2151
+ /**
2152
+ * Insert text at a code point offset
2153
+ * @param {number} offset
2154
+ * @param {string} text
2155
+ */
2156
+ insertTextAt(offset, text) {
2157
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2158
+ const len0 = WASM_VECTOR_LEN;
2159
+ wasm.script_insertTextAt(this.__wbg_ptr, offset, ptr0, len0);
2160
+ }
2161
+ /**
2162
+ * The annotation of a statement as JSON, `{"preamble": [...], "tags": [{"name": ..., "lines": [...]}]}`
2163
+ * @param {number} statement_id
2164
+ * @param {boolean} parse_if_outdated
2165
+ * @returns {string}
2166
+ */
2167
+ readAnnotation(statement_id, parse_if_outdated) {
2168
+ let deferred2_0;
2169
+ let deferred2_1;
2170
+ try {
2171
+ const ret = wasm.script_readAnnotation(this.__wbg_ptr, statement_id, parse_if_outdated);
2172
+ var ptr1 = ret[0];
2173
+ var len1 = ret[1];
2174
+ if (ret[3]) {
2175
+ ptr1 = 0;
2176
+ len1 = 0;
2177
+ throw takeFromExternrefTable0(ret[2]);
2178
+ }
2179
+ deferred2_0 = ptr1;
2180
+ deferred2_1 = len1;
2181
+ return getStringFromWasm0(ptr1, len1);
2182
+ } finally {
2183
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
2184
+ }
2185
+ }
2186
+ /**
2187
+ * @returns {number}
2188
+ */
2189
+ catalogEntryId() {
2190
+ return wasm.script_catalogEntryId(this.__wbg_ptr) >>> 0;
2191
+ }
2192
+ /**
2193
+ * Erase a code point range
2194
+ * @param {number} offset
2195
+ * @param {number} count
2196
+ */
2197
+ eraseTextRange(offset, count) {
2198
+ wasm.script_eraseTextRange(this.__wbg_ptr, offset, count);
2199
+ }
2200
+ /**
2201
+ * Visualize the terminal query with a Vega-Lite spec in the text of the script, returns the UTF-8 offset
2202
+ * and length of the written tag
2203
+ * @param {string} spec
2204
+ * @param {boolean} parse_if_outdated
2205
+ * @returns {Uint32Array}
2206
+ */
2207
+ rewriteVegaLite(spec, parse_if_outdated) {
2208
+ const ptr0 = passStringToWasm0(spec, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2209
+ const len0 = WASM_VECTOR_LEN;
2210
+ const ret = wasm.script_rewriteVegaLite(this.__wbg_ptr, ptr0, len0, parse_if_outdated);
2211
+ if (ret[3]) throw takeFromExternrefTable0(ret[2]);
2212
+ var v2 = getArrayU32FromWasm0(ret[0], ret[1]).slice();
2213
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
2214
+ return v2;
2215
+ }
2216
+ /**
2217
+ * Complete at the cursor, returns the packed `Completion`
2218
+ * @param {number} limit
2219
+ * @param {number} keyword_case
2220
+ * @returns {Uint8Array}
2221
+ */
2222
+ completeAtCursor(limit, keyword_case) {
2223
+ const ret = wasm.script_completeAtCursor(this.__wbg_ptr, limit, keyword_case);
2224
+ if (ret[3]) throw takeFromExternrefTable0(ret[2]);
2225
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
2226
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
2227
+ return v1;
2228
+ }
2229
+ /**
2230
+ * The first parsed statement without its separator or surrounding trivia
2231
+ * @param {boolean} parse_if_outdated
2232
+ * @returns {string}
2233
+ */
2234
+ getStatementText(parse_if_outdated) {
2235
+ let deferred2_0;
2236
+ let deferred2_1;
2237
+ try {
2238
+ const ret = wasm.script_getStatementText(this.__wbg_ptr, parse_if_outdated);
2239
+ var ptr1 = ret[0];
2240
+ var len1 = ret[1];
2241
+ if (ret[3]) {
2242
+ ptr1 = 0;
2243
+ len1 = 0;
2244
+ throw takeFromExternrefTable0(ret[2]);
2245
+ }
2246
+ deferred2_0 = ptr1;
2247
+ deferred2_1 = len1;
2248
+ return getStringFromWasm0(ptr1, len1);
2249
+ } finally {
2250
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
2251
+ }
2252
+ }
2253
+ /**
2254
+ * Replace the annotation of a statement, given as JSON like `readAnnotation` returns it. Returns the new
2255
+ * text, the script is not changed.
2256
+ * @param {number} statement_id
2257
+ * @param {string} annotation
2258
+ * @param {boolean} parse_if_outdated
2259
+ * @returns {string}
2260
+ */
2261
+ rewriteAnnotation(statement_id, annotation, parse_if_outdated) {
2262
+ let deferred3_0;
2263
+ let deferred3_1;
2264
+ try {
2265
+ const ptr0 = passStringToWasm0(annotation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2266
+ const len0 = WASM_VECTOR_LEN;
2267
+ const ret = wasm.script_rewriteAnnotation(this.__wbg_ptr, statement_id, ptr0, len0, parse_if_outdated);
2268
+ var ptr2 = ret[0];
2269
+ var len2 = ret[1];
2270
+ if (ret[3]) {
2271
+ ptr2 = 0;
2272
+ len2 = 0;
2273
+ throw takeFromExternrefTable0(ret[2]);
2274
+ }
2275
+ deferred3_0 = ptr2;
2276
+ deferred3_1 = len2;
2277
+ return getStringFromWasm0(ptr2, len2);
2278
+ } finally {
2279
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
2280
+ }
2281
+ }
2282
+ /**
2283
+ * Can formatting represent every node?
2284
+ * @param {number} dialect
2285
+ * @param {number} mode
2286
+ * @param {number} max_width
2287
+ * @param {number} indentation_width
2288
+ * @param {boolean} debug_mode
2289
+ * @param {boolean} parse_if_outdated
2290
+ * @returns {boolean}
2291
+ */
2292
+ isFullyFormattable(dialect, mode, max_width, indentation_width, debug_mode, parse_if_outdated) {
2293
+ const ret = wasm.script_isFullyFormattable(this.__wbg_ptr, dialect, mode, max_width, indentation_width, debug_mode, parse_if_outdated);
2294
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
2295
+ return ret[0] !== 0;
2296
+ }
2297
+ /**
2298
+ * The AST node ids that formatting cannot represent
2299
+ * @param {number} dialect
2300
+ * @param {number} mode
2301
+ * @param {number} max_width
2302
+ * @param {number} indentation_width
2303
+ * @param {boolean} debug_mode
2304
+ * @param {boolean} parse_if_outdated
2305
+ * @returns {Uint32Array}
2306
+ */
2307
+ getUnformattableNodes(dialect, mode, max_width, indentation_width, debug_mode, parse_if_outdated) {
2308
+ const ret = wasm.script_getUnformattableNodes(this.__wbg_ptr, dialect, mode, max_width, indentation_width, debug_mode, parse_if_outdated);
2309
+ if (ret[3]) throw takeFromExternrefTable0(ret[2]);
2310
+ var v1 = getArrayU32FromWasm0(ret[0], ret[1]).slice();
2311
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
2312
+ return v1;
2313
+ }
2314
+ /**
2315
+ * Does a statement of the parsed script start with a call in a namespace with client functions, even if it doesn't parse?
2316
+ * @returns {boolean}
2317
+ */
2318
+ startsClientFunctionCall() {
2319
+ return wasm.script_startsClientFunctionCall(this.__wbg_ptr) !== 0;
2320
+ }
2321
+ /**
2322
+ * @param {Catalog} catalog
2323
+ */
2324
+ constructor(catalog) {
2325
+ _assertClass(catalog, Catalog);
2326
+ const ret = wasm.script_new(catalog.__wbg_ptr);
2327
+ this.__wbg_ptr = ret >>> 0;
2328
+ ScriptFinalization.register(this, this.__wbg_ptr, this);
2329
+ return this;
2330
+ }
2331
+ parse() {
2332
+ wasm.script_parse(this.__wbg_ptr);
2333
+ }
2334
+ /**
2335
+ * Format the script into a new script of the catalog of this script
2336
+ * @param {number} dialect
2337
+ * @param {number} mode
2338
+ * @param {number} max_width
2339
+ * @param {number} indentation_width
2340
+ * @param {boolean} debug_mode
2341
+ * @param {number} keyword_case
2342
+ * @param {boolean} parse_if_outdated
2343
+ * @returns {Script}
2344
+ */
2345
+ format(dialect, mode, max_width, indentation_width, debug_mode, keyword_case, parse_if_outdated) {
2346
+ const ret = wasm.script_format(this.__wbg_ptr, dialect, mode, max_width, indentation_width, debug_mode, keyword_case, parse_if_outdated);
2347
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
2348
+ return Script.__wrap(ret[0]);
2349
+ }
2350
+ /**
2351
+ * @param {boolean} parse_if_outdated
2352
+ */
2353
+ analyze(parse_if_outdated) {
2354
+ const ret = wasm.script_analyze(this.__wbg_ptr, parse_if_outdated);
2355
+ if (ret[1]) throw takeFromExternrefTable0(ret[0]);
2356
+ }
2357
+ /**
2358
+ * The text, or a byte range of it
2359
+ * @param {number | null} [offset]
2360
+ * @param {number | null} [length]
2361
+ * @returns {string}
2362
+ */
2363
+ toString(offset, length) {
2364
+ let deferred1_0;
2365
+ let deferred1_1;
2366
+ try {
2367
+ const ret = wasm.script_toString(this.__wbg_ptr, isLikeNone(offset) ? 4294967297 : offset >>> 0, isLikeNone(length) ? 4294967297 : length >>> 0);
2368
+ deferred1_0 = ret[0];
2369
+ deferred1_1 = ret[1];
2370
+ return getStringFromWasm0(ret[0], ret[1]);
2371
+ } finally {
2372
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2373
+ }
2374
+ }
2375
+ };
2376
+ if (Symbol.dispose) Script.prototype[Symbol.dispose] = Script.prototype.free;
2377
+ var ScriptBatchFinalization = typeof FinalizationRegistry === "undefined" ? {
2378
+ register: () => {},
2379
+ unregister: () => {}
2380
+ } : new FinalizationRegistry((ptr) => wasm.__wbg_scriptbatch_free(ptr >>> 0, 1));
2381
+ /**
2382
+ * A batch of analyzed scripts for `Catalog::loadScripts`
2383
+ */
2384
+ var ScriptBatch = class {
2385
+ __destroy_into_raw() {
2386
+ const ptr = this.__wbg_ptr;
2387
+ this.__wbg_ptr = 0;
2388
+ ScriptBatchFinalization.unregister(this);
2389
+ return ptr;
2390
+ }
2391
+ free() {
2392
+ const ptr = this.__destroy_into_raw();
2393
+ wasm.__wbg_scriptbatch_free(ptr, 0);
2394
+ }
2395
+ /**
2396
+ * Add the analysis of a script in a `CatalogLayer`
2397
+ * @param {Script} script
2398
+ * @param {number} layer
2399
+ */
2400
+ add(script, layer) {
2401
+ _assertClass(script, Script);
2402
+ const ret = wasm.scriptbatch_add(this.__wbg_ptr, script.__wbg_ptr, layer);
2403
+ if (ret[1]) throw takeFromExternrefTable0(ret[0]);
2404
+ }
2405
+ constructor() {
2406
+ const ret = wasm.scriptbatch_new();
2407
+ this.__wbg_ptr = ret >>> 0;
2408
+ ScriptBatchFinalization.register(this, this.__wbg_ptr, this);
2409
+ return this;
2410
+ }
2411
+ };
2412
+ if (Symbol.dispose) ScriptBatch.prototype[Symbol.dispose] = ScriptBatch.prototype.free;
2413
+ var ScriptSessionFinalization = typeof FinalizationRegistry === "undefined" ? {
2414
+ register: () => {},
2415
+ unregister: () => {}
2416
+ } : new FinalizationRegistry((ptr) => wasm.__wbg_scriptsession_free(ptr >>> 0, 1));
2417
+ /**
2418
+ * An editor session (`dashql_script_session_*`). Shared, so that session lists can refer to it.
2419
+ */
2420
+ var ScriptSession = class ScriptSession {
2421
+ static __wrap(ptr) {
2422
+ ptr = ptr >>> 0;
2423
+ const obj = Object.create(ScriptSession.prototype);
2424
+ obj.__wbg_ptr = ptr;
2425
+ ScriptSessionFinalization.register(obj, obj.__wbg_ptr, obj);
2426
+ return obj;
2427
+ }
2428
+ __destroy_into_raw() {
2429
+ const ptr = this.__wbg_ptr;
2430
+ this.__wbg_ptr = 0;
2431
+ ScriptSessionFinalization.unregister(this);
2432
+ return ptr;
2433
+ }
2434
+ free() {
2435
+ const ptr = this.__destroy_into_raw();
2436
+ wasm.__wbg_scriptsession_free(ptr, 0);
2437
+ }
2438
+ /**
2439
+ * Format the script into a new script of another catalog
2440
+ * @param {number} dialect
2441
+ * @param {number} mode
2442
+ * @param {number} max_width
2443
+ * @param {number} indentation_width
2444
+ * @param {boolean} debug_mode
2445
+ * @param {number} keyword_case
2446
+ * @param {boolean} parse_if_outdated
2447
+ * @param {Catalog} catalog
2448
+ * @returns {Script}
2449
+ */
2450
+ formatInto(dialect, mode, max_width, indentation_width, debug_mode, keyword_case, parse_if_outdated, catalog) {
2451
+ _assertClass(catalog, Catalog);
2452
+ const ret = wasm.scriptsession_formatInto(this.__wbg_ptr, dialect, mode, max_width, indentation_width, debug_mode, keyword_case, parse_if_outdated, catalog.__wbg_ptr);
2453
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
2454
+ return Script.__wrap(ret[0]);
2455
+ }
2456
+ /**
2457
+ * The packed `ScriptDiff` from the session script to a target script
2458
+ * @param {Script} target
2459
+ * @returns {Uint8Array}
2460
+ */
2461
+ computeDiff(target) {
2462
+ _assertClass(target, Script);
2463
+ const ret = wasm.scriptsession_computeDiff(this.__wbg_ptr, target.__wbg_ptr);
2464
+ if (ret[3]) throw takeFromExternrefTable0(ret[2]);
2465
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
2466
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
2467
+ return v1;
2468
+ }
2469
+ /**
2470
+ * Replace the text, returns the packed `EditorUpdate`
2471
+ * @param {bigint} expected_text_version
2472
+ * @param {string} text
2473
+ * @returns {Uint8Array}
2474
+ */
2475
+ replaceText(expected_text_version, text) {
2476
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2477
+ const len0 = WASM_VECTOR_LEN;
2478
+ const ret = wasm.scriptsession_replaceText(this.__wbg_ptr, expected_text_version, ptr0, len0);
2479
+ var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
2480
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
2481
+ return v2;
2482
+ }
2483
+ /**
2484
+ * @returns {bigint}
2485
+ */
2486
+ textVersion() {
2487
+ const ret = wasm.scriptsession_textVersion(this.__wbg_ptr);
2488
+ return BigInt.asUintN(64, ret);
2489
+ }
2490
+ /**
2491
+ * Compile the script, returns the packed `ScriptCompilationResult`
2492
+ * @param {number} dialect
2493
+ * @param {number} mode
2494
+ * @param {number} max_width
2495
+ * @param {number} indentation_width
2496
+ * @param {boolean} allow_extensions
2497
+ * @param {boolean} parse_if_outdated
2498
+ * @returns {Uint8Array}
2499
+ */
2500
+ compileQuery(dialect, mode, max_width, indentation_width, allow_extensions, parse_if_outdated) {
2501
+ const ret = wasm.scriptsession_compileQuery(this.__wbg_ptr, dialect, mode, max_width, indentation_width, allow_extensions, parse_if_outdated);
2502
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
2503
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
2504
+ return v1;
2505
+ }
2506
+ /**
2507
+ * A session whose script takes an entry id that the catalogs of the module allocated before
2508
+ * @param {Catalog} catalog
2509
+ * @param {number} offset_unit
2510
+ * @param {number} entry_id
2511
+ * @returns {ScriptSession}
2512
+ */
2513
+ static withEntryId(catalog, offset_unit, entry_id) {
2514
+ _assertClass(catalog, Catalog);
2515
+ const ret = wasm.scriptsession_withEntryId(catalog.__wbg_ptr, offset_unit, entry_id);
2516
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
2517
+ return ScriptSession.__wrap(ret[0]);
2518
+ }
2519
+ /**
2520
+ * @returns {bigint}
2521
+ */
2522
+ stateRevision() {
2523
+ const ret = wasm.scriptsession_stateRevision(this.__wbg_ptr);
2524
+ return BigInt.asUintN(64, ret);
2525
+ }
2526
+ /**
2527
+ * The annotation of a statement as JSON, like `Script.readAnnotation`
2528
+ * @param {number} statement_id
2529
+ * @param {boolean} parse_if_outdated
2530
+ * @returns {string}
2531
+ */
2532
+ readAnnotation(statement_id, parse_if_outdated) {
2533
+ let deferred2_0;
2534
+ let deferred2_1;
2535
+ try {
2536
+ const ret = wasm.scriptsession_readAnnotation(this.__wbg_ptr, statement_id, parse_if_outdated);
2537
+ var ptr1 = ret[0];
2538
+ var len1 = ret[1];
2539
+ if (ret[3]) {
2540
+ ptr1 = 0;
2541
+ len1 = 0;
2542
+ throw takeFromExternrefTable0(ret[2]);
2543
+ }
2544
+ deferred2_0 = ptr1;
2545
+ deferred2_1 = len1;
2546
+ return getStringFromWasm0(ptr1, len1);
2547
+ } finally {
2548
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
2549
+ }
2550
+ }
2551
+ /**
2552
+ * Remove the `@flow` tag of the script. Returns the new text.
2553
+ * @param {boolean} parse_if_outdated
2554
+ * @returns {string}
2555
+ */
2556
+ removeVisFlow(parse_if_outdated) {
2557
+ let deferred2_0;
2558
+ let deferred2_1;
2559
+ try {
2560
+ const ret = wasm.scriptsession_removeVisFlow(this.__wbg_ptr, parse_if_outdated);
2561
+ var ptr1 = ret[0];
2562
+ var len1 = ret[1];
2563
+ if (ret[3]) {
2564
+ ptr1 = 0;
2565
+ len1 = 0;
2566
+ throw takeFromExternrefTable0(ret[2]);
2567
+ }
2568
+ deferred2_0 = ptr1;
2569
+ deferred2_1 = len1;
2570
+ return getStringFromWasm0(ptr1, len1);
2571
+ } finally {
2572
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
2573
+ }
2574
+ }
2575
+ /**
2576
+ * @returns {number}
2577
+ */
2578
+ catalogEntryId() {
2579
+ return wasm.scriptsession_catalogEntryId(this.__wbg_ptr) >>> 0;
2580
+ }
2581
+ /**
2582
+ * @returns {bigint}
2583
+ */
2584
+ catalogRevision() {
2585
+ const ret = wasm.scriptsession_catalogRevision(this.__wbg_ptr);
2586
+ return BigInt.asUintN(64, ret);
2587
+ }
2588
+ /**
2589
+ * Remove the `@param` tags of an input of the script. Returns the new text.
2590
+ * @param {string} name
2591
+ * @param {boolean} parse_if_outdated
2592
+ * @returns {string}
2593
+ */
2594
+ removeParamTag(name, parse_if_outdated) {
2595
+ let deferred3_0;
2596
+ let deferred3_1;
2597
+ try {
2598
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2599
+ const len0 = WASM_VECTOR_LEN;
2600
+ const ret = wasm.scriptsession_removeParamTag(this.__wbg_ptr, ptr0, len0, parse_if_outdated);
2601
+ var ptr2 = ret[0];
2602
+ var len2 = ret[1];
2603
+ if (ret[3]) {
2604
+ ptr2 = 0;
2605
+ len2 = 0;
2606
+ throw takeFromExternrefTable0(ret[2]);
2607
+ }
2608
+ deferred3_0 = ptr2;
2609
+ deferred3_1 = len2;
2610
+ return getStringFromWasm0(ptr2, len2);
2611
+ } finally {
2612
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
2613
+ }
2614
+ }
2615
+ /**
2616
+ * Set the `@flow` tag of the script, its placement on the dataflow canvas: the position if both coordinates are
2617
+ * given, the width of the box and the height of its chart if given. Returns the new text.
2618
+ * @param {number | null | undefined} x
2619
+ * @param {number | null | undefined} y
2620
+ * @param {number | null | undefined} width
2621
+ * @param {number | null | undefined} height
2622
+ * @param {boolean} parse_if_outdated
2623
+ * @returns {string}
2624
+ */
2625
+ rewriteVisFlow(x, y, width, height, parse_if_outdated) {
2626
+ let deferred2_0;
2627
+ let deferred2_1;
2628
+ try {
2629
+ 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);
2630
+ var ptr1 = ret[0];
2631
+ var len1 = ret[1];
2632
+ if (ret[3]) {
2633
+ ptr1 = 0;
2634
+ len1 = 0;
2635
+ throw takeFromExternrefTable0(ret[2]);
2636
+ }
2637
+ deferred2_0 = ptr1;
2638
+ deferred2_1 = len1;
2639
+ return getStringFromWasm0(ptr1, len1);
2640
+ } finally {
2641
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
2642
+ }
2643
+ }
2644
+ dropFromCatalog() {
2645
+ const ret = wasm.scriptsession_dropFromCatalog(this.__wbg_ptr);
2646
+ if (ret[1]) throw takeFromExternrefTable0(ret[0]);
2647
+ }
2648
+ /**
2649
+ * Publish the analysis into the session layer of the catalog
2650
+ */
2651
+ loadIntoCatalog() {
2652
+ const ret = wasm.scriptsession_loadIntoCatalog(this.__wbg_ptr);
2653
+ if (ret[1]) throw takeFromExternrefTable0(ret[0]);
2654
+ }
2655
+ /**
2656
+ * Set the `@param` tag of an input of the script, its value. Returns the new text.
2657
+ * @param {string} name
2658
+ * @param {string} value
2659
+ * @param {boolean} parse_if_outdated
2660
+ * @returns {string}
2661
+ */
2662
+ rewriteParamTag(name, value, parse_if_outdated) {
2663
+ let deferred4_0;
2664
+ let deferred4_1;
2665
+ try {
2666
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2667
+ const len0 = WASM_VECTOR_LEN;
2668
+ const ptr1 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2669
+ const len1 = WASM_VECTOR_LEN;
2670
+ const ret = wasm.scriptsession_rewriteParamTag(this.__wbg_ptr, ptr0, len0, ptr1, len1, parse_if_outdated);
2671
+ var ptr3 = ret[0];
2672
+ var len3 = ret[1];
2673
+ if (ret[3]) {
2674
+ ptr3 = 0;
2675
+ len3 = 0;
2676
+ throw takeFromExternrefTable0(ret[2]);
2677
+ }
2678
+ deferred4_0 = ptr3;
2679
+ deferred4_1 = len3;
2680
+ return getStringFromWasm0(ptr3, len3);
2681
+ } finally {
2682
+ wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
2683
+ }
2684
+ }
2685
+ /**
2686
+ * Set the `@board` tag of a query, negative rows and columns are absent. Returns the new text.
2687
+ * @param {number} statement_id
2688
+ * @param {number} row
2689
+ * @param {number} column
2690
+ * @param {number} width
2691
+ * @param {number} height
2692
+ * @param {boolean} parse_if_outdated
2693
+ * @returns {string}
2694
+ */
2695
+ rewriteVisBoard(statement_id, row, column, width, height, parse_if_outdated) {
2696
+ let deferred2_0;
2697
+ let deferred2_1;
2698
+ try {
2699
+ const ret = wasm.scriptsession_rewriteVisBoard(this.__wbg_ptr, statement_id, row, column, width, height, parse_if_outdated);
2700
+ var ptr1 = ret[0];
2701
+ var len1 = ret[1];
2702
+ if (ret[3]) {
2703
+ ptr1 = 0;
2704
+ len1 = 0;
2705
+ throw takeFromExternrefTable0(ret[2]);
2706
+ }
2707
+ deferred2_0 = ptr1;
2708
+ deferred2_1 = len1;
2709
+ return getStringFromWasm0(ptr1, len1);
2710
+ } finally {
2711
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
2712
+ }
2713
+ }
2714
+ /**
2715
+ * Complete at the primary cursor, returns the packed `Completion`
2716
+ * @param {number} limit
2717
+ * @param {number} keyword_case
2718
+ * @returns {Uint8Array}
2719
+ */
2720
+ completeAtCursor(limit, keyword_case) {
2721
+ const ret = wasm.scriptsession_completeAtCursor(this.__wbg_ptr, limit, keyword_case);
2722
+ if (ret[3]) throw takeFromExternrefTable0(ret[2]);
2723
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
2724
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
2725
+ return v1;
2726
+ }
2727
+ /**
2728
+ * Replace the annotation of a statement, given as JSON. Returns the new text.
2729
+ * @param {number} statement_id
2730
+ * @param {string} annotation
2731
+ * @param {boolean} parse_if_outdated
2732
+ * @returns {string}
2733
+ */
2734
+ rewriteAnnotation(statement_id, annotation, parse_if_outdated) {
2735
+ let deferred3_0;
2736
+ let deferred3_1;
2737
+ try {
2738
+ const ptr0 = passStringToWasm0(annotation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2739
+ const len0 = WASM_VECTOR_LEN;
2740
+ const ret = wasm.scriptsession_rewriteAnnotation(this.__wbg_ptr, statement_id, ptr0, len0, parse_if_outdated);
2741
+ var ptr2 = ret[0];
2742
+ var len2 = ret[1];
2743
+ if (ret[3]) {
2744
+ ptr2 = 0;
2745
+ len2 = 0;
2746
+ throw takeFromExternrefTable0(ret[2]);
2747
+ }
2748
+ deferred3_0 = ptr2;
2749
+ deferred3_1 = len2;
2750
+ return getStringFromWasm0(ptr2, len2);
2751
+ } finally {
2752
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
2753
+ }
2754
+ }
2755
+ /**
2756
+ * Move the primary cursor, returns the packed `EditorUpdate`
2757
+ * @param {bigint} expected_text_version
2758
+ * @param {bigint} offset
2759
+ * @returns {Uint8Array}
2760
+ */
2761
+ setPrimaryCursor(expected_text_version, offset) {
2762
+ const ret = wasm.scriptsession_setPrimaryCursor(this.__wbg_ptr, expected_text_version, offset);
2763
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
2764
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
2765
+ return v1;
2766
+ }
2767
+ /**
2768
+ * Can formatting represent every node?
2769
+ * @param {number} dialect
2770
+ * @param {number} mode
2771
+ * @param {number} max_width
2772
+ * @param {number} indentation_width
2773
+ * @param {boolean} debug_mode
2774
+ * @param {boolean} parse_if_outdated
2775
+ * @returns {boolean}
2776
+ */
2777
+ isFullyFormattable(dialect, mode, max_width, indentation_width, debug_mode, parse_if_outdated) {
2778
+ const ret = wasm.scriptsession_isFullyFormattable(this.__wbg_ptr, dialect, mode, max_width, indentation_width, debug_mode, parse_if_outdated);
2779
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
2780
+ return ret[0] !== 0;
2781
+ }
2782
+ /**
2783
+ * Set the renderer tag of a query (`vegalite` with a JSON object, `markdown` with a template or
2784
+ * `table`), an empty kind removes it. Returns the new text.
2785
+ * @param {number} statement_id
2786
+ * @param {string} kind
2787
+ * @param {string} body
2788
+ * @param {boolean} parse_if_outdated
2789
+ * @returns {string}
2790
+ */
2791
+ rewriteVisRenderer(statement_id, kind, body, parse_if_outdated) {
2792
+ let deferred4_0;
2793
+ let deferred4_1;
2794
+ try {
2795
+ const ptr0 = passStringToWasm0(kind, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2796
+ const len0 = WASM_VECTOR_LEN;
2797
+ const ptr1 = passStringToWasm0(body, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2798
+ const len1 = WASM_VECTOR_LEN;
2799
+ const ret = wasm.scriptsession_rewriteVisRenderer(this.__wbg_ptr, statement_id, ptr0, len0, ptr1, len1, parse_if_outdated);
2800
+ var ptr3 = ret[0];
2801
+ var len3 = ret[1];
2802
+ if (ret[3]) {
2803
+ ptr3 = 0;
2804
+ len3 = 0;
2805
+ throw takeFromExternrefTable0(ret[2]);
2806
+ }
2807
+ deferred4_0 = ptr3;
2808
+ deferred4_1 = len3;
2809
+ return getStringFromWasm0(ptr3, len3);
2810
+ } finally {
2811
+ wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
2812
+ }
2813
+ }
2814
+ /**
2815
+ * The named table parameters of the analysis that reference scripts, with the script that each finds among
2816
+ * `names`: triples of the offset, the length and the script index (u32::MAX if none), in the offset unit
2817
+ * @param {string[]} names
2818
+ * @returns {Uint32Array}
2819
+ */
2820
+ findScriptReferences(names) {
2821
+ const ptr0 = passArrayJsValueToWasm0(names, wasm.__wbindgen_malloc);
2822
+ const len0 = WASM_VECTOR_LEN;
2823
+ const ret = wasm.scriptsession_findScriptReferences(this.__wbg_ptr, ptr0, len0);
2824
+ var v2 = getArrayU32FromWasm0(ret[0], ret[1]).slice();
2825
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
2826
+ return v2;
2827
+ }
2828
+ /**
2829
+ * @param {Catalog} catalog
2830
+ * @param {number} offset_unit
2831
+ */
2832
+ constructor(catalog, offset_unit) {
2833
+ _assertClass(catalog, Catalog);
2834
+ const ret = wasm.scriptsession_new(catalog.__wbg_ptr, offset_unit);
2835
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
2836
+ this.__wbg_ptr = ret[0] >>> 0;
2837
+ ScriptSessionFinalization.register(this, this.__wbg_ptr, this);
2838
+ return this;
2839
+ }
2840
+ /**
2841
+ * @returns {string}
2842
+ */
2843
+ text() {
2844
+ let deferred1_0;
2845
+ let deferred1_1;
2846
+ try {
2847
+ const ret = wasm.scriptsession_text(this.__wbg_ptr);
2848
+ deferred1_0 = ret[0];
2849
+ deferred1_1 = ret[1];
2850
+ return getStringFromWasm0(ret[0], ret[1]);
2851
+ } finally {
2852
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2853
+ }
2854
+ }
2855
+ /**
2856
+ * Apply a packed `EditorEvent`, returns the packed `EditorUpdate`
2857
+ * @param {Uint8Array} event
2858
+ * @returns {Uint8Array}
2859
+ */
2860
+ apply(event) {
2861
+ const ptr0 = passArray8ToWasm0(event, wasm.__wbindgen_malloc);
2862
+ const len0 = WASM_VECTOR_LEN;
2863
+ const ret = wasm.scriptsession_apply(this.__wbg_ptr, ptr0, len0);
2864
+ var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
2865
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
2866
+ return v2;
2867
+ }
2868
+ /**
2869
+ * Format the script into a new script of the session catalog
2870
+ * @param {number} dialect
2871
+ * @param {number} mode
2872
+ * @param {number} max_width
2873
+ * @param {number} indentation_width
2874
+ * @param {boolean} debug_mode
2875
+ * @param {number} keyword_case
2876
+ * @param {boolean} parse_if_outdated
2877
+ * @returns {Script}
2878
+ */
2879
+ format(dialect, mode, max_width, indentation_width, debug_mode, keyword_case, parse_if_outdated) {
2880
+ const ret = wasm.scriptsession_format(this.__wbg_ptr, dialect, mode, max_width, indentation_width, debug_mode, keyword_case, parse_if_outdated);
2881
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
2882
+ return Script.__wrap(ret[0]);
2883
+ }
2884
+ /**
2885
+ * Analyze, returns the packed `EditorUpdate`
2886
+ * @returns {Uint8Array}
2887
+ */
2888
+ analyze() {
2889
+ const ret = wasm.scriptsession_analyze(this.__wbg_ptr);
2890
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
2891
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
2892
+ return v1;
2893
+ }
2894
+ };
2895
+ if (Symbol.dispose) ScriptSession.prototype[Symbol.dispose] = ScriptSession.prototype.free;
2896
+ var SessionPlanRequestFinalization = typeof FinalizationRegistry === "undefined" ? {
2897
+ register: () => {},
2898
+ unregister: () => {}
2899
+ } : new FinalizationRegistry((ptr) => wasm.__wbg_sessionplanrequest_free(ptr >>> 0, 1));
2900
+ /**
2901
+ * A request to plan the scripts of a session across connections (`planner::SessionPlanRequest`)
2902
+ */
2903
+ var SessionPlanRequest = class {
2904
+ __destroy_into_raw() {
2905
+ const ptr = this.__wbg_ptr;
2906
+ this.__wbg_ptr = 0;
2907
+ SessionPlanRequestFinalization.unregister(this);
2908
+ return ptr;
2909
+ }
2910
+ free() {
2911
+ const ptr = this.__destroy_into_raw();
2912
+ wasm.__wbg_sessionplanrequest_free(ptr, 0);
2913
+ }
2914
+ /**
2915
+ * Add a script in session order, returns its index. A materialized result of the script is written to
2916
+ * `materialization_file` below the mount prefix, `s<index>.parquet` if absent.
2917
+ * @param {string} name
2918
+ * @param {number} connection
2919
+ * @param {ScriptSession} session
2920
+ * @param {string | null} [materialization_file]
2921
+ * @returns {number}
2922
+ */
2923
+ addScript(name, connection, session, materialization_file) {
2924
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2925
+ const len0 = WASM_VECTOR_LEN;
2926
+ _assertClass(session, ScriptSession);
2927
+ var ptr1 = isLikeNone(materialization_file) ? 0 : passStringToWasm0(materialization_file, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2928
+ var len1 = WASM_VECTOR_LEN;
2929
+ return wasm.sessionplanrequest_addScript(this.__wbg_ptr, ptr0, len0, connection, session.__wbg_ptr, ptr1, len1) >>> 0;
2930
+ }
2931
+ /**
2932
+ * Plan the target scripts and what they need instead of the whole session
2933
+ * @param {Uint32Array} targets
2934
+ */
2935
+ setTargets(targets) {
2936
+ const ptr0 = passArray32ToWasm0(targets, wasm.__wbindgen_malloc);
2937
+ const len0 = WASM_VECTOR_LEN;
2938
+ wasm.sessionplanrequest_setTargets(this.__wbg_ptr, ptr0, len0);
2939
+ }
2940
+ /**
2941
+ * Add an attachment, a Parquet file of the session that the table parameter `:name` reads, returns its index. The
2942
+ * stamp changes when the file changes, e.g. its size and modification time. The columns are absent if the host
2943
+ * didn't read them yet.
2944
+ * @param {string} name
2945
+ * @param {string} file
2946
+ * @param {string} stamp
2947
+ * @param {string[] | null} [columns]
2948
+ * @returns {number}
2949
+ */
2950
+ addAttachment(name, file, stamp, columns) {
2951
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2952
+ const len0 = WASM_VECTOR_LEN;
2953
+ const ptr1 = passStringToWasm0(file, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2954
+ const len1 = WASM_VECTOR_LEN;
2955
+ const ptr2 = passStringToWasm0(stamp, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2956
+ const len2 = WASM_VECTOR_LEN;
2957
+ var ptr3 = isLikeNone(columns) ? 0 : passArrayJsValueToWasm0(columns, wasm.__wbindgen_malloc);
2958
+ var len3 = WASM_VECTOR_LEN;
2959
+ return wasm.sessionplanrequest_addAttachment(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3) >>> 0;
2960
+ }
2961
+ /**
2962
+ * Add a connection, returns its index
2963
+ * @param {string} id
2964
+ * @param {boolean} local
2965
+ * @param {Catalog} catalog
2966
+ * @param {number} dialect
2967
+ * @param {string} default_database
2968
+ * @param {string} default_schema
2969
+ * @returns {number}
2970
+ */
2971
+ addConnection(id, local, catalog, dialect, default_database, default_schema) {
2972
+ const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2973
+ const len0 = WASM_VECTOR_LEN;
2974
+ _assertClass(catalog, Catalog);
2975
+ const ptr1 = passStringToWasm0(default_database, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2976
+ const len1 = WASM_VECTOR_LEN;
2977
+ const ptr2 = passStringToWasm0(default_schema, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2978
+ const len2 = WASM_VECTOR_LEN;
2979
+ return wasm.sessionplanrequest_addConnection(this.__wbg_ptr, ptr0, len0, local, catalog.__wbg_ptr, dialect, ptr1, len1, ptr2, len2) >>> 0;
2980
+ }
2981
+ /**
2982
+ * The scripts whose materialized results the host provides
2983
+ * @param {Uint32Array} materialized
2984
+ */
2985
+ setMaterialized(materialized) {
2986
+ const ptr0 = passArray32ToWasm0(materialized, wasm.__wbindgen_malloc);
2987
+ const len0 = WASM_VECTOR_LEN;
2988
+ wasm.sessionplanrequest_setMaterialized(this.__wbg_ptr, ptr0, len0);
2989
+ }
2990
+ /**
2991
+ * The directory the host mounts materialized results in
2992
+ * @param {string} prefix
2993
+ */
2994
+ setMountPrefix(prefix) {
2995
+ const ptr0 = passStringToWasm0(prefix, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2996
+ const len0 = WASM_VECTOR_LEN;
2997
+ wasm.sessionplanrequest_setMountPrefix(this.__wbg_ptr, ptr0, len0);
2998
+ }
2999
+ /**
3000
+ * The directory the host mounts the attachments in
3001
+ * @param {string} prefix
3002
+ */
3003
+ setAttachmentPrefix(prefix) {
3004
+ const ptr0 = passStringToWasm0(prefix, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3005
+ const len0 = WASM_VECTOR_LEN;
3006
+ wasm.sessionplanrequest_setAttachmentPrefix(this.__wbg_ptr, ptr0, len0);
3007
+ }
3008
+ constructor() {
3009
+ const ret = wasm.sessionplanrequest_new();
3010
+ this.__wbg_ptr = ret >>> 0;
3011
+ SessionPlanRequestFinalization.register(this, this.__wbg_ptr, this);
3012
+ return this;
3013
+ }
3014
+ };
3015
+ if (Symbol.dispose) SessionPlanRequest.prototype[Symbol.dispose] = SessionPlanRequest.prototype.free;
3016
+ var ShellFinalization = typeof FinalizationRegistry === "undefined" ? {
3017
+ register: () => {},
3018
+ unregister: () => {}
3019
+ } : new FinalizationRegistry((ptr) => wasm.__wbg_shell_free(ptr >>> 0, 1));
3020
+ /**
3021
+ * A shell session on a catalog
3022
+ */
3023
+ var Shell = class {
3024
+ __destroy_into_raw() {
3025
+ const ptr = this.__wbg_ptr;
3026
+ this.__wbg_ptr = 0;
3027
+ ShellFinalization.unregister(this);
3028
+ return ptr;
3029
+ }
3030
+ free() {
3031
+ const ptr = this.__destroy_into_raw();
3032
+ wasm.__wbg_shell_free(ptr, 0);
3033
+ }
3034
+ /**
3035
+ * @param {string} text
3036
+ * @returns {ShellPromptResult}
3037
+ */
3038
+ setPrompt(text) {
3039
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3040
+ const len0 = WASM_VECTOR_LEN;
3041
+ const ret = wasm.shell_setPrompt(this.__wbg_ptr, ptr0, len0);
3042
+ return ShellPromptResult.__wrap(ret);
3043
+ }
3044
+ /**
3045
+ * @param {string} query
3046
+ * @returns {ShellOperation}
3047
+ */
3048
+ startQuery(query) {
3049
+ const ptr0 = passStringToWasm0(query, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3050
+ const len0 = WASM_VECTOR_LEN;
3051
+ const ret = wasm.shell_startQuery(this.__wbg_ptr, ptr0, len0);
3052
+ return ShellOperation.__wrap(ret);
3053
+ }
3054
+ /**
3055
+ * Register dot commands, one name per line, returns the status
3056
+ * @param {string} commands
3057
+ * @returns {number}
3058
+ */
3059
+ setCommands(commands) {
3060
+ const ptr0 = passStringToWasm0(commands, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3061
+ const len0 = WASM_VECTOR_LEN;
3062
+ return wasm.shell_setCommands(this.__wbg_ptr, ptr0, len0) >>> 0;
3063
+ }
3064
+ /**
3065
+ * @param {bigint} effect_id
3066
+ * @returns {ShellOperation}
3067
+ */
3068
+ cancelEffect(effect_id) {
3069
+ const ret = wasm.shell_cancelEffect(this.__wbg_ptr, effect_id);
3070
+ return ShellOperation.__wrap(ret);
3071
+ }
3072
+ /**
3073
+ * @param {string} text
3074
+ * @returns {ShellPromptResult}
3075
+ */
3076
+ insertPrompt(text) {
3077
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3078
+ const len0 = WASM_VECTOR_LEN;
3079
+ const ret = wasm.shell_insertPrompt(this.__wbg_ptr, ptr0, len0);
3080
+ return ShellPromptResult.__wrap(ret);
3081
+ }
3082
+ /**
3083
+ * @param {string} prompt
3084
+ * @returns {ShellTerminalResult}
3085
+ */
3086
+ openTerminal(prompt) {
3087
+ const ptr0 = passStringToWasm0(prompt, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3088
+ const len0 = WASM_VECTOR_LEN;
3089
+ const ret = wasm.shell_openTerminal(this.__wbg_ptr, ptr0, len0);
3090
+ return ShellTerminalResult.__wrap(ret);
3091
+ }
3092
+ /**
3093
+ * @returns {ShellOperation}
3094
+ */
3095
+ submitPrompt() {
3096
+ const ret = wasm.shell_submitPrompt(this.__wbg_ptr);
3097
+ return ShellOperation.__wrap(ret);
3098
+ }
3099
+ /**
3100
+ * The history as length-prefixed (u32 little-endian) UTF-8 entries
3101
+ * @returns {Uint8Array}
3102
+ */
3103
+ exportHistory() {
3104
+ const ret = wasm.shell_exportHistory(this.__wbg_ptr);
3105
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
3106
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
3107
+ return v1;
3108
+ }
3109
+ /**
3110
+ * Replace the history with exported entries, returns the status
3111
+ * @param {Uint8Array} data
3112
+ * @returns {number}
3113
+ */
3114
+ importHistory(data) {
3115
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
3116
+ const len0 = WASM_VECTOR_LEN;
3117
+ return wasm.shell_importHistory(this.__wbg_ptr, ptr0, len0) >>> 0;
3118
+ }
3119
+ /**
3120
+ * Finish an effect with a `DashQLShellEffectCompletionStatus` and its data (for queries a `QueryResultTag` and a
3121
+ * status line or a preview of the result, a flag byte and the output for dot commands, the message for errors)
3122
+ * @param {bigint} effect_id
3123
+ * @param {number} completion_status
3124
+ * @param {Uint8Array} data
3125
+ * @returns {ShellOperation}
3126
+ */
3127
+ completeEffect(effect_id, completion_status, data) {
3128
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
3129
+ const len0 = WASM_VECTOR_LEN;
3130
+ const ret = wasm.shell_completeEffect(this.__wbg_ptr, effect_id, completion_status, ptr0, len0);
3131
+ return ShellOperation.__wrap(ret);
3132
+ }
3133
+ /**
3134
+ * Complete at the cursor, throws if the completion fails
3135
+ * @param {number} limit
3136
+ * @returns {ShellCompletionCandidate[]}
3137
+ */
3138
+ completePrompt(limit) {
3139
+ const ret = wasm.shell_completePrompt(this.__wbg_ptr, limit);
3140
+ if (ret[3]) throw takeFromExternrefTable0(ret[2]);
3141
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
3142
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
3143
+ return v1;
3144
+ }
3145
+ /**
3146
+ * @param {string} display_text
3147
+ * @param {string} completion_text
3148
+ * @param {number} target_offset
3149
+ * @param {number} target_length
3150
+ * @returns {ShellPromptResult}
3151
+ */
3152
+ applyCompletion(display_text, completion_text, target_offset, target_length) {
3153
+ const ptr0 = passStringToWasm0(display_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3154
+ const len0 = WASM_VECTOR_LEN;
3155
+ const ptr1 = passStringToWasm0(completion_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3156
+ const len1 = WASM_VECTOR_LEN;
3157
+ const ret = wasm.shell_applyCompletion(this.__wbg_ptr, ptr0, len0, ptr1, len1, target_offset, target_length);
3158
+ return ShellPromptResult.__wrap(ret);
3159
+ }
3160
+ /**
3161
+ * @returns {ShellPromptResult}
3162
+ */
3163
+ movePromptLeft() {
3164
+ const ret = wasm.shell_movePromptLeft(this.__wbg_ptr);
3165
+ return ShellPromptResult.__wrap(ret);
3166
+ }
3167
+ /**
3168
+ * The `KeywordCase` of completions (1 is upper case)
3169
+ * @param {number} keyword_case
3170
+ */
3171
+ setKeywordCase(keyword_case) {
3172
+ wasm.shell_setKeywordCase(this.__wbg_ptr, keyword_case);
3173
+ }
3174
+ /**
3175
+ * @returns {ShellPromptResult}
3176
+ */
3177
+ movePromptRight() {
3178
+ const ret = wasm.shell_movePromptRight(this.__wbg_ptr);
3179
+ return ShellPromptResult.__wrap(ret);
3180
+ }
3181
+ /**
3182
+ * Consume a `DashQLShellPromptInput` with its text
3183
+ * @param {number} key
3184
+ * @param {string} text
3185
+ * @returns {ShellPromptResult}
3186
+ */
3187
+ consumePromptInput(key, text) {
3188
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3189
+ const len0 = WASM_VECTOR_LEN;
3190
+ const ret = wasm.shell_consumePromptInput(this.__wbg_ptr, key, ptr0, len0);
3191
+ return ShellPromptResult.__wrap(ret);
3192
+ }
3193
+ /**
3194
+ * @returns {ShellPromptResult}
3195
+ */
3196
+ deletePromptForward() {
3197
+ const ret = wasm.shell_deletePromptForward(this.__wbg_ptr);
3198
+ return ShellPromptResult.__wrap(ret);
3199
+ }
3200
+ /**
3201
+ * @param {string} output
3202
+ * @param {boolean} error
3203
+ * @returns {ShellTerminalResult}
3204
+ */
3205
+ finishTerminalQuery(output, error) {
3206
+ const ptr0 = passStringToWasm0(output, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3207
+ const len0 = WASM_VECTOR_LEN;
3208
+ const ret = wasm.shell_finishTerminalQuery(this.__wbg_ptr, ptr0, len0, error);
3209
+ return ShellTerminalResult.__wrap(ret);
3210
+ }
3211
+ /**
3212
+ * Consume a `DashQLShellPromptInput` with its text
3213
+ * @param {number} key
3214
+ * @param {string} text
3215
+ * @returns {ShellTerminalResult}
3216
+ */
3217
+ consumeTerminalInput(key, text) {
3218
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3219
+ const len0 = WASM_VECTOR_LEN;
3220
+ const ret = wasm.shell_consumeTerminalInput(this.__wbg_ptr, key, ptr0, len0);
3221
+ return ShellTerminalResult.__wrap(ret);
3222
+ }
3223
+ /**
3224
+ * @returns {ShellPromptResult}
3225
+ */
3226
+ deletePromptBackward() {
3227
+ const ret = wasm.shell_deletePromptBackward(this.__wbg_ptr);
3228
+ return ShellPromptResult.__wrap(ret);
3229
+ }
3230
+ /**
3231
+ * @param {string} message
3232
+ * @returns {ShellTerminalResult}
3233
+ */
3234
+ renderTerminalStatus(message) {
3235
+ const ptr0 = passStringToWasm0(message, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3236
+ const len0 = WASM_VECTOR_LEN;
3237
+ const ret = wasm.shell_renderTerminalStatus(this.__wbg_ptr, ptr0, len0);
3238
+ return ShellTerminalResult.__wrap(ret);
3239
+ }
3240
+ /**
3241
+ * The completion list that the host shows over the terminal, undefined if there is none
3242
+ * @returns {ShellCompletionList | undefined}
3243
+ */
3244
+ terminalCompletionList() {
3245
+ const ret = wasm.shell_terminalCompletionList(this.__wbg_ptr);
3246
+ return ret === 0 ? void 0 : ShellCompletionList.__wrap(ret);
3247
+ }
3248
+ /**
3249
+ * The color of the terminal prompt as 0xRRGGBB, bold in the default foreground color if undefined
3250
+ * @param {number | null} [rgb]
3251
+ */
3252
+ setTerminalPromptColor(rgb) {
3253
+ wasm.shell_setTerminalPromptColor(this.__wbg_ptr, isLikeNone(rgb) ? 4294967297 : rgb >>> 0);
3254
+ }
3255
+ /**
3256
+ * The packed `Completion` of the completion list, undefined if there is none
3257
+ * @returns {Uint8Array | undefined}
3258
+ */
3259
+ terminalCompletionBuffer() {
3260
+ const ret = wasm.shell_terminalCompletionBuffer(this.__wbg_ptr);
3261
+ let v1;
3262
+ if (ret[0] !== 0) {
3263
+ v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
3264
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
3265
+ }
3266
+ return v1;
3267
+ }
3268
+ /**
3269
+ * @returns {ShellTerminalResult}
3270
+ */
3271
+ clearTerminalQueryProgress() {
3272
+ const ret = wasm.shell_clearTerminalQueryProgress(this.__wbg_ptr);
3273
+ return ShellTerminalResult.__wrap(ret);
3274
+ }
3275
+ /**
3276
+ * @param {string} message
3277
+ * @param {boolean} advance_frame
3278
+ * @returns {ShellTerminalResult}
3279
+ */
3280
+ renderTerminalQueryProgress(message, advance_frame) {
3281
+ const ptr0 = passStringToWasm0(message, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3282
+ const len0 = WASM_VECTOR_LEN;
3283
+ const ret = wasm.shell_renderTerminalQueryProgress(this.__wbg_ptr, ptr0, len0, advance_frame);
3284
+ return ShellTerminalResult.__wrap(ret);
3285
+ }
3286
+ /**
3287
+ * Create a shell on a catalog for a terminal width
3288
+ * @param {Catalog} catalog
3289
+ * @param {number} terminal_columns
3290
+ * @param {boolean} auto_qualify_non_default_database_tables
3291
+ */
3292
+ constructor(catalog, terminal_columns, auto_qualify_non_default_database_tables) {
3293
+ _assertClass(catalog, Catalog);
3294
+ const ret = wasm.shell_new(catalog.__wbg_ptr, terminal_columns, auto_qualify_non_default_database_tables);
3295
+ this.__wbg_ptr = ret >>> 0;
3296
+ ShellFinalization.register(this, this.__wbg_ptr, this);
3297
+ return this;
3298
+ }
3299
+ /**
3300
+ * @param {number} terminal_columns
3301
+ */
3302
+ resize(terminal_columns) {
3303
+ wasm.shell_resize(this.__wbg_ptr, terminal_columns);
3304
+ }
3305
+ };
3306
+ if (Symbol.dispose) Shell.prototype[Symbol.dispose] = Shell.prototype.free;
3307
+ var ShellCompletionCandidateFinalization = typeof FinalizationRegistry === "undefined" ? {
3308
+ register: () => {},
3309
+ unregister: () => {}
3310
+ } : new FinalizationRegistry((ptr) => wasm.__wbg_shellcompletioncandidate_free(ptr >>> 0, 1));
3311
+ /**
3312
+ * A completion candidate
3313
+ */
3314
+ var ShellCompletionCandidate = class ShellCompletionCandidate {
3315
+ static __wrap(ptr) {
3316
+ ptr = ptr >>> 0;
3317
+ const obj = Object.create(ShellCompletionCandidate.prototype);
3318
+ obj.__wbg_ptr = ptr;
3319
+ ShellCompletionCandidateFinalization.register(obj, obj.__wbg_ptr, obj);
3320
+ return obj;
3321
+ }
3322
+ __destroy_into_raw() {
3323
+ const ptr = this.__wbg_ptr;
3324
+ this.__wbg_ptr = 0;
3325
+ ShellCompletionCandidateFinalization.unregister(this);
3326
+ return ptr;
3327
+ }
3328
+ free() {
3329
+ const ptr = this.__destroy_into_raw();
3330
+ wasm.__wbg_shellcompletioncandidate_free(ptr, 0);
3331
+ }
3332
+ /**
3333
+ * @returns {string}
3334
+ */
3335
+ get displayText() {
3336
+ let deferred1_0;
3337
+ let deferred1_1;
3338
+ try {
3339
+ const ret = wasm.shellcompletioncandidate_displayText(this.__wbg_ptr);
3340
+ deferred1_0 = ret[0];
3341
+ deferred1_1 = ret[1];
3342
+ return getStringFromWasm0(ret[0], ret[1]);
3343
+ } finally {
3344
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
3345
+ }
3346
+ }
3347
+ /**
3348
+ * The UTF-8 byte length of the replaced text
3349
+ * @returns {number}
3350
+ */
3351
+ get targetLength() {
3352
+ return wasm.shellcompletioncandidate_targetLength(this.__wbg_ptr) >>> 0;
3353
+ }
3354
+ /**
3355
+ * The UTF-8 byte offset of the replaced text
3356
+ * @returns {number}
3357
+ */
3358
+ get targetOffset() {
3359
+ return wasm.shellcompletioncandidate_targetOffset(this.__wbg_ptr) >>> 0;
3360
+ }
3361
+ /**
3362
+ * @returns {string}
3363
+ */
3364
+ get completionText() {
3365
+ let deferred1_0;
3366
+ let deferred1_1;
3367
+ try {
3368
+ const ret = wasm.shellcompletioncandidate_completionText(this.__wbg_ptr);
3369
+ deferred1_0 = ret[0];
3370
+ deferred1_1 = ret[1];
3371
+ return getStringFromWasm0(ret[0], ret[1]);
3372
+ } finally {
3373
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
3374
+ }
3375
+ }
3376
+ };
3377
+ if (Symbol.dispose) ShellCompletionCandidate.prototype[Symbol.dispose] = ShellCompletionCandidate.prototype.free;
3378
+ var ShellCompletionListFinalization = typeof FinalizationRegistry === "undefined" ? {
3379
+ register: () => {},
3380
+ unregister: () => {}
3381
+ } : new FinalizationRegistry((ptr) => wasm.__wbg_shellcompletionlist_free(ptr >>> 0, 1));
3382
+ /**
3383
+ * The completion list that the host shows over the terminal
3384
+ */
3385
+ var ShellCompletionList = class ShellCompletionList {
3386
+ static __wrap(ptr) {
3387
+ ptr = ptr >>> 0;
3388
+ const obj = Object.create(ShellCompletionList.prototype);
3389
+ obj.__wbg_ptr = ptr;
3390
+ ShellCompletionListFinalization.register(obj, obj.__wbg_ptr, obj);
3391
+ return obj;
3392
+ }
3393
+ __destroy_into_raw() {
3394
+ const ptr = this.__wbg_ptr;
3395
+ this.__wbg_ptr = 0;
3396
+ ShellCompletionListFinalization.unregister(this);
3397
+ return ptr;
3398
+ }
3399
+ free() {
3400
+ const ptr = this.__destroy_into_raw();
3401
+ wasm.__wbg_shellcompletionlist_free(ptr, 0);
3402
+ }
3403
+ /**
3404
+ * The terminal column of the start of the replaced text
3405
+ * @returns {number}
3406
+ */
3407
+ get anchorColumn() {
3408
+ return wasm.shellcompletionlist_anchorColumn(this.__wbg_ptr) >>> 0;
3409
+ }
3410
+ /**
3411
+ * The index of the selected catalog object of the selected candidate
3412
+ * @returns {number}
3413
+ */
3414
+ get variant() {
3415
+ return wasm.shellcompletionlist_variant(this.__wbg_ptr) >>> 0;
3416
+ }
3417
+ /**
3418
+ * Changes when the candidates change, `terminalCompletionBuffer` only has to be read then
3419
+ * @returns {bigint}
3420
+ */
3421
+ get revision() {
3422
+ const ret = wasm.shellcompletionlist_revision(this.__wbg_ptr);
3423
+ return BigInt.asUintN(64, ret);
3424
+ }
3425
+ /**
3426
+ * The index of the selected candidate
3427
+ * @returns {number}
3428
+ */
3429
+ get selection() {
3430
+ return wasm.shellcompletionlist_selection(this.__wbg_ptr) >>> 0;
3431
+ }
3432
+ };
3433
+ if (Symbol.dispose) ShellCompletionList.prototype[Symbol.dispose] = ShellCompletionList.prototype.free;
3434
+ var ShellOperationFinalization = typeof FinalizationRegistry === "undefined" ? {
3435
+ register: () => {},
3436
+ unregister: () => {}
3437
+ } : new FinalizationRegistry((ptr) => wasm.__wbg_shelloperation_free(ptr >>> 0, 1));
3438
+ /**
3439
+ * The result of an operation: rendered output, an effect or an error
3440
+ */
3441
+ var ShellOperation = class ShellOperation {
3442
+ static __wrap(ptr) {
3443
+ ptr = ptr >>> 0;
3444
+ const obj = Object.create(ShellOperation.prototype);
3445
+ obj.__wbg_ptr = ptr;
3446
+ ShellOperationFinalization.register(obj, obj.__wbg_ptr, obj);
3447
+ return obj;
3448
+ }
3449
+ __destroy_into_raw() {
3450
+ const ptr = this.__wbg_ptr;
3451
+ this.__wbg_ptr = 0;
3452
+ ShellOperationFinalization.unregister(this);
3453
+ return ptr;
3454
+ }
3455
+ free() {
3456
+ const ptr = this.__destroy_into_raw();
3457
+ wasm.__wbg_shelloperation_free(ptr, 0);
3458
+ }
3459
+ /**
3460
+ * The effect type of a pending operation (`DashQLShellEffectType`)
3461
+ * @returns {number | undefined}
3462
+ */
3463
+ get effectType() {
3464
+ const ret = wasm.shelloperation_effectType(this.__wbg_ptr);
3465
+ return ret === 4294967297 ? void 0 : ret;
3466
+ }
3467
+ /**
3468
+ * The effect payload of a pending operation: the query or the dot command
3469
+ * @returns {string | undefined}
3470
+ */
3471
+ get effectPayload() {
3472
+ const ret = wasm.shelloperation_effectPayload(this.__wbg_ptr);
3473
+ let v1;
3474
+ if (ret[0] !== 0) {
3475
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
3476
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
3477
+ }
3478
+ return v1;
3479
+ }
3480
+ /**
3481
+ * The data as text (output or error message)
3482
+ * @returns {string}
3483
+ */
3484
+ get text() {
3485
+ let deferred1_0;
3486
+ let deferred1_1;
3487
+ try {
3488
+ const ret = wasm.shelloperation_text(this.__wbg_ptr);
3489
+ deferred1_0 = ret[0];
3490
+ deferred1_1 = ret[1];
3491
+ return getStringFromWasm0(ret[0], ret[1]);
3492
+ } finally {
3493
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
3494
+ }
3495
+ }
3496
+ /**
3497
+ * The `DashQLShellStatus`, `PENDING` if the operation waits for an effect
3498
+ * @returns {number}
3499
+ */
3500
+ get status() {
3501
+ return wasm.shelloperation_status(this.__wbg_ptr) >>> 0;
3502
+ }
3503
+ /**
3504
+ * The effect id of a pending operation
3505
+ * @returns {bigint | undefined}
3506
+ */
3507
+ get effectId() {
3508
+ const ret = wasm.shelloperation_effectId(this.__wbg_ptr);
3509
+ return ret[0] === 0 ? void 0 : BigInt.asUintN(64, ret[1]);
3510
+ }
3511
+ };
3512
+ if (Symbol.dispose) ShellOperation.prototype[Symbol.dispose] = ShellOperation.prototype.free;
3513
+ var ShellPromptResultFinalization = typeof FinalizationRegistry === "undefined" ? {
3514
+ register: () => {},
3515
+ unregister: () => {}
3516
+ } : new FinalizationRegistry((ptr) => wasm.__wbg_shellpromptresult_free(ptr >>> 0, 1));
3517
+ /**
3518
+ * A prompt after an input
3519
+ */
3520
+ var ShellPromptResult = class ShellPromptResult {
3521
+ static __wrap(ptr) {
3522
+ ptr = ptr >>> 0;
3523
+ const obj = Object.create(ShellPromptResult.prototype);
3524
+ obj.__wbg_ptr = ptr;
3525
+ ShellPromptResultFinalization.register(obj, obj.__wbg_ptr, obj);
3526
+ return obj;
3527
+ }
3528
+ __destroy_into_raw() {
3529
+ const ptr = this.__wbg_ptr;
3530
+ this.__wbg_ptr = 0;
3531
+ ShellPromptResultFinalization.unregister(this);
3532
+ return ptr;
3533
+ }
3534
+ free() {
3535
+ const ptr = this.__destroy_into_raw();
3536
+ wasm.__wbg_shellpromptresult_free(ptr, 0);
3537
+ }
3538
+ /**
3539
+ * The UTF-8 byte offset of the cursor
3540
+ * @returns {number}
3541
+ */
3542
+ get cursorByteOffset() {
3543
+ return wasm.shellcompletionlist_selection(this.__wbg_ptr) >>> 0;
3544
+ }
3545
+ /**
3546
+ * @returns {string}
3547
+ */
3548
+ get text() {
3549
+ let deferred1_0;
3550
+ let deferred1_1;
3551
+ try {
3552
+ const ret = wasm.shellpromptresult_text(this.__wbg_ptr);
3553
+ deferred1_0 = ret[0];
3554
+ deferred1_1 = ret[1];
3555
+ return getStringFromWasm0(ret[0], ret[1]);
3556
+ } finally {
3557
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
3558
+ }
3559
+ }
3560
+ /**
3561
+ * The `DashQLShellPromptAction`
3562
+ * @returns {number}
3563
+ */
3564
+ get action() {
3565
+ return wasm.shellpromptresult_action(this.__wbg_ptr) >>> 0;
3566
+ }
3567
+ /**
3568
+ * The `DashQLShellStatus`
3569
+ * @returns {number}
3570
+ */
3571
+ get status() {
3572
+ return wasm.shellpromptresult_status(this.__wbg_ptr) >>> 0;
3573
+ }
3574
+ /**
3575
+ * The error message if the status is not OK
3576
+ * @returns {string}
3577
+ */
3578
+ get message() {
3579
+ let deferred1_0;
3580
+ let deferred1_1;
3581
+ try {
3582
+ const ret = wasm.shellpromptresult_message(this.__wbg_ptr);
3583
+ deferred1_0 = ret[0];
3584
+ deferred1_1 = ret[1];
3585
+ return getStringFromWasm0(ret[0], ret[1]);
3586
+ } finally {
3587
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
3588
+ }
3589
+ }
3590
+ /**
3591
+ * The prompt revision, bumped by every edit
3592
+ * @returns {bigint}
3593
+ */
3594
+ get revision() {
3595
+ const ret = wasm.shellcompletionlist_revision(this.__wbg_ptr);
3596
+ return BigInt.asUintN(64, ret);
3597
+ }
3598
+ };
3599
+ if (Symbol.dispose) ShellPromptResult.prototype[Symbol.dispose] = ShellPromptResult.prototype.free;
3600
+ var ShellTerminalResultFinalization = typeof FinalizationRegistry === "undefined" ? {
3601
+ register: () => {},
3602
+ unregister: () => {}
3603
+ } : new FinalizationRegistry((ptr) => wasm.__wbg_shellterminalresult_free(ptr >>> 0, 1));
3604
+ /**
3605
+ * Terminal output
3606
+ */
3607
+ var ShellTerminalResult = class ShellTerminalResult {
3608
+ static __wrap(ptr) {
3609
+ ptr = ptr >>> 0;
3610
+ const obj = Object.create(ShellTerminalResult.prototype);
3611
+ obj.__wbg_ptr = ptr;
3612
+ ShellTerminalResultFinalization.register(obj, obj.__wbg_ptr, obj);
3613
+ return obj;
3614
+ }
3615
+ __destroy_into_raw() {
3616
+ const ptr = this.__wbg_ptr;
3617
+ this.__wbg_ptr = 0;
3618
+ ShellTerminalResultFinalization.unregister(this);
3619
+ return ptr;
3620
+ }
3621
+ free() {
3622
+ const ptr = this.__destroy_into_raw();
3623
+ wasm.__wbg_shellterminalresult_free(ptr, 0);
3624
+ }
3625
+ /**
3626
+ * The VT100 output, or the error message if the status is not OK
3627
+ * @returns {string}
3628
+ */
3629
+ get data() {
3630
+ let deferred1_0;
3631
+ let deferred1_1;
3632
+ try {
3633
+ const ret = wasm.shellterminalresult_data(this.__wbg_ptr);
3634
+ deferred1_0 = ret[0];
3635
+ deferred1_1 = ret[1];
3636
+ return getStringFromWasm0(ret[0], ret[1]);
3637
+ } finally {
3638
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
3639
+ }
3640
+ }
3641
+ /**
3642
+ * The `DashQLShellPromptAction`
3643
+ * @returns {number}
3644
+ */
3645
+ get action() {
3646
+ return wasm.shellterminalresult_action(this.__wbg_ptr) >>> 0;
3647
+ }
3648
+ /**
3649
+ * The `DashQLShellStatus`
3650
+ * @returns {number}
3651
+ */
3652
+ get status() {
3653
+ return wasm.shellterminalresult_status(this.__wbg_ptr) >>> 0;
3654
+ }
3655
+ };
3656
+ if (Symbol.dispose) ShellTerminalResult.prototype[Symbol.dispose] = ShellTerminalResult.prototype.free;
3657
+ var TableParametersFinalization = typeof FinalizationRegistry === "undefined" ? {
3658
+ register: () => {},
3659
+ unregister: () => {}
3660
+ } : new FinalizationRegistry((ptr) => wasm.__wbg_tableparameters_free(ptr >>> 0, 1));
3661
+ /**
3662
+ * The table parameters of a session (`table_parameters::TableParameters`)
3663
+ */
3664
+ var TableParameters = class {
3665
+ __destroy_into_raw() {
3666
+ const ptr = this.__wbg_ptr;
3667
+ this.__wbg_ptr = 0;
3668
+ TableParametersFinalization.unregister(this);
3669
+ return ptr;
3670
+ }
3671
+ free() {
3672
+ const ptr = this.__destroy_into_raw();
3673
+ wasm.__wbg_tableparameters_free(ptr, 0);
3674
+ }
3675
+ constructor() {
3676
+ const ret = wasm.tableparameters_new();
3677
+ this.__wbg_ptr = ret >>> 0;
3678
+ TableParametersFinalization.register(this, this.__wbg_ptr, this);
3679
+ return this;
3680
+ }
3681
+ /**
3682
+ * Give the published table parameters to a session that is no script of the session, e.g. a draft
3683
+ * @param {ScriptSession} session
3684
+ * @returns {boolean}
3685
+ */
3686
+ attach(session) {
3687
+ _assertClass(session, ScriptSession);
3688
+ return wasm.tableparameters_attach(this.__wbg_ptr, session.__wbg_ptr) !== 0;
3689
+ }
3690
+ /**
3691
+ * Derive the table parameters from the analyses of the scripts and the attachments of a request and give them to
3692
+ * the sessions of the scripts. Returns the indexes of the scripts whose analysis is outdated by them, every script
3693
+ * if they changed. A script whose analysis lags behind its text keeps its previous result.
3694
+ * @param {SessionPlanRequest} request
3695
+ * @returns {Uint32Array}
3696
+ */
3697
+ publish(request) {
3698
+ _assertClass(request, SessionPlanRequest);
3699
+ const ret = wasm.tableparameters_publish(this.__wbg_ptr, request.__wbg_ptr);
3700
+ var v1 = getArrayU32FromWasm0(ret[0], ret[1]).slice();
3701
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
3702
+ return v1;
3703
+ }
3704
+ };
3705
+ if (Symbol.dispose) TableParameters.prototype[Symbol.dispose] = TableParameters.prototype.free;
3706
+ var WorkbookScriptSessionFinalization = typeof FinalizationRegistry === "undefined" ? {
3707
+ register: () => {},
3708
+ unregister: () => {}
3709
+ } : new FinalizationRegistry((ptr) => wasm.__wbg_workbookscriptsession_free(ptr >>> 0, 1));
3710
+ /**
3711
+ * The session of a script of a workbook of a runtime, shared with the workbook. It reads the script and computes texts
3712
+ * from it, it never changes the text, the analysis or the cursor of the session: the editors change it through the
3713
+ * runtime (`Runtime.applyEditorEvent`), which writes and publishes what changed. A session that the runtime holds
3714
+ * borrowed fails the call instead of panicking.
3715
+ */
3716
+ var WorkbookScriptSession = class WorkbookScriptSession {
3717
+ static __wrap(ptr) {
3718
+ ptr = ptr >>> 0;
3719
+ const obj = Object.create(WorkbookScriptSession.prototype);
3720
+ obj.__wbg_ptr = ptr;
3721
+ WorkbookScriptSessionFinalization.register(obj, obj.__wbg_ptr, obj);
3722
+ return obj;
3723
+ }
3724
+ __destroy_into_raw() {
3725
+ const ptr = this.__wbg_ptr;
3726
+ this.__wbg_ptr = 0;
3727
+ WorkbookScriptSessionFinalization.unregister(this);
3728
+ return ptr;
3729
+ }
3730
+ free() {
3731
+ const ptr = this.__destroy_into_raw();
3732
+ wasm.__wbg_workbookscriptsession_free(ptr, 0);
3733
+ }
3734
+ /**
3735
+ * Format the script into a new script of another catalog
3736
+ * @param {number} dialect
3737
+ * @param {number} mode
3738
+ * @param {number} max_width
3739
+ * @param {number} indentation_width
3740
+ * @param {boolean} debug_mode
3741
+ * @param {number} keyword_case
3742
+ * @param {boolean} parse_if_outdated
3743
+ * @param {Catalog} catalog
3744
+ * @returns {Script}
3745
+ */
3746
+ formatInto(dialect, mode, max_width, indentation_width, debug_mode, keyword_case, parse_if_outdated, catalog) {
3747
+ _assertClass(catalog, Catalog);
3748
+ const ret = wasm.workbookscriptsession_formatInto(this.__wbg_ptr, dialect, mode, max_width, indentation_width, debug_mode, keyword_case, parse_if_outdated, catalog.__wbg_ptr);
3749
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
3750
+ return Script.__wrap(ret[0]);
3751
+ }
3752
+ /**
3753
+ * The packed `ScriptDiff` from the session script to a target script
3754
+ * @param {Script} target
3755
+ * @returns {Uint8Array}
3756
+ */
3757
+ computeDiff(target) {
3758
+ _assertClass(target, Script);
3759
+ const ret = wasm.workbookscriptsession_computeDiff(this.__wbg_ptr, target.__wbg_ptr);
3760
+ if (ret[3]) throw takeFromExternrefTable0(ret[2]);
3761
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
3762
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
3763
+ return v1;
3764
+ }
3765
+ /**
3766
+ * @returns {bigint}
3767
+ */
3768
+ textVersion() {
3769
+ const ret = wasm.workbookscriptsession_textVersion(this.__wbg_ptr);
3770
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
3771
+ return BigInt.asUintN(64, ret[0]);
3772
+ }
3773
+ /**
3774
+ * Compile the script, returns the packed `ScriptCompilationResult`
3775
+ * @param {number} dialect
3776
+ * @param {number} mode
3777
+ * @param {number} max_width
3778
+ * @param {number} indentation_width
3779
+ * @param {boolean} allow_extensions
3780
+ * @param {boolean} parse_if_outdated
3781
+ * @returns {Uint8Array}
3782
+ */
3783
+ compileQuery(dialect, mode, max_width, indentation_width, allow_extensions, parse_if_outdated) {
3784
+ const ret = wasm.workbookscriptsession_compileQuery(this.__wbg_ptr, dialect, mode, max_width, indentation_width, allow_extensions, parse_if_outdated);
3785
+ if (ret[3]) throw takeFromExternrefTable0(ret[2]);
3786
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
3787
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
3788
+ return v1;
3789
+ }
3790
+ /**
3791
+ * @returns {bigint}
3792
+ */
3793
+ stateRevision() {
3794
+ const ret = wasm.workbookscriptsession_stateRevision(this.__wbg_ptr);
3795
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
3796
+ return BigInt.asUintN(64, ret[0]);
3797
+ }
3798
+ /**
3799
+ * The annotation of a statement as JSON, like `Script.readAnnotation`
3800
+ * @param {number} statement_id
3801
+ * @param {boolean} parse_if_outdated
3802
+ * @returns {string}
3803
+ */
3804
+ readAnnotation(statement_id, parse_if_outdated) {
3805
+ let deferred2_0;
3806
+ let deferred2_1;
3807
+ try {
3808
+ const ret = wasm.workbookscriptsession_readAnnotation(this.__wbg_ptr, statement_id, parse_if_outdated);
3809
+ var ptr1 = ret[0];
3810
+ var len1 = ret[1];
3811
+ if (ret[3]) {
3812
+ ptr1 = 0;
3813
+ len1 = 0;
3814
+ throw takeFromExternrefTable0(ret[2]);
3815
+ }
3816
+ deferred2_0 = ptr1;
3817
+ deferred2_1 = len1;
3818
+ return getStringFromWasm0(ptr1, len1);
3819
+ } finally {
3820
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
3821
+ }
3822
+ }
3823
+ /**
3824
+ * Remove the `@flow` tag of the script. Returns the new text, the session stays.
3825
+ * @param {boolean} parse_if_outdated
3826
+ * @returns {string}
3827
+ */
3828
+ removeVisFlow(parse_if_outdated) {
3829
+ let deferred2_0;
3830
+ let deferred2_1;
3831
+ try {
3832
+ const ret = wasm.workbookscriptsession_removeVisFlow(this.__wbg_ptr, parse_if_outdated);
3833
+ var ptr1 = ret[0];
3834
+ var len1 = ret[1];
3835
+ if (ret[3]) {
3836
+ ptr1 = 0;
3837
+ len1 = 0;
3838
+ throw takeFromExternrefTable0(ret[2]);
3839
+ }
3840
+ deferred2_0 = ptr1;
3841
+ deferred2_1 = len1;
3842
+ return getStringFromWasm0(ptr1, len1);
3843
+ } finally {
3844
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
3845
+ }
3846
+ }
3847
+ /**
3848
+ * @returns {number}
3849
+ */
3850
+ catalogEntryId() {
3851
+ const ret = wasm.workbookscriptsession_catalogEntryId(this.__wbg_ptr);
3852
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
3853
+ return ret[0] >>> 0;
3854
+ }
3855
+ /**
3856
+ * @returns {bigint}
3857
+ */
3858
+ catalogRevision() {
3859
+ const ret = wasm.workbookscriptsession_catalogRevision(this.__wbg_ptr);
3860
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
3861
+ return BigInt.asUintN(64, ret[0]);
3862
+ }
3863
+ /**
3864
+ * Remove the `@param` tags of an input of the script. Returns the new text, the session stays.
3865
+ * @param {string} name
3866
+ * @param {boolean} parse_if_outdated
3867
+ * @returns {string}
3868
+ */
3869
+ removeParamTag(name, parse_if_outdated) {
3870
+ let deferred3_0;
3871
+ let deferred3_1;
3872
+ try {
3873
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3874
+ const len0 = WASM_VECTOR_LEN;
3875
+ const ret = wasm.workbookscriptsession_removeParamTag(this.__wbg_ptr, ptr0, len0, parse_if_outdated);
3876
+ var ptr2 = ret[0];
3877
+ var len2 = ret[1];
3878
+ if (ret[3]) {
3879
+ ptr2 = 0;
3880
+ len2 = 0;
3881
+ throw takeFromExternrefTable0(ret[2]);
3882
+ }
3883
+ deferred3_0 = ptr2;
3884
+ deferred3_1 = len2;
3885
+ return getStringFromWasm0(ptr2, len2);
3886
+ } finally {
3887
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
3888
+ }
3889
+ }
3890
+ /**
3891
+ * Set the `@flow` tag of the script. Returns the new text, the session stays.
3892
+ * @param {number | null | undefined} x
3893
+ * @param {number | null | undefined} y
3894
+ * @param {number | null | undefined} width
3895
+ * @param {number | null | undefined} height
3896
+ * @param {boolean} parse_if_outdated
3897
+ * @returns {string}
3898
+ */
3899
+ rewriteVisFlow(x, y, width, height, parse_if_outdated) {
3900
+ let deferred2_0;
3901
+ let deferred2_1;
3902
+ try {
3903
+ 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);
3904
+ var ptr1 = ret[0];
3905
+ var len1 = ret[1];
3906
+ if (ret[3]) {
3907
+ ptr1 = 0;
3908
+ len1 = 0;
3909
+ throw takeFromExternrefTable0(ret[2]);
3910
+ }
3911
+ deferred2_0 = ptr1;
3912
+ deferred2_1 = len1;
3913
+ return getStringFromWasm0(ptr1, len1);
3914
+ } finally {
3915
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
3916
+ }
3917
+ }
3918
+ /**
3919
+ * Set the `@param` tag of an input of the script. Returns the new text, the session stays.
3920
+ * @param {string} name
3921
+ * @param {string} value
3922
+ * @param {boolean} parse_if_outdated
3923
+ * @returns {string}
3924
+ */
3925
+ rewriteParamTag(name, value, parse_if_outdated) {
3926
+ let deferred4_0;
3927
+ let deferred4_1;
3928
+ try {
3929
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3930
+ const len0 = WASM_VECTOR_LEN;
3931
+ const ptr1 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3932
+ const len1 = WASM_VECTOR_LEN;
3933
+ const ret = wasm.workbookscriptsession_rewriteParamTag(this.__wbg_ptr, ptr0, len0, ptr1, len1, parse_if_outdated);
3934
+ var ptr3 = ret[0];
3935
+ var len3 = ret[1];
3936
+ if (ret[3]) {
3937
+ ptr3 = 0;
3938
+ len3 = 0;
3939
+ throw takeFromExternrefTable0(ret[2]);
3940
+ }
3941
+ deferred4_0 = ptr3;
3942
+ deferred4_1 = len3;
3943
+ return getStringFromWasm0(ptr3, len3);
3944
+ } finally {
3945
+ wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
3946
+ }
3947
+ }
3948
+ /**
3949
+ * Set the `@board` tag of a query, negative rows and columns are absent. Returns the new text, the session stays.
3950
+ * @param {number} statement_id
3951
+ * @param {number} row
3952
+ * @param {number} column
3953
+ * @param {number} width
3954
+ * @param {number} height
3955
+ * @param {boolean} parse_if_outdated
3956
+ * @returns {string}
3957
+ */
3958
+ rewriteVisBoard(statement_id, row, column, width, height, parse_if_outdated) {
3959
+ let deferred2_0;
3960
+ let deferred2_1;
3961
+ try {
3962
+ const ret = wasm.workbookscriptsession_rewriteVisBoard(this.__wbg_ptr, statement_id, row, column, width, height, parse_if_outdated);
3963
+ var ptr1 = ret[0];
3964
+ var len1 = ret[1];
3965
+ if (ret[3]) {
3966
+ ptr1 = 0;
3967
+ len1 = 0;
3968
+ throw takeFromExternrefTable0(ret[2]);
3969
+ }
3970
+ deferred2_0 = ptr1;
3971
+ deferred2_1 = len1;
3972
+ return getStringFromWasm0(ptr1, len1);
3973
+ } finally {
3974
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
3975
+ }
3976
+ }
3977
+ /**
3978
+ * Complete at the primary cursor, returns the packed `Completion`
3979
+ * @param {number} limit
3980
+ * @param {number} keyword_case
3981
+ * @returns {Uint8Array}
3982
+ */
3983
+ completeAtCursor(limit, keyword_case) {
3984
+ const ret = wasm.workbookscriptsession_completeAtCursor(this.__wbg_ptr, limit, keyword_case);
3985
+ if (ret[3]) throw takeFromExternrefTable0(ret[2]);
3986
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
3987
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
3988
+ return v1;
3989
+ }
3990
+ /**
3991
+ * Replace the annotation of a statement, given as JSON. Returns the new text, the session stays.
3992
+ * @param {number} statement_id
3993
+ * @param {string} annotation
3994
+ * @param {boolean} parse_if_outdated
3995
+ * @returns {string}
3996
+ */
3997
+ rewriteAnnotation(statement_id, annotation, parse_if_outdated) {
3998
+ let deferred3_0;
3999
+ let deferred3_1;
4000
+ try {
4001
+ const ptr0 = passStringToWasm0(annotation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
4002
+ const len0 = WASM_VECTOR_LEN;
4003
+ const ret = wasm.workbookscriptsession_rewriteAnnotation(this.__wbg_ptr, statement_id, ptr0, len0, parse_if_outdated);
4004
+ var ptr2 = ret[0];
4005
+ var len2 = ret[1];
4006
+ if (ret[3]) {
4007
+ ptr2 = 0;
4008
+ len2 = 0;
4009
+ throw takeFromExternrefTable0(ret[2]);
4010
+ }
4011
+ deferred3_0 = ptr2;
4012
+ deferred3_1 = len2;
4013
+ return getStringFromWasm0(ptr2, len2);
4014
+ } finally {
4015
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
4016
+ }
4017
+ }
4018
+ /**
4019
+ * Can formatting represent every node?
4020
+ * @param {number} dialect
4021
+ * @param {number} mode
4022
+ * @param {number} max_width
4023
+ * @param {number} indentation_width
4024
+ * @param {boolean} debug_mode
4025
+ * @param {boolean} parse_if_outdated
4026
+ * @returns {boolean}
4027
+ */
4028
+ isFullyFormattable(dialect, mode, max_width, indentation_width, debug_mode, parse_if_outdated) {
4029
+ const ret = wasm.workbookscriptsession_isFullyFormattable(this.__wbg_ptr, dialect, mode, max_width, indentation_width, debug_mode, parse_if_outdated);
4030
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
4031
+ return ret[0] !== 0;
4032
+ }
4033
+ /**
4034
+ * Set the renderer tag of a query, an empty kind removes it. Returns the new text, the session stays.
4035
+ * @param {number} statement_id
4036
+ * @param {string} kind
4037
+ * @param {string} body
4038
+ * @param {boolean} parse_if_outdated
4039
+ * @returns {string}
4040
+ */
4041
+ rewriteVisRenderer(statement_id, kind, body, parse_if_outdated) {
4042
+ let deferred4_0;
4043
+ let deferred4_1;
4044
+ try {
4045
+ const ptr0 = passStringToWasm0(kind, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
4046
+ const len0 = WASM_VECTOR_LEN;
4047
+ const ptr1 = passStringToWasm0(body, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
4048
+ const len1 = WASM_VECTOR_LEN;
4049
+ const ret = wasm.workbookscriptsession_rewriteVisRenderer(this.__wbg_ptr, statement_id, ptr0, len0, ptr1, len1, parse_if_outdated);
4050
+ var ptr3 = ret[0];
4051
+ var len3 = ret[1];
4052
+ if (ret[3]) {
4053
+ ptr3 = 0;
4054
+ len3 = 0;
4055
+ throw takeFromExternrefTable0(ret[2]);
4056
+ }
4057
+ deferred4_0 = ptr3;
4058
+ deferred4_1 = len3;
4059
+ return getStringFromWasm0(ptr3, len3);
4060
+ } finally {
4061
+ wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
4062
+ }
4063
+ }
4064
+ /**
4065
+ * See `ScriptSession.findScriptReferences`
4066
+ * @param {string[]} names
4067
+ * @returns {Uint32Array}
4068
+ */
4069
+ findScriptReferences(names) {
4070
+ const ptr0 = passArrayJsValueToWasm0(names, wasm.__wbindgen_malloc);
4071
+ const len0 = WASM_VECTOR_LEN;
4072
+ const ret = wasm.workbookscriptsession_findScriptReferences(this.__wbg_ptr, ptr0, len0);
4073
+ if (ret[3]) throw takeFromExternrefTable0(ret[2]);
4074
+ var v2 = getArrayU32FromWasm0(ret[0], ret[1]).slice();
4075
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
4076
+ return v2;
4077
+ }
4078
+ /**
4079
+ * @returns {string}
4080
+ */
4081
+ text() {
4082
+ let deferred2_0;
4083
+ let deferred2_1;
4084
+ try {
4085
+ const ret = wasm.workbookscriptsession_text(this.__wbg_ptr);
4086
+ var ptr1 = ret[0];
4087
+ var len1 = ret[1];
4088
+ if (ret[3]) {
4089
+ ptr1 = 0;
4090
+ len1 = 0;
4091
+ throw takeFromExternrefTable0(ret[2]);
4092
+ }
4093
+ deferred2_0 = ptr1;
4094
+ deferred2_1 = len1;
4095
+ return getStringFromWasm0(ptr1, len1);
4096
+ } finally {
4097
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
4098
+ }
4099
+ }
4100
+ /**
4101
+ * Format the script into a new script of the session catalog
4102
+ * @param {number} dialect
4103
+ * @param {number} mode
4104
+ * @param {number} max_width
4105
+ * @param {number} indentation_width
4106
+ * @param {boolean} debug_mode
4107
+ * @param {number} keyword_case
4108
+ * @param {boolean} parse_if_outdated
4109
+ * @returns {Script}
4110
+ */
4111
+ format(dialect, mode, max_width, indentation_width, debug_mode, keyword_case, parse_if_outdated) {
4112
+ const ret = wasm.workbookscriptsession_format(this.__wbg_ptr, dialect, mode, max_width, indentation_width, debug_mode, keyword_case, parse_if_outdated);
4113
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
4114
+ return Script.__wrap(ret[0]);
4115
+ }
4116
+ };
4117
+ if (Symbol.dispose) WorkbookScriptSession.prototype[Symbol.dispose] = WorkbookScriptSession.prototype.free;
4118
+ var EXPECTED_RESPONSE_TYPES = /* @__PURE__ */ new Set([
4119
+ "basic",
4120
+ "cors",
4121
+ "default"
4122
+ ]);
4123
+ async function __wbg_load(module, imports) {
4124
+ if (typeof Response === "function" && module instanceof Response) {
4125
+ if (typeof WebAssembly.instantiateStreaming === "function") try {
4126
+ return await WebAssembly.instantiateStreaming(module, imports);
4127
+ } catch (e) {
4128
+ 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);
4129
+ else throw e;
4130
+ }
4131
+ const bytes = await module.arrayBuffer();
4132
+ return await WebAssembly.instantiate(bytes, imports);
4133
+ } else {
4134
+ const instance = await WebAssembly.instantiate(module, imports);
4135
+ if (instance instanceof WebAssembly.Instance) return {
4136
+ instance,
4137
+ module
4138
+ };
4139
+ else return instance;
4140
+ }
4141
+ }
4142
+ function __wbg_get_imports() {
4143
+ const imports = {};
4144
+ imports.wbg = {};
4145
+ imports.wbg.__wbg_Error_e83987f665cf5504 = function(arg0, arg1) {
4146
+ return Error(getStringFromWasm0(arg0, arg1));
4147
+ };
4148
+ imports.wbg.__wbg_Number_bb48ca12f395cd08 = function(arg0) {
4149
+ return Number(arg0);
4150
+ };
4151
+ imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
4152
+ const ptr1 = passStringToWasm0(String(arg1), wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
4153
+ const len1 = WASM_VECTOR_LEN;
4154
+ getDataViewMemory0().setInt32(arg0 + 4, len1, true);
4155
+ getDataViewMemory0().setInt32(arg0 + 0, ptr1, true);
4156
+ };
4157
+ imports.wbg.__wbg___dashqlCorePanic_9fd9283c31c10930 = function() {
4158
+ return handleError(function(arg0, arg1) {
4159
+ globalThis.__dashqlCorePanic(getStringFromWasm0(arg0, arg1));
4160
+ }, arguments);
4161
+ };
4162
+ imports.wbg.__wbg___wbindgen_bigint_get_as_i64_f3ebc5a755000afd = function(arg0, arg1) {
4163
+ const v = arg1;
4164
+ const ret = typeof v === "bigint" ? v : void 0;
4165
+ getDataViewMemory0().setBigInt64(arg0 + 8, isLikeNone(ret) ? BigInt(0) : ret, true);
4166
+ getDataViewMemory0().setInt32(arg0 + 0, !isLikeNone(ret), true);
4167
+ };
4168
+ imports.wbg.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68 = function(arg0) {
4169
+ const v = arg0;
4170
+ const ret = typeof v === "boolean" ? v : void 0;
4171
+ return isLikeNone(ret) ? 16777215 : ret ? 1 : 0;
4172
+ };
4173
+ imports.wbg.__wbg___wbindgen_debug_string_df47ffb5e35e6763 = function(arg0, arg1) {
4174
+ const ptr1 = passStringToWasm0(debugString(arg1), wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
4175
+ const len1 = WASM_VECTOR_LEN;
4176
+ getDataViewMemory0().setInt32(arg0 + 4, len1, true);
4177
+ getDataViewMemory0().setInt32(arg0 + 0, ptr1, true);
4178
+ };
4179
+ imports.wbg.__wbg___wbindgen_in_bb933bd9e1b3bc0f = function(arg0, arg1) {
4180
+ return arg0 in arg1;
4181
+ };
4182
+ imports.wbg.__wbg___wbindgen_is_bigint_cb320707dcd35f0b = function(arg0) {
4183
+ return typeof arg0 === "bigint";
4184
+ };
4185
+ imports.wbg.__wbg___wbindgen_is_falsy_46b8d2f2aba49112 = function(arg0) {
4186
+ return !arg0;
4187
+ };
4188
+ imports.wbg.__wbg___wbindgen_is_function_ee8a6c5833c90377 = function(arg0) {
4189
+ return typeof arg0 === "function";
4190
+ };
4191
+ imports.wbg.__wbg___wbindgen_is_null_5e69f72e906cc57c = function(arg0) {
4192
+ return arg0 === null;
4193
+ };
4194
+ imports.wbg.__wbg___wbindgen_is_object_c818261d21f283a4 = function(arg0) {
4195
+ const val = arg0;
4196
+ return typeof val === "object" && val !== null;
4197
+ };
4198
+ imports.wbg.__wbg___wbindgen_is_string_fbb76cb2940daafd = function(arg0) {
4199
+ return typeof arg0 === "string";
4200
+ };
4201
+ imports.wbg.__wbg___wbindgen_is_symbol_aee00aa499a60051 = function(arg0) {
4202
+ return typeof arg0 === "symbol";
4203
+ };
4204
+ imports.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478 = function(arg0) {
4205
+ return arg0 === void 0;
4206
+ };
4207
+ imports.wbg.__wbg___wbindgen_jsval_eq_6b13ab83478b1c50 = function(arg0, arg1) {
4208
+ return arg0 === arg1;
4209
+ };
4210
+ imports.wbg.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147 = function(arg0, arg1) {
4211
+ return arg0 == arg1;
4212
+ };
4213
+ imports.wbg.__wbg___wbindgen_number_get_a20bf9b85341449d = function(arg0, arg1) {
4214
+ const obj = arg1;
4215
+ const ret = typeof obj === "number" ? obj : void 0;
4216
+ getDataViewMemory0().setFloat64(arg0 + 8, isLikeNone(ret) ? 0 : ret, true);
4217
+ getDataViewMemory0().setInt32(arg0 + 0, !isLikeNone(ret), true);
4218
+ };
4219
+ imports.wbg.__wbg___wbindgen_string_get_e4f06c90489ad01b = function(arg0, arg1) {
4220
+ const obj = arg1;
4221
+ const ret = typeof obj === "string" ? obj : void 0;
4222
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
4223
+ var len1 = WASM_VECTOR_LEN;
4224
+ getDataViewMemory0().setInt32(arg0 + 4, len1, true);
4225
+ getDataViewMemory0().setInt32(arg0 + 0, ptr1, true);
4226
+ };
4227
+ imports.wbg.__wbg___wbindgen_throw_b855445ff6a94295 = function(arg0, arg1) {
4228
+ throw new Error(getStringFromWasm0(arg0, arg1));
4229
+ };
4230
+ imports.wbg.__wbg__wbg_cb_unref_2454a539ea5790d9 = function(arg0) {
4231
+ arg0._wbg_cb_unref();
4232
+ };
4233
+ imports.wbg.__wbg_apply_04097a755e1e4a1e = function() {
4234
+ return handleError(function(arg0, arg1, arg2) {
4235
+ return arg0.apply(arg1, arg2);
4236
+ }, arguments);
4237
+ };
4238
+ imports.wbg.__wbg_call_357bb72daee10695 = function() {
4239
+ return handleError(function(arg0, arg1, arg2, arg3, arg4) {
4240
+ return arg0.call(arg1, arg2, arg3, arg4);
4241
+ }, arguments);
4242
+ };
4243
+ imports.wbg.__wbg_call_525440f72fbfc0ea = function() {
4244
+ return handleError(function(arg0, arg1, arg2) {
4245
+ return arg0.call(arg1, arg2);
4246
+ }, arguments);
4247
+ };
4248
+ imports.wbg.__wbg_call_e45d2cf9fc925fcf = function() {
4249
+ return handleError(function(arg0, arg1, arg2, arg3) {
4250
+ return arg0.call(arg1, arg2, arg3);
4251
+ }, arguments);
4252
+ };
4253
+ imports.wbg.__wbg_call_e762c39fa8ea36bf = function() {
4254
+ return handleError(function(arg0, arg1) {
4255
+ return arg0.call(arg1);
4256
+ }, arguments);
4257
+ };
4258
+ imports.wbg.__wbg_catch_943836faa5d29bfb = function(arg0, arg1) {
4259
+ return arg0.catch(arg1);
4260
+ };
4261
+ imports.wbg.__wbg_construct_7c20558959139eb1 = function() {
4262
+ return handleError(function(arg0, arg1) {
4263
+ return Reflect.construct(arg0, arg1);
4264
+ }, arguments);
4265
+ };
4266
+ imports.wbg.__wbg_done_2042aa2670fb1db1 = function(arg0) {
4267
+ return arg0.done;
4268
+ };
4269
+ imports.wbg.__wbg_entries_e171b586f8f6bdbf = function(arg0) {
4270
+ return Object.entries(arg0);
4271
+ };
4272
+ imports.wbg.__wbg_from_a4ad7cbddd0d7135 = function(arg0) {
4273
+ return Array.from(arg0);
4274
+ };
4275
+ imports.wbg.__wbg_get_7bed016f185add81 = function(arg0, arg1) {
4276
+ return arg0[arg1 >>> 0];
4277
+ };
4278
+ imports.wbg.__wbg_get_efcb449f58ec27c2 = function() {
4279
+ return handleError(function(arg0, arg1) {
4280
+ return Reflect.get(arg0, arg1);
4281
+ }, arguments);
4282
+ };
4283
+ imports.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe = function(arg0, arg1) {
4284
+ return arg0[arg1];
4285
+ };
4286
+ imports.wbg.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38 = function(arg0) {
4287
+ let result;
4288
+ try {
4289
+ result = arg0 instanceof ArrayBuffer;
4290
+ } catch (_) {
4291
+ result = false;
4292
+ }
4293
+ return result;
4294
+ };
4295
+ imports.wbg.__wbg_instanceof_Map_8579b5e2ab5437c7 = function(arg0) {
4296
+ let result;
4297
+ try {
4298
+ result = arg0 instanceof Map;
4299
+ } catch (_) {
4300
+ result = false;
4301
+ }
4302
+ return result;
4303
+ };
4304
+ imports.wbg.__wbg_instanceof_Uint8Array_20c8e73002f7af98 = function(arg0) {
4305
+ let result;
4306
+ try {
4307
+ result = arg0 instanceof Uint8Array;
4308
+ } catch (_) {
4309
+ result = false;
4310
+ }
4311
+ return result;
4312
+ };
4313
+ imports.wbg.__wbg_isArray_96e0af9891d0945d = function(arg0) {
4314
+ return Array.isArray(arg0);
4315
+ };
4316
+ imports.wbg.__wbg_isSafeInteger_d216eda7911dde36 = function(arg0) {
4317
+ return Number.isSafeInteger(arg0);
4318
+ };
4319
+ imports.wbg.__wbg_iterator_e5822695327a3c39 = function() {
4320
+ return Symbol.iterator;
4321
+ };
4322
+ imports.wbg.__wbg_length_69bca3cb64fc8748 = function(arg0) {
4323
+ return arg0.length;
4324
+ };
4325
+ imports.wbg.__wbg_length_cdd215e10d9dd507 = function(arg0) {
4326
+ return arg0.length;
4327
+ };
4328
+ imports.wbg.__wbg_new_0_f9740686d739025c = function() {
4329
+ return /* @__PURE__ */ new Date();
4330
+ };
4331
+ imports.wbg.__wbg_new_1acc0b6eea89d040 = function() {
4332
+ return /* @__PURE__ */ new Object();
4333
+ };
4334
+ imports.wbg.__wbg_new_3c3d849046688a66 = function(arg0, arg1) {
4335
+ try {
4336
+ var state0 = {
4337
+ a: arg0,
4338
+ b: arg1
4339
+ };
4340
+ var cb0 = (arg0, arg1) => {
4341
+ const a = state0.a;
4342
+ state0.a = 0;
4343
+ try {
4344
+ return wasm_bindgen__convert__closures_____invoke__h3cb6850919769fd7(a, state0.b, arg0, arg1);
4345
+ } finally {
4346
+ state0.a = a;
4347
+ }
4348
+ };
4349
+ return new Promise(cb0);
4350
+ } finally {
4351
+ state0.a = state0.b = 0;
4352
+ }
4353
+ };
4354
+ imports.wbg.__wbg_new_5a79be3ab53b8aa5 = function(arg0) {
4355
+ return new Uint8Array(arg0);
4356
+ };
4357
+ imports.wbg.__wbg_new_68651c719dcda04e = function() {
4358
+ return /* @__PURE__ */ new Map();
4359
+ };
4360
+ imports.wbg.__wbg_new_93d9417ed3fb115d = function(arg0) {
4361
+ return new Date(arg0);
4362
+ };
4363
+ imports.wbg.__wbg_new_e17d9f43105b08be = function() {
4364
+ return new Array();
4365
+ };
4366
+ imports.wbg.__wbg_new_from_slice_92f4d78ca282a2d2 = function(arg0, arg1) {
4367
+ return new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
4368
+ };
4369
+ imports.wbg.__wbg_new_no_args_ee98eee5275000a4 = function(arg0, arg1) {
4370
+ return new Function(getStringFromWasm0(arg0, arg1));
4371
+ };
4372
+ imports.wbg.__wbg_next_020810e0ae8ebcb0 = function() {
4373
+ return handleError(function(arg0) {
4374
+ return arg0.next();
4375
+ }, arguments);
4376
+ };
4377
+ imports.wbg.__wbg_next_2c826fe5dfec6b6a = function(arg0) {
4378
+ return arg0.next;
4379
+ };
4380
+ imports.wbg.__wbg_now_793306c526e2e3b6 = function() {
4381
+ return Date.now();
4382
+ };
4383
+ imports.wbg.__wbg_of_288d2471f5767a12 = function(arg0, arg1) {
4384
+ return Array.of(arg0, arg1);
4385
+ };
4386
+ imports.wbg.__wbg_prototypesetcall_2a6620b6922694b2 = function(arg0, arg1, arg2) {
4387
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
4388
+ };
4389
+ imports.wbg.__wbg_push_df81a39d04db858c = function(arg0, arg1) {
4390
+ return arg0.push(arg1);
4391
+ };
4392
+ imports.wbg.__wbg_queueMicrotask_34d692c25c47d05b = function(arg0) {
4393
+ return arg0.queueMicrotask;
4394
+ };
4395
+ imports.wbg.__wbg_queueMicrotask_9d76cacb20c84d58 = function(arg0) {
4396
+ queueMicrotask(arg0);
4397
+ };
4398
+ imports.wbg.__wbg_reject_9d4761245c015a33 = function(arg0) {
4399
+ return Promise.reject(arg0);
4400
+ };
4401
+ imports.wbg.__wbg_resolve_caf97c30b83f7053 = function(arg0) {
4402
+ return Promise.resolve(arg0);
4403
+ };
4404
+ imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
4405
+ arg0[arg1] = arg2;
4406
+ };
4407
+ imports.wbg.__wbg_set_907fb406c34a251d = function(arg0, arg1, arg2) {
4408
+ return arg0.set(arg1, arg2);
4409
+ };
4410
+ imports.wbg.__wbg_set_c213c871859d6500 = function(arg0, arg1, arg2) {
4411
+ arg0[arg1 >>> 0] = arg2;
4412
+ };
4413
+ imports.wbg.__wbg_set_c2abbebe8b9ebee1 = function() {
4414
+ return handleError(function(arg0, arg1, arg2) {
4415
+ return Reflect.set(arg0, arg1, arg2);
4416
+ }, arguments);
4417
+ };
4418
+ imports.wbg.__wbg_shellcompletioncandidate_new = function(arg0) {
4419
+ return ShellCompletionCandidate.__wrap(arg0);
4420
+ };
4421
+ imports.wbg.__wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e = function() {
4422
+ const ret = typeof global === "undefined" ? null : global;
4423
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
4424
+ };
4425
+ imports.wbg.__wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac = function() {
4426
+ const ret = typeof globalThis === "undefined" ? null : globalThis;
4427
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
4428
+ };
4429
+ imports.wbg.__wbg_static_accessor_SELF_6fdf4b64710cc91b = function() {
4430
+ const ret = typeof self === "undefined" ? null : self;
4431
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
4432
+ };
4433
+ imports.wbg.__wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2 = function() {
4434
+ const ret = typeof window === "undefined" ? null : window;
4435
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
4436
+ };
4437
+ imports.wbg.__wbg_stringify_b5fb28f6465d9c3e = function() {
4438
+ return handleError(function(arg0) {
4439
+ return JSON.stringify(arg0);
4440
+ }, arguments);
4441
+ };
4442
+ imports.wbg.__wbg_then_4f46f6544e6b4a28 = function(arg0, arg1) {
4443
+ return arg0.then(arg1);
4444
+ };
4445
+ imports.wbg.__wbg_then_70d05cf780a18d77 = function(arg0, arg1, arg2) {
4446
+ return arg0.then(arg1, arg2);
4447
+ };
4448
+ imports.wbg.__wbg_toISOString_48d92f5754d01b49 = function(arg0) {
4449
+ return arg0.toISOString();
4450
+ };
4451
+ imports.wbg.__wbg_value_692627309814bb8c = function(arg0) {
4452
+ return arg0.value;
4453
+ };
4454
+ imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
4455
+ return getStringFromWasm0(arg0, arg1);
4456
+ };
4457
+ imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
4458
+ return BigInt.asUintN(64, arg0);
4459
+ };
4460
+ imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
4461
+ return arg0;
4462
+ };
4463
+ imports.wbg.__wbindgen_cast_9f23747c70687cbf = function(arg0, arg1) {
4464
+ return makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__he52a6c160ad8bcc6, wasm_bindgen__convert__closures_____invoke__hc9cbe033348e018d);
4465
+ };
4466
+ imports.wbg.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
4467
+ return getArrayU8FromWasm0(arg0, arg1);
4468
+ };
4469
+ imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
4470
+ return arg0;
4471
+ };
4472
+ imports.wbg.__wbindgen_cast_f90322b7fdde61bb = function(arg0, arg1) {
4473
+ return makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h74bdb7d22b702b82, wasm_bindgen__convert__closures_____invoke__ha7a2b373f2a9ce09);
4474
+ };
4475
+ imports.wbg.__wbindgen_init_externref_table = function() {
4476
+ const table = wasm.__wbindgen_externrefs;
4477
+ const offset = table.grow(4);
4478
+ table.set(0, void 0);
4479
+ table.set(offset + 0, void 0);
4480
+ table.set(offset + 1, null);
4481
+ table.set(offset + 2, true);
4482
+ table.set(offset + 3, false);
4483
+ };
4484
+ return imports;
4485
+ }
4486
+ function __wbg_finalize_init(instance, module) {
4487
+ wasm = instance.exports;
4488
+ __wbg_init.__wbindgen_wasm_module = module;
4489
+ cachedDataViewMemory0 = null;
4490
+ cachedUint32ArrayMemory0 = null;
4491
+ cachedUint8ArrayMemory0 = null;
4492
+ wasm.__wbindgen_start();
4493
+ return wasm;
4494
+ }
4495
+ function initSync(module) {
4496
+ if (wasm !== void 0) return wasm;
4497
+ if (typeof module !== "undefined") {
4498
+ if (Object.getPrototypeOf(module) === Object.prototype) ({module} = module);
4499
+ else console.warn("using deprecated parameters for `initSync()`; pass a single object instead");
4500
+ }
4501
+ const imports = __wbg_get_imports();
4502
+ if (!(module instanceof WebAssembly.Module)) module = new WebAssembly.Module(module);
4503
+ return __wbg_finalize_init(new WebAssembly.Instance(module, imports), module);
4504
+ }
4505
+ async function __wbg_init(module_or_path) {
4506
+ if (wasm !== void 0) return wasm;
4507
+ if (typeof module_or_path !== "undefined") {
4508
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) ({module_or_path} = module_or_path);
4509
+ else console.warn("using deprecated parameters for the initialization function; pass a single object instead");
4510
+ }
4511
+ if (typeof module_or_path === "undefined") module_or_path = new URL("dashql_core.wasm", import.meta.url);
4512
+ const imports = __wbg_get_imports();
4513
+ 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);
4514
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
4515
+ return __wbg_finalize_init(instance, module);
4516
+ }
4517
+ /** The URL of the module next to this glue */
4518
+ var wasmUrl = new URL("./dashql_core.wasm", import.meta.url);
4519
+ 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 };