@akohn/dashql 0.0.0-stage → 0.0.19-dev.247
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +373 -0
- package/NOTICE +66 -0
- package/README.md +155 -2
- package/dist/_virtual/_rolldown/runtime.js +12 -0
- package/dist/core/api.d.ts +321 -0
- package/dist/core/api.js +881 -0
- package/dist/core/batch.d.ts +31 -0
- package/dist/core/batch.js +92 -0
- package/dist/core/batch_worker.d.ts +1 -0
- package/dist/core/batch_worker.js +43 -0
- package/dist/core/batch_worker_client.d.ts +20 -0
- package/dist/core/batch_worker_client.js +85 -0
- package/dist/core/batch_worker_protocol.d.ts +13 -0
- package/dist/core/batch_worker_protocol.js +0 -0
- package/dist/core/browser_worker.d.ts +3 -0
- package/dist/core/browser_worker.js +1 -0
- package/dist/core/buffers.d.ts +15 -0
- package/dist/core/buffers.js +35 -0
- package/dist/core/comment_tags.d.ts +22 -0
- package/dist/core/comment_tags.js +48 -0
- package/dist/core/connection.d.ts +3 -0
- package/dist/core/connection.js +1 -0
- package/dist/core/dataflow.d.ts +79 -0
- package/dist/core/dataflow.js +124 -0
- package/dist/core/flatbuffer_view.d.ts +14 -0
- package/dist/core/flatbuffer_view.js +43 -0
- package/dist/core/format.d.ts +4 -0
- package/dist/core/format.js +23 -0
- package/dist/core/index.d.ts +14 -0
- package/dist/core/index.js +15 -0
- package/dist/core/lookup.d.ts +10 -0
- package/dist/core/lookup.js +129 -0
- package/dist/core/query_history.d.ts +13 -0
- package/dist/core/query_history.js +20 -0
- package/dist/core/runtime.d.ts +2 -0
- package/dist/core/runtime.js +1 -0
- package/dist/core/tokens.d.ts +9 -0
- package/dist/core/tokens.js +78 -0
- package/dist/core/variant.d.ts +4 -0
- package/dist/core/variant.js +0 -0
- package/dist/core/workbook.d.ts +6 -0
- package/dist/core/workbook.js +9 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra/binary-expression-function.d.ts +9 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra/binary-expression-function.js +12 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra/binary-expression.d.ts +40 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra/binary-expression.js +105 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra/column-ref-expression.d.ts +29 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra/column-ref-expression.js +84 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra/comparison-function.d.ts +9 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra/comparison-function.js +12 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra/comparison.d.ts +61 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra/comparison.js +165 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra/const-function-cast.d.ts +18 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra/const-function-cast.js +42 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra/const-interval-cast.d.ts +40 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra/const-interval-cast.js +105 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra/const-type-cast.d.ts +18 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra/const-type-cast.js +42 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra/expression-sub-type.d.ts +25 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra/expression-sub-type.js +58 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra/expression.d.ts +56 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra/expression.js +142 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra/function-call-expression.d.ts +46 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra/function-call-expression.js +111 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra/function-call-modifier.d.ts +9 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra/function-call-modifier.js +12 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra/literal-type.d.ts +7 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra/literal-type.js +10 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra/literal.d.ts +33 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra/literal.js +77 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra/nary-expression-function.d.ts +4 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra/nary-expression-function.js +7 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra/nary-expression.d.ts +47 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra/nary-expression.js +116 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra/resolved-column.d.ts +41 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra/resolved-column.js +132 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra/unary-expression.d.ts +33 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra/unary-expression.js +85 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra/unary-function.d.ts +4 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra/unary-function.js +7 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra.d.ts +19 -0
- package/dist/gen/flatbuffers/dashql/buffers/algebra.js +57 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/analyzed-script.d.ts +211 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/analyzed-script.js +563 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/analyzer-error-severity.d.ts +8 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/analyzer-error-severity.js +11 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/analyzer-error-type.d.ts +15 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/analyzer-error-type.js +18 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/analyzer-error.d.ts +61 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/analyzer-error.js +145 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/analyzer-warning.d.ts +18 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/analyzer-warning.js +42 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/client-function-call.d.ts +50 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/client-function-call.js +152 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/client-function-effect.d.ts +7 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/client-function-effect.js +10 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/constant-expression.d.ts +30 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/constant-expression.js +79 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/database-declaration.d.ts +26 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/database-declaration.js +73 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/function-declaration.d.ts +48 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/function-declaration.js +154 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/function-param.d.ts +30 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/function-param.js +85 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/function-reference.d.ts +33 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/function-reference.js +105 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/indexed-column-reference.d.ts +45 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/indexed-column-reference.js +103 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/indexed-table-reference.d.ts +39 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/indexed-table-reference.js +90 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/inference-confidence.d.ts +17 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/inference-confidence.js +20 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/inferred-column.d.ts +47 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/inferred-column.js +109 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/inferred-table-schema.d.ts +47 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/inferred-table-schema.js +113 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/insert-statement.d.ts +70 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/insert-statement.js +192 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/insert-target-column.d.ts +38 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/insert-target-column.js +89 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/name-scope.d.ts +81 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/name-scope.js +197 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/name-tag.d.ts +13 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/name-tag.js +16 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/parameter-kind.d.ts +13 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/parameter-kind.js +16 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/parameter.d.ts +54 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/parameter.js +139 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/qualified-column-name.d.ts +30 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/qualified-column-name.js +85 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/qualified-function-name.d.ts +34 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/qualified-function-name.js +97 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/qualified-table-name.d.ts +34 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/qualified-table-name.js +97 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/resolved-table.d.ts +43 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/resolved-table.js +128 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/schema-declaration.d.ts +30 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/schema-declaration.js +90 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/semantic-node-marker-type.d.ts +13 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/semantic-node-marker-type.js +16 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/sql-type-kind.d.ts +22 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/sql-type-kind.js +25 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/sql-type.d.ts +102 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/sql-type.js +256 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/table-column.d.ts +33 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/table-column.js +94 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/table-reference-role.d.ts +4 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/table-reference-role.js +7 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/table-reference.d.ts +56 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/table-reference.js +166 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/table.d.ts +56 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/table.js +193 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/visualization-spec.d.ts +71 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer/visualization-spec.js +157 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer.d.ts +36 -0
- package/dist/gen/flatbuffers/dashql/buffers/analyzer.js +104 -0
- package/dist/gen/flatbuffers/dashql/buffers/batch/batch-diagnostic.d.ts +40 -0
- package/dist/gen/flatbuffers/dashql/buffers/batch/batch-diagnostic.js +126 -0
- package/dist/gen/flatbuffers/dashql/buffers/batch/batch-request.d.ts +32 -0
- package/dist/gen/flatbuffers/dashql/buffers/batch/batch-request.js +94 -0
- package/dist/gen/flatbuffers/dashql/buffers/batch/batch-result.d.ts +25 -0
- package/dist/gen/flatbuffers/dashql/buffers/batch/batch-result.js +69 -0
- package/dist/gen/flatbuffers/dashql/buffers/batch/batch-script-input.d.ts +34 -0
- package/dist/gen/flatbuffers/dashql/buffers/batch/batch-script-input.js +89 -0
- package/dist/gen/flatbuffers/dashql/buffers/batch/batch-script-result.d.ts +67 -0
- package/dist/gen/flatbuffers/dashql/buffers/batch/batch-script-result.js +211 -0
- package/dist/gen/flatbuffers/dashql/buffers/batch/descriptor-buffer.d.ts +25 -0
- package/dist/gen/flatbuffers/dashql/buffers/batch/descriptor-buffer.js +72 -0
- package/dist/gen/flatbuffers/dashql/buffers/batch/diagnostic-severity.d.ts +4 -0
- package/dist/gen/flatbuffers/dashql/buffers/batch/diagnostic-severity.js +7 -0
- package/dist/gen/flatbuffers/dashql/buffers/batch/processing-stage.d.ts +5 -0
- package/dist/gen/flatbuffers/dashql/buffers/batch/processing-stage.js +8 -0
- package/dist/gen/flatbuffers/dashql/buffers/batch.d.ts +8 -0
- package/dist/gen/flatbuffers/dashql/buffers/batch.js +27 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-content-statistics.d.ts +39 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-content-statistics.js +89 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-descriptor-pool.d.ts +25 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-descriptor-pool.js +64 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-descriptor.d.ts +35 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-descriptor.js +97 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-entries.d.ts +28 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-entries.js +72 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-entry-statistics.d.ts +31 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-entry-statistics.js +71 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-entry-type.d.ts +8 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-entry-type.js +11 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-entry.d.ts +43 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-entry.js +126 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-layer.d.ts +16 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-layer.js +19 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-memory-statistics.d.ts +45 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-memory-statistics.js +103 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-statistics.d.ts +34 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-statistics.js +84 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-table-update.d.ts +52 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/catalog-table-update.js +128 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/flat-catalog-entry.d.ts +59 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/flat-catalog-entry.js +126 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/flat-catalog.d.ts +101 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/flat-catalog.js +252 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/indexed-flat-database-entry.d.ts +27 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/indexed-flat-database-entry.js +61 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/indexed-flat-schema-entry.d.ts +27 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/indexed-flat-schema-entry.js +61 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/indexed-flat-table-entry.d.ts +27 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/indexed-flat-table-entry.js +62 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/schema-descriptor.d.ts +36 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/schema-descriptor.js +96 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/schema-descriptors.d.ts +31 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/schema-descriptors.js +75 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/schema-table-column.d.ts +29 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/schema-table-column.js +76 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/schema-table.d.ts +36 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/schema-table.js +101 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/touched-relations.d.ts +31 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog/touched-relations.js +75 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog.d.ts +21 -0
- package/dist/gen/flatbuffers/dashql/buffers/catalog.js +66 -0
- package/dist/gen/flatbuffers/dashql/buffers/completion/candidate-tag.d.ts +33 -0
- package/dist/gen/flatbuffers/dashql/buffers/completion/candidate-tag.js +36 -0
- package/dist/gen/flatbuffers/dashql/buffers/completion/completion-candidate-field.d.ts +42 -0
- package/dist/gen/flatbuffers/dashql/buffers/completion/completion-candidate-field.js +83 -0
- package/dist/gen/flatbuffers/dashql/buffers/completion/completion-candidate-info.d.ts +78 -0
- package/dist/gen/flatbuffers/dashql/buffers/completion/completion-candidate-info.js +177 -0
- package/dist/gen/flatbuffers/dashql/buffers/completion/completion-candidate-object-type.d.ts +8 -0
- package/dist/gen/flatbuffers/dashql/buffers/completion/completion-candidate-object-type.js +11 -0
- package/dist/gen/flatbuffers/dashql/buffers/completion/completion-candidate-object.d.ts +116 -0
- package/dist/gen/flatbuffers/dashql/buffers/completion/completion-candidate-object.js +305 -0
- package/dist/gen/flatbuffers/dashql/buffers/completion/completion-candidate.d.ts +97 -0
- package/dist/gen/flatbuffers/dashql/buffers/completion/completion-candidate.js +230 -0
- package/dist/gen/flatbuffers/dashql/buffers/completion/completion-strategy.d.ts +6 -0
- package/dist/gen/flatbuffers/dashql/buffers/completion/completion-strategy.js +9 -0
- package/dist/gen/flatbuffers/dashql/buffers/completion/completion-table-parameter.d.ts +17 -0
- package/dist/gen/flatbuffers/dashql/buffers/completion/completion-table-parameter.js +20 -0
- package/dist/gen/flatbuffers/dashql/buffers/completion/completion.d.ts +59 -0
- package/dist/gen/flatbuffers/dashql/buffers/completion/completion.js +155 -0
- package/dist/gen/flatbuffers/dashql/buffers/completion.d.ts +9 -0
- package/dist/gen/flatbuffers/dashql/buffers/completion.js +28 -0
- package/dist/gen/flatbuffers/dashql/buffers/cursor/relative-symbol-position.d.ts +7 -0
- package/dist/gen/flatbuffers/dashql/buffers/cursor/relative-symbol-position.js +10 -0
- package/dist/gen/flatbuffers/dashql/buffers/cursor/script-cursor-column-ref-context.d.ts +25 -0
- package/dist/gen/flatbuffers/dashql/buffers/cursor/script-cursor-column-ref-context.js +64 -0
- package/dist/gen/flatbuffers/dashql/buffers/cursor/script-cursor-context.d.ts +9 -0
- package/dist/gen/flatbuffers/dashql/buffers/cursor/script-cursor-context.js +26 -0
- package/dist/gen/flatbuffers/dashql/buffers/cursor/script-cursor-table-ref-context.d.ts +25 -0
- package/dist/gen/flatbuffers/dashql/buffers/cursor/script-cursor-table-ref-context.js +64 -0
- package/dist/gen/flatbuffers/dashql/buffers/cursor/script-cursor.d.ts +116 -0
- package/dist/gen/flatbuffers/dashql/buffers/cursor/script-cursor.js +303 -0
- package/dist/gen/flatbuffers/dashql/buffers/cursor.d.ts +5 -0
- package/dist/gen/flatbuffers/dashql/buffers/cursor.js +20 -0
- package/dist/gen/flatbuffers/dashql/buffers/diff/script-diff-op-code.d.ts +13 -0
- package/dist/gen/flatbuffers/dashql/buffers/diff/script-diff-op-code.js +16 -0
- package/dist/gen/flatbuffers/dashql/buffers/diff/script-diff-op.d.ts +51 -0
- package/dist/gen/flatbuffers/dashql/buffers/diff/script-diff-op.js +144 -0
- package/dist/gen/flatbuffers/dashql/buffers/diff/script-diff.d.ts +28 -0
- package/dist/gen/flatbuffers/dashql/buffers/diff/script-diff.js +72 -0
- package/dist/gen/flatbuffers/dashql/buffers/diff.d.ts +3 -0
- package/dist/gen/flatbuffers/dashql/buffers/diff.js +13 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-analysis-version.d.ts +29 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-analysis-version.js +81 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-board-position.d.ts +44 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-board-position.js +135 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-comment-tag.d.ts +42 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-comment-tag.js +93 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-cursor-semantic-context.d.ts +91 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-cursor-semantic-context.js +274 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-cursor-semantic-kind.d.ts +5 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-cursor-semantic-kind.js +8 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-cursor-state.d.ts +34 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-cursor-state.js +99 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-diagnostic-severity.d.ts +4 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-diagnostic-severity.js +7 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-diagnostic-source.d.ts +5 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-diagnostic-source.js +8 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-diagnostic.d.ts +35 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-diagnostic.js +101 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-event-action.d.ts +10 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-event-action.js +13 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-event-intent.d.ts +7 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-event-intent.js +10 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-event-origin.d.ts +6 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-event-origin.js +9 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-event.d.ts +62 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-event.js +187 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-flow-position.d.ts +53 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-flow-position.js +144 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-offset-unit.d.ts +7 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-offset-unit.js +10 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-processing-statistics.d.ts +65 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-processing-statistics.js +234 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-script-annotations.d.ts +71 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-script-annotations.js +210 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-selection.d.ts +29 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-selection.js +81 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-semantic-reference-kind.d.ts +5 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-semantic-reference-kind.js +8 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-semantic-resolution.d.ts +4 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-semantic-resolution.js +7 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-semantic-span.d.ts +48 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-semantic-span.js +138 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-statement-description.d.ts +30 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-statement-description.js +88 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-statement.d.ts +30 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-statement.js +88 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-syntax-span.d.ts +32 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-syntax-span.js +74 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-table-definition.d.ts +26 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-table-definition.js +73 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-text-change.d.ts +33 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-text-change.js +93 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-text-span.d.ts +24 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-text-span.js +58 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-update-status.d.ts +9 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-update-status.js +12 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-update.d.ts +158 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor/editor-update.js +508 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor.d.ts +29 -0
- package/dist/gen/flatbuffers/dashql/buffers/editor.js +82 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/checked-script-reference.d.ts +64 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/checked-script-reference.js +156 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/checked-script.d.ts +45 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/checked-script.js +115 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/compiled-visualization.d.ts +37 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/compiled-visualization.js +104 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/dataflow-attachment.d.ts +35 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/dataflow-attachment.js +71 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/dataflow-edge-kind.d.ts +13 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/dataflow-edge-kind.js +16 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/dataflow-edge.d.ts +49 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/dataflow-edge.js +145 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/dataflow-script.d.ts +54 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/dataflow-script.js +137 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/dataflow-statement.d.ts +39 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/dataflow-statement.js +89 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-access-mode.d.ts +5 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-access-mode.js +8 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-access.d.ts +31 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-access.js +96 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-attachment.d.ts +42 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-attachment.js +83 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-catalog-object-id.d.ts +25 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-catalog-object-id.js +69 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-connection-kind.d.ts +7 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-connection-kind.js +10 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-connection.d.ts +27 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-connection.js +74 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-diagnostic.d.ts +46 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-diagnostic.js +125 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-edge-reason.d.ts +13 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-edge-reason.js +16 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-edge.d.ts +39 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-edge.js +130 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-entity-type.d.ts +8 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-entity-type.js +11 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-entity.d.ts +49 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-entity.js +148 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-materialization.d.ts +42 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-materialization.js +99 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-node.d.ts +125 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-node.js +343 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-script-reference.d.ts +73 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-script-reference.js +180 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-script.d.ts +98 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-script.js +268 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-unresolved-reference.d.ts +37 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph-unresolved-reference.js +100 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph.d.ts +95 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/execution-graph.js +314 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/script-compilation-error-code.d.ts +9 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/script-compilation-error-code.js +12 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/script-compilation-error.d.ts +38 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/script-compilation-error.js +117 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/script-compilation-result.d.ts +41 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/script-compilation-result.js +126 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/script-compilation-statement-kind.d.ts +4 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/script-compilation-statement-kind.js +7 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/script-reference-check.d.ts +38 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/script-reference-check.js +100 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/script-reference-kind.d.ts +10 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/script-reference-kind.js +13 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/session-dataflow.d.ts +61 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/session-dataflow.js +159 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/session-input-consumer.d.ts +24 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/session-input-consumer.js +58 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/session-input-type-source.d.ts +8 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/session-input-type-source.js +11 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/session-input.d.ts +83 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/session-input.js +184 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/session-inputs.d.ts +28 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/session-inputs.js +72 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/table-parameter-collision.d.ts +56 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution/table-parameter-collision.js +121 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution.d.ts +37 -0
- package/dist/gen/flatbuffers/dashql/buffers/execution.js +107 -0
- package/dist/gen/flatbuffers/dashql/buffers/formatting/formatting-config.d.ts +63 -0
- package/dist/gen/flatbuffers/dashql/buffers/formatting/formatting-config.js +167 -0
- package/dist/gen/flatbuffers/dashql/buffers/formatting/formatting-dialect.d.ts +4 -0
- package/dist/gen/flatbuffers/dashql/buffers/formatting/formatting-dialect.js +7 -0
- package/dist/gen/flatbuffers/dashql/buffers/formatting/formatting-mode.d.ts +5 -0
- package/dist/gen/flatbuffers/dashql/buffers/formatting/formatting-mode.js +8 -0
- package/dist/gen/flatbuffers/dashql/buffers/formatting/keyword-case.d.ts +4 -0
- package/dist/gen/flatbuffers/dashql/buffers/formatting/keyword-case.js +7 -0
- package/dist/gen/flatbuffers/dashql/buffers/formatting.d.ts +4 -0
- package/dist/gen/flatbuffers/dashql/buffers/formatting.js +14 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/aconst-type.d.ts +7 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/aconst-type.js +10 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/attach-database-statement.d.ts +30 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/attach-database-statement.js +85 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/attribute-key.d.ts +320 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/attribute-key.js +323 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/character-type.d.ts +4 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/character-type.js +7 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/column-constraint.d.ts +9 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/column-constraint.js +12 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/combine-modifier.d.ts +5 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/combine-modifier.js +8 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/combine-operation.d.ts +6 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/combine-operation.js +9 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/comment-block-type.d.ts +14 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/comment-block-type.js +17 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/comment-block.d.ts +53 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/comment-block.js +126 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/constraint-attribute.d.ts +8 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/constraint-attribute.js +11 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/error.d.ts +33 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/error.js +89 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/expression-operator.d.ts +49 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/expression-operator.js +52 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/extract-target.d.ts +8 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/extract-target.js +11 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/group-by-item-type.d.ts +7 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/group-by-item-type.js +10 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/interval-type.d.ts +16 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/interval-type.js +19 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/join-type.d.ts +24 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/join-type.js +27 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/key-action-command.d.ts +7 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/key-action-command.js +10 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/key-action-trigger.d.ts +4 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/key-action-trigger.js +7 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/key-match.d.ts +5 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/key-match.js +8 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/known-function.d.ts +24 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/known-function.js +27 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/node-type.d.ts +151 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/node-type.js +154 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/node.d.ts +35 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/node.js +100 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/numeric-type.d.ts +10 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/numeric-type.js +13 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/on-commit-option.d.ts +6 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/on-commit-option.js +9 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/order-direction.d.ts +4 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/order-direction.js +7 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/order-null-rule.d.ts +4 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/order-null-rule.js +7 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/parsed-script.d.ts +80 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/parsed-script.js +250 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/row-locking-block-behavior.d.ts +4 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/row-locking-block-behavior.js +7 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/row-locking-strength.d.ts +7 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/row-locking-strength.js +10 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/sample-count-unit.d.ts +4 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/sample-count-unit.js +7 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/scanned-script.d.ts +40 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/scanned-script.js +125 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/scanner-token-type.d.ts +15 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/scanner-token-type.js +18 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/scanner-tokens.d.ts +59 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/scanner-tokens.js +156 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/statement-target-type.d.ts +5 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/statement-target-type.js +8 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/statement-target.d.ts +30 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/statement-target.js +80 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/statement-type.d.ts +22 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/statement-type.js +25 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/statement.d.ts +67 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/statement.js +234 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/subquery-quantifier.d.ts +5 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/subquery-quantifier.js +8 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/symbol-span.d.ts +21 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/symbol-span.js +55 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/table-constraint.d.ts +6 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/table-constraint.js +9 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/temp-type.d.ts +7 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/temp-type.js +10 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/text-span.d.ts +21 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/text-span.js +55 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/trim-direction.d.ts +5 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/trim-direction.js +8 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/window-bound-direction.d.ts +4 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/window-bound-direction.js +7 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/window-bound-mode.d.ts +5 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/window-bound-mode.js +8 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/window-exclusion-mode.d.ts +5 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/window-exclusion-mode.js +8 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/window-range-mode.d.ts +5 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser/window-range-mode.js +8 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser.d.ts +47 -0
- package/dist/gen/flatbuffers/dashql/buffers/parser.js +110 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/derived-profile-layout-config.d.ts +28 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/derived-profile-layout-config.js +73 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/profile-attribute.d.ts +27 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/profile-attribute.js +61 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/profile-engine.d.ts +8 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/profile-engine.js +11 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/profile-entity.d.ts +10 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/profile-entity.js +13 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/profile-execution-status.d.ts +8 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/profile-execution-status.js +11 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/profile-fragment.d.ts +64 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/profile-fragment.js +147 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/profile-layout-config.d.ts +95 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/profile-layout-config.js +219 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/profile-layout-orientation.d.ts +14 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/profile-layout-orientation.js +17 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/profile-layout-rect.d.ts +39 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/profile-layout-rect.js +89 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/profile-operator-cross-edge.d.ts +39 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/profile-operator-cross-edge.js +89 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/profile-operator-edge.d.ts +45 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/profile-operator-edge.js +103 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/profile-operator-kind.d.ts +58 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/profile-operator-kind.js +61 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/profile-operator.d.ts +124 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/profile-operator.js +288 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/profile-pipeline.d.ts +51 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/profile-pipeline.js +117 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/profile-slot-role.d.ts +17 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/profile-slot-role.js +20 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/profile-slot.d.ts +34 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/profile-slot.js +77 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/profile-stats-field.d.ts +19 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/profile-stats-field.js +22 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/profile-stats.d.ts +102 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/profile-stats.js +233 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/profile-update-event.d.ts +50 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/profile-update-event.js +122 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/query-profile-events.d.ts +38 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/query-profile-events.js +91 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/query-profile.d.ts +170 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile/query-profile.js +398 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile.d.ts +21 -0
- package/dist/gen/flatbuffers/dashql/buffers/profile.js +61 -0
- package/dist/gen/flatbuffers/dashql/buffers/statistics/script-memory-statistics.d.ts +27 -0
- package/dist/gen/flatbuffers/dashql/buffers/statistics/script-memory-statistics.js +65 -0
- package/dist/gen/flatbuffers/dashql/buffers/statistics/script-processing-memory-statistics.d.ts +57 -0
- package/dist/gen/flatbuffers/dashql/buffers/statistics/script-processing-memory-statistics.js +131 -0
- package/dist/gen/flatbuffers/dashql/buffers/statistics/script-processing-timings.d.ts +33 -0
- package/dist/gen/flatbuffers/dashql/buffers/statistics/script-processing-timings.js +75 -0
- package/dist/gen/flatbuffers/dashql/buffers/statistics/script-statistics.d.ts +31 -0
- package/dist/gen/flatbuffers/dashql/buffers/statistics/script-statistics.js +71 -0
- package/dist/gen/flatbuffers/dashql/buffers/statistics.d.ts +4 -0
- package/dist/gen/flatbuffers/dashql/buffers/statistics.js +17 -0
- package/dist/gen/flatbuffers/dashql/buffers/status/status-code.d.ts +25 -0
- package/dist/gen/flatbuffers/dashql/buffers/status/status-code.js +28 -0
- package/dist/gen/flatbuffers/dashql/buffers/status.d.ts +1 -0
- package/dist/gen/flatbuffers/dashql/buffers/status.js +5 -0
- package/dist/gen/flatbuffers/dashql/buffers/visualization/dashboard-spec.d.ts +37 -0
- package/dist/gen/flatbuffers/dashql/buffers/visualization/dashboard-spec.js +115 -0
- package/dist/gen/flatbuffers/dashql/buffers/visualization/markdown-node-type.d.ts +20 -0
- package/dist/gen/flatbuffers/dashql/buffers/visualization/markdown-node-type.js +23 -0
- package/dist/gen/flatbuffers/dashql/buffers/visualization/markdown-node.d.ts +61 -0
- package/dist/gen/flatbuffers/dashql/buffers/visualization/markdown-node.js +202 -0
- package/dist/gen/flatbuffers/dashql/buffers/visualization/markdown-spec.d.ts +32 -0
- package/dist/gen/flatbuffers/dashql/buffers/visualization/markdown-spec.js +90 -0
- package/dist/gen/flatbuffers/dashql/buffers/visualization/table-spec.d.ts +21 -0
- package/dist/gen/flatbuffers/dashql/buffers/visualization/table-spec.js +45 -0
- package/dist/gen/flatbuffers/dashql/buffers/visualization.d.ts +5 -0
- package/dist/gen/flatbuffers/dashql/buffers/visualization.js +19 -0
- package/dist/gen/jsonschema/app_folder.d.ts +26 -0
- package/dist/gen/jsonschema/app_manifest.d.ts +281 -0
- package/dist/gen/jsonschema/app_workbook.d.ts +355 -0
- package/dist/gen/jsonschema/auth.d.ts +273 -0
- package/dist/gen/jsonschema/connection.d.ts +1609 -0
- package/dist/gen/protobuf/google/protobuf/any_pb.d.ts +24 -0
- package/dist/gen/protobuf/google/protobuf/any_pb.js +7 -0
- package/dist/gen/protobuf/google/protobuf/empty_pb.d.ts +15 -0
- package/dist/gen/protobuf/google/protobuf/empty_pb.js +7 -0
- package/dist/gen/protobuf/google/rpc/status_pb.d.ts +29 -0
- package/dist/gen/protobuf/google/rpc/status_pb.js +18 -0
- package/dist/gen/protobuf/salesforce/hyperdb/grpc/v1/error_details_pb.d.ts +62 -0
- package/dist/gen/protobuf/salesforce/hyperdb/grpc/v1/error_details_pb.js +23 -0
- package/dist/gen/protobuf/salesforce/hyperdb/grpc/v1/hyper_service_pb.d.ts +386 -0
- package/dist/gen/protobuf/salesforce/hyperdb/grpc/v1/hyper_service_pb.js +199 -0
- package/dist/hyperdb-edge/node/runtime_check.d.ts +21 -0
- package/dist/hyperdb-edge/node/runtime_check.js +66 -0
- package/dist/platform/channel_common.d.ts +24 -0
- package/dist/platform/channel_common.js +15 -0
- package/dist/platform/compute/arrow_formatter.d.ts +43 -0
- package/dist/platform/compute/arrow_formatter.js +450 -0
- package/dist/platform/compute/computation_types.d.ts +100 -0
- package/dist/platform/compute/computation_types.js +150 -0
- package/dist/platform/compute/query_result_search_sql.d.ts +10 -0
- package/dist/platform/compute/query_result_search_sql.js +34 -0
- package/dist/platform/connections/clfn_spec.d.ts +97 -0
- package/dist/platform/connections/clfn_spec.js +0 -0
- package/dist/platform/connections/clfn_specs.d.ts +4 -0
- package/dist/platform/connections/clfn_specs.js +12 -0
- package/dist/platform/connections/connection_params.d.ts +19 -0
- package/dist/platform/connections/connection_params.js +63 -0
- package/dist/platform/connections/connection_state.d.ts +24 -0
- package/dist/platform/connections/connection_state.js +29 -0
- package/dist/platform/connections/connector_configs.d.ts +18 -0
- package/dist/platform/connections/connector_configs.js +12 -0
- package/dist/platform/connections/connector_descriptor.d.ts +20 -0
- package/dist/platform/connections/connector_descriptor.js +37 -0
- package/dist/platform/connections/connector_info.d.ts +33 -0
- package/dist/platform/connections/connector_info.js +95 -0
- package/dist/platform/connections/embedded_database_channel.d.ts +20 -0
- package/dist/platform/connections/embedded_database_channel.js +133 -0
- package/dist/platform/connections/hyper/hyper_error_info.d.ts +41 -0
- package/dist/platform/connections/hyper/hyper_error_info.js +117 -0
- package/dist/platform/connections/hyper/hyperdb_grpc_client.d.ts +26 -0
- package/dist/platform/connections/hyper/hyperdb_grpc_client.js +0 -0
- package/dist/platform/connections/hyper/local_cloud.d.ts +15 -0
- package/dist/platform/connections/hyper/local_cloud.js +14 -0
- package/dist/platform/connections/query_channel.d.ts +3 -0
- package/dist/platform/connections/query_channel.js +11 -0
- package/dist/platform/connections/query_execution.d.ts +19 -0
- package/dist/platform/connections/query_execution.js +24 -0
- package/dist/platform/connections/query_execution_args.d.ts +24 -0
- package/dist/platform/connections/query_execution_args.js +0 -0
- package/dist/platform/connections/salesforce/salesforce_api_client.d.ts +10 -0
- package/dist/platform/connections/salesforce/salesforce_api_client.js +14 -0
- package/dist/platform/connections/salesforce/salesforce_api_client_mock.d.ts +16 -0
- package/dist/platform/connections/salesforce/salesforce_connection_state.d.ts +2 -0
- package/dist/platform/connections/salesforce/salesforce_connection_state.js +7 -0
- package/dist/platform/connections/trino_catalogs.d.ts +4 -0
- package/dist/platform/connections/trino_catalogs.js +11 -0
- package/dist/platform/electron_fs.d.ts +4 -0
- package/dist/platform/electron_fs.js +21 -0
- package/dist/platform/embedded_database.d.ts +55 -0
- package/dist/platform/embedded_database.js +5 -0
- package/dist/platform/file_system.d.ts +36 -0
- package/dist/platform/file_system.js +5 -0
- package/dist/platform/http_client.d.ts +16 -0
- package/dist/platform/http_client.js +0 -0
- package/dist/platform/hyper_link_target.d.ts +8 -0
- package/dist/platform/hyper_link_target.js +35 -0
- package/dist/platform/hyperdb/hyperdb_arrow_insert.d.ts +7 -0
- package/dist/platform/hyperdb/hyperdb_arrow_insert.js +119 -0
- package/dist/platform/hyperdb/hyperdb_opfs_instance.d.ts +24 -0
- package/dist/platform/hyperdb/hyperdb_opfs_instance.js +117 -0
- package/dist/platform/hyperdb/hyperdb_parquet_export.d.ts +9 -0
- package/dist/platform/hyperdb/hyperdb_parquet_export.js +42 -0
- package/dist/platform/hyperdb/hyperdb_settings.d.ts +25 -0
- package/dist/platform/hyperdb/hyperdb_settings.js +32 -0
- package/dist/platform/hyperdb/hyperdb_wasm.d.ts +94 -0
- package/dist/platform/hyperdb/hyperdb_wasm.js +494 -0
- package/dist/platform/key_value_storage.d.ts +4 -0
- package/dist/platform/key_value_storage.js +0 -0
- package/dist/platform/logger/log_buffer.d.ts +53 -0
- package/dist/platform/logger/log_buffer.js +126 -0
- package/dist/platform/logger/logger.d.ts +57 -0
- package/dist/platform/logger/logger.js +181 -0
- package/dist/platform/logger/trace_context.d.ts +14 -0
- package/dist/platform/logger/trace_context.js +32 -0
- package/dist/platform/node/node_core.d.ts +3 -0
- package/dist/platform/node/node_core.js +17 -0
- package/dist/platform/node/node_directory_handle.d.ts +44 -0
- package/dist/platform/node/node_directory_handle.js +185 -0
- package/dist/platform/node/node_file_system.d.ts +3 -0
- package/dist/platform/node/node_file_system.js +108 -0
- package/dist/platform/node/node_hyperdb.d.ts +21 -0
- package/dist/platform/node/node_hyperdb.js +113 -0
- package/dist/platform/node/node_instance_locks.d.ts +2 -0
- package/dist/platform/node/node_instance_locks.js +37 -0
- package/dist/platform/node/node_locks.d.ts +20 -0
- package/dist/platform/node/node_locks.js +64 -0
- package/dist/platform/oauth_flow.d.ts +16 -0
- package/dist/platform/oauth_flow.js +0 -0
- package/dist/platform/oauth_types.d.ts +23 -0
- package/dist/platform/oauth_types.js +0 -0
- package/dist/platform/opfs_root.d.ts +5 -0
- package/dist/platform/opfs_root.js +19 -0
- package/dist/platform/proto.d.ts +11 -0
- package/dist/platform/proto.js +15 -0
- package/dist/platform/query/profile_execution_state.d.ts +21 -0
- package/dist/platform/query/profile_execution_state.js +60 -0
- package/dist/platform/query/profile_layout_config.d.ts +5 -0
- package/dist/platform/query/profile_layout_config.js +32 -0
- package/dist/platform/query/profile_operator_symbol.d.ts +6 -0
- package/dist/platform/query/profile_operator_symbol.js +50 -0
- package/dist/platform/query/query_execution_state.d.ts +65 -0
- package/dist/platform/query/query_execution_state.js +33 -0
- package/dist/platform/query/query_progress.d.ts +42 -0
- package/dist/platform/query/query_progress.js +78 -0
- package/dist/platform/query/query_result_cache.d.ts +47 -0
- package/dist/platform/query/query_result_cache.js +8 -0
- package/dist/platform/session/agent_session_client.d.ts +41 -0
- package/dist/platform/session/agent_session_client.js +177 -0
- package/dist/platform/session/agent_session_protocol.d.ts +15 -0
- package/dist/platform/session/agent_session_protocol.js +43 -0
- package/dist/platform/session/agent_session_state.d.ts +45 -0
- package/dist/platform/session/agent_session_state.js +127 -0
- package/dist/platform/session/workbook_journal.d.ts +48 -0
- package/dist/platform/session/workbook_journal.js +94 -0
- package/dist/platform/sql/sql_format.d.ts +9 -0
- package/dist/platform/sql/sql_format.js +40 -0
- package/dist/platform/sql/sql_lint.d.ts +27 -0
- package/dist/platform/sql/sql_lint.js +69 -0
- package/dist/platform/sql/sql_report.d.ts +18 -0
- package/dist/platform/sql/sql_report.js +80 -0
- package/dist/platform/storage/native_storage_backend.d.ts +48 -0
- package/dist/platform/storage/native_storage_backend.js +194 -0
- package/dist/platform/storage/opfs_query_result_cache.d.ts +15 -0
- package/dist/platform/storage/opfs_query_result_cache.js +237 -0
- package/dist/platform/storage/storage_backend.d.ts +89 -0
- package/dist/platform/storage/storage_backend.js +53 -0
- package/dist/platform/storage/storage_root.d.ts +2 -0
- package/dist/platform/storage/storage_root.js +90 -0
- package/dist/platform/storage/storage_versions.d.ts +3 -0
- package/dist/platform/storage/storage_versions.js +13 -0
- package/dist/platform/storage/workbook_tables.d.ts +92 -0
- package/dist/platform/storage/workbook_tables.js +57 -0
- package/dist/platform/storage/workbook_tree.d.ts +29 -0
- package/dist/platform/storage/workbook_tree.js +161 -0
- package/dist/platform/utils/arrow_vectors.d.ts +6 -0
- package/dist/platform/utils/arrow_vectors.js +82 -0
- package/dist/platform/utils/async_consumer.d.ts +14 -0
- package/dist/platform/utils/async_consumer.js +24 -0
- package/dist/platform/utils/async_value.d.ts +20 -0
- package/dist/platform/utils/async_value.js +50 -0
- package/dist/platform/utils/base64.d.ts +19 -0
- package/dist/platform/utils/base64.js +162 -0
- package/dist/platform/utils/crc32.d.ts +6 -0
- package/dist/platform/utils/crc32.js +34 -0
- package/dist/platform/utils/error.d.ts +4 -0
- package/dist/platform/utils/error.js +0 -0
- package/dist/platform/utils/int128.d.ts +7 -0
- package/dist/platform/utils/int128.js +35 -0
- package/dist/platform/utils/pkce.d.ts +2 -0
- package/dist/platform/utils/pkce.js +12 -0
- package/dist/platform/utils/progress.d.ts +14 -0
- package/dist/platform/utils/progress.js +44 -0
- package/dist/platform/utils/sleep.d.ts +1 -0
- package/dist/platform/utils/sleep.js +5 -0
- package/dist/platform/utils/sql_quote.d.ts +2 -0
- package/dist/platform/utils/sql_quote.js +8 -0
- package/dist/platform/utils/variant.d.ts +5 -0
- package/dist/platform/utils/variant.js +0 -0
- package/dist/platform/utils/yield_to_browser.d.ts +1 -0
- package/dist/platform/utils/yield_to_browser.js +5 -0
- package/dist/platform/web_http_client.d.ts +7 -0
- package/dist/platform/web_http_client.js +12 -0
- package/dist/platform/workbook/attachment_mirror.d.ts +2 -0
- package/dist/platform/workbook/attachment_mirror.js +25 -0
- package/dist/platform/workbook/attachment_mounts.d.ts +5 -0
- package/dist/platform/workbook/attachment_mounts.js +62 -0
- package/dist/platform/workbook/run_events.d.ts +66 -0
- package/dist/platform/workbook/run_events.js +38 -0
- package/dist/platform/workbook/script_compilation.d.ts +4 -0
- package/dist/platform/workbook/script_compilation.js +52 -0
- package/dist/platform/workbook/script_editor_state.d.ts +12 -0
- package/dist/platform/workbook/script_editor_state.js +0 -0
- package/dist/platform/workbook/script_reference_check.d.ts +27 -0
- package/dist/platform/workbook/script_reference_check.js +59 -0
- package/dist/platform/workbook/script_types.d.ts +53 -0
- package/dist/platform/workbook/script_types.js +21 -0
- package/dist/platform/workbook/workbook_attachments.d.ts +3 -0
- package/dist/platform/workbook/workbook_attachments.js +9 -0
- package/dist/platform/workbook/workbook_execution.d.ts +31 -0
- package/dist/platform/workbook/workbook_execution.js +28 -0
- package/dist/platform/workbook/workbook_inputs.d.ts +41 -0
- package/dist/platform/workbook/workbook_inputs.js +94 -0
- package/dist/platform/workbook/workbook_scripts.d.ts +58 -0
- package/dist/platform/workbook/workbook_scripts.js +21 -0
- package/dist/platform/workbook/workbook_zip.d.ts +5 -0
- package/dist/platform/workbook/workbook_zip.js +28 -0
- package/dist/runtime/compute_database.d.ts +18 -0
- package/dist/runtime/compute_database.js +56 -0
- package/dist/runtime/compute_platform.d.ts +5 -0
- package/dist/runtime/compute_platform.js +76 -0
- package/dist/runtime/embedded_session.d.ts +8 -0
- package/dist/runtime/embedded_session.js +23 -0
- package/dist/runtime/node/node_platform.d.ts +12 -0
- package/dist/runtime/node/node_platform.js +23 -0
- package/dist/runtime/platform_requests.d.ts +18 -0
- package/dist/runtime/platform_requests.js +104 -0
- package/dist/runtime/query/cache_pins.d.ts +8 -0
- package/dist/runtime/query/cache_pins.js +27 -0
- package/dist/runtime/query/query_channels.d.ts +34 -0
- package/dist/runtime/query/query_channels.js +250 -0
- package/dist/runtime/query/query_projection.d.ts +4 -0
- package/dist/runtime/query/query_projection.js +41 -0
- package/dist/runtime/query/query_result_stream.d.ts +15 -0
- package/dist/runtime/query/query_result_stream.js +100 -0
- package/dist/runtime/run_mounts.d.ts +6 -0
- package/dist/runtime/run_mounts.js +44 -0
- package/dist/runtime/runtime.d.ts +149 -0
- package/dist/runtime/runtime.js +420 -0
- package/dist/runtime/runtime_storage.d.ts +47 -0
- package/dist/runtime/runtime_storage.js +118 -0
- package/dist/runtime/store/handles.d.ts +30 -0
- package/dist/runtime/store/handles.js +46 -0
- package/dist/runtime/store/projection.d.ts +8 -0
- package/dist/runtime/store/projection.js +51 -0
- package/dist/runtime/store/runtime_store.d.ts +53 -0
- package/dist/runtime/store/runtime_store.js +195 -0
- package/dist/runtime/store/runtime_tables.d.ts +10 -0
- package/dist/runtime/store/runtime_tables.js +115 -0
- package/dist/runtime/store/update_scheduler.d.ts +6 -0
- package/dist/runtime/store/update_scheduler.js +7 -0
- package/dist/runtime/workbook_archives.d.ts +7 -0
- package/dist/runtime/workbook_archives.js +103 -0
- package/dist/runtime/workbook_projection.d.ts +28 -0
- package/dist/runtime/workbook_projection.js +178 -0
- package/dist/runtime/workbook_run_report.d.ts +22 -0
- package/dist/runtime/workbook_run_report.js +248 -0
- package/dist/wasm/dashql_core.d.ts +4147 -0
- package/dist/wasm/dashql_core.js +4487 -0
- package/dist/wasm/dashql_core.wasm +0 -0
- package/dist/wasm/dashql_dataflow.d.ts +148 -0
- package/dist/wasm/dashql_dataflow.js +474 -0
- package/dist/wasm/dashql_dataflow.wasm +0 -0
- package/package.json +44 -4
|
@@ -0,0 +1,4147 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Replay a recording of the progress of a query (JSON, see `ProfileRecording`) up to a point in time in milliseconds
|
|
5
|
+
* since its first payload, with a layout of the plan or the default one. None if nothing happened until then.
|
|
6
|
+
*/
|
|
7
|
+
export function replayQueryProgress(recording: string, until_ms: number, layout?: ProfileLayoutView | null): QueryProfileProgressView | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* The literal of the value of an input control, in the Hyper dialect: `sql_type` is the SQL text of the type of the
|
|
10
|
+
* input, `SqlType.sql`, absent without a type
|
|
11
|
+
*/
|
|
12
|
+
export function inputLiteral(value: string, sql_type?: string | null): string;
|
|
13
|
+
/**
|
|
14
|
+
* Process a batch request into a `BatchResult`
|
|
15
|
+
*/
|
|
16
|
+
export function processBatch(request: Uint8Array): Uint8Array;
|
|
17
|
+
/**
|
|
18
|
+
* Quote an identifier if it would not read back unquoted, e.g. the name of a script reference `:"foo-2"`
|
|
19
|
+
*/
|
|
20
|
+
export function quoteIdentifier(text: string): string;
|
|
21
|
+
/**
|
|
22
|
+
* The relations that the statements of a text create or drop, returns packed `TouchedRelations`
|
|
23
|
+
*/
|
|
24
|
+
export function touchedRelations(text: string): Uint8Array;
|
|
25
|
+
/**
|
|
26
|
+
* Derive the dataflow of the scripts of a session (`dataflow::derive_session_dataflow`), returns the packed
|
|
27
|
+
* `SessionDataflow`. The text spans are in the offset unit of the session of each script.
|
|
28
|
+
*/
|
|
29
|
+
export function deriveSessionDataflow(request: SessionPlanRequest): Uint8Array;
|
|
30
|
+
/**
|
|
31
|
+
* Check the script references of the scripts of a session, returns the packed `ScriptReferenceCheck`. The text spans
|
|
32
|
+
* are in the offset unit of the session of each script. Ignores the targets, the materialized scripts and the mount
|
|
33
|
+
* prefix.
|
|
34
|
+
*/
|
|
35
|
+
export function checkScriptReferences(request: SessionPlanRequest): Uint8Array;
|
|
36
|
+
/**
|
|
37
|
+
* Report panics to `globalThis.__dashqlCorePanic` before the module traps.
|
|
38
|
+
*
|
|
39
|
+
* A panic aborts: the call traps without dropping its guards, so the objects it borrowed stay borrowed and the
|
|
40
|
+
* module must not be used anymore. JS sees only the trap, the hook tells it why.
|
|
41
|
+
*/
|
|
42
|
+
export function installPanicHook(): void;
|
|
43
|
+
/**
|
|
44
|
+
* Collect the inputs of the scripts of a session (`session_inputs::collect_session_inputs`), returns the packed
|
|
45
|
+
* `SessionInputs`. Ignores the targets, the materialized scripts and the mount prefix.
|
|
46
|
+
*/
|
|
47
|
+
export function collectSessionInputs(request: SessionPlanRequest): Uint8Array;
|
|
48
|
+
/**
|
|
49
|
+
* Plan the current analysis of the scripts of a session across connections, returns the packed `ExecutionGraph`
|
|
50
|
+
*/
|
|
51
|
+
export function planSession(request: SessionPlanRequest): Uint8Array;
|
|
52
|
+
/**
|
|
53
|
+
* Quote a column name for a column reference in SQL text, also quotes keywords that are not unreserved, e.g. `"user"`
|
|
54
|
+
*/
|
|
55
|
+
export function quoteColumnName(text: string): string;
|
|
56
|
+
/**
|
|
57
|
+
* The change from one text to another (`workbook::text_change`): the range between their common prefix and suffix, on
|
|
58
|
+
* character boundaries, its offsets in UTF-16 code units like those of the editors
|
|
59
|
+
*/
|
|
60
|
+
export function textChange(from: string, to: string): WorkbookTextChange;
|
|
61
|
+
/**
|
|
62
|
+
* How far a catalog update got
|
|
63
|
+
*/
|
|
64
|
+
export enum CatalogUpdateTaskStatus {
|
|
65
|
+
STARTED = 0,
|
|
66
|
+
SUCCEEDED = 1,
|
|
67
|
+
FAILED = 2,
|
|
68
|
+
CANCELLED = 3,
|
|
69
|
+
PARTIALLY_SUCCEEDED = 4,
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* What a catalog update does: load the whole catalog or ask about the relations that statements touched
|
|
73
|
+
*/
|
|
74
|
+
export enum CatalogUpdateVariant {
|
|
75
|
+
FULL_CATALOG_REFRESH = 0,
|
|
76
|
+
RELATION_REFRESH = 1,
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* The health of a connection
|
|
80
|
+
*/
|
|
81
|
+
export enum ConnectionHealth {
|
|
82
|
+
NOT_STARTED = 0,
|
|
83
|
+
CONNECTING = 1,
|
|
84
|
+
CANCELLED = 2,
|
|
85
|
+
ONLINE = 3,
|
|
86
|
+
FAILED = 4,
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* How far the setup of a connection got
|
|
90
|
+
*/
|
|
91
|
+
export enum ConnectionStatus {
|
|
92
|
+
NOT_STARTED = 0,
|
|
93
|
+
HEALTH_CHECK_STARTED = 1,
|
|
94
|
+
HEALTH_CHECK_FAILED = 2,
|
|
95
|
+
HEALTH_CHECK_CANCELLED = 3,
|
|
96
|
+
HEALTH_CHECK_SUCCEEDED = 4,
|
|
97
|
+
CHANNEL_SETUP_STARTED = 5,
|
|
98
|
+
CHANNEL_SETUP_FAILED = 6,
|
|
99
|
+
CHANNEL_SETUP_CANCELLED = 7,
|
|
100
|
+
CHANNEL_READY = 8,
|
|
101
|
+
AUTH_STARTED = 9,
|
|
102
|
+
AUTH_CANCELLED = 10,
|
|
103
|
+
AUTH_FAILED = 11,
|
|
104
|
+
PKCE_GENERATION_STARTED = 12,
|
|
105
|
+
PKCE_GENERATED = 13,
|
|
106
|
+
WAITING_FOR_OAUTH_CODE_VIA_WINDOW = 14,
|
|
107
|
+
WAITING_FOR_OAUTH_CODE_VIA_LINK = 15,
|
|
108
|
+
OAUTH_CODE_RECEIVED = 16,
|
|
109
|
+
ACCESS_TOKEN_REQUESTED = 17,
|
|
110
|
+
ACCESS_TOKEN_RECEIVED = 18,
|
|
111
|
+
DATA_CLOUD_TOKEN_REQUESTED = 19,
|
|
112
|
+
DATA_CLOUD_TOKEN_RECEIVED = 20,
|
|
113
|
+
CORE_ACCESS_TOKEN_REQUESTED = 21,
|
|
114
|
+
CORE_ACCESS_TOKEN_RECEIVED = 22,
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* The connectors
|
|
118
|
+
*/
|
|
119
|
+
export enum ConnectorType {
|
|
120
|
+
HYPER = 0,
|
|
121
|
+
SALESFORCE_DATA_CLOUD = 1,
|
|
122
|
+
TRINO = 2,
|
|
123
|
+
DBCOM = 3,
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* The status of the execution of a query
|
|
127
|
+
*/
|
|
128
|
+
export enum QueryExecutionStatus {
|
|
129
|
+
REQUESTED = 0,
|
|
130
|
+
SENDING = 2,
|
|
131
|
+
QUEUED = 3,
|
|
132
|
+
RUNNING = 4,
|
|
133
|
+
RECEIVED_FIRST_BATCH = 5,
|
|
134
|
+
RECEIVED_ALL_BATCHES = 6,
|
|
135
|
+
PROCESSING_RESULTS = 7,
|
|
136
|
+
PROCESSED_RESULTS = 8,
|
|
137
|
+
SUCCEEDED = 9,
|
|
138
|
+
FAILED = 10,
|
|
139
|
+
CANCELLED = 11,
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* The kind of a query
|
|
143
|
+
*/
|
|
144
|
+
export enum QueryType {
|
|
145
|
+
USER_PROVIDED = 0,
|
|
146
|
+
CATALOG_QUERY_INFORMATION_SCHEMA = 1,
|
|
147
|
+
CATALOG_QUERY_PG_ATTRIBUTE = 2,
|
|
148
|
+
CATALOG_QUERY_PG_PROC = 3,
|
|
149
|
+
CATALOG_QUERY_HYPER_CLOUD = 4,
|
|
150
|
+
HEALTH_CHECK = 5,
|
|
151
|
+
INTERNAL_SQLFRAME = 6,
|
|
152
|
+
CLOUD_STORE = 7,
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* The status of a task, the numbers of the Rust state
|
|
156
|
+
*/
|
|
157
|
+
export enum TaskStatus {
|
|
158
|
+
TASK_RUNNING = 1,
|
|
159
|
+
TASK_SUCCEEDED = 2,
|
|
160
|
+
TASK_FAILED = 3,
|
|
161
|
+
TASK_CANCELLED = 4,
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/** The I/O of the runtime, one object of the host (docs/design/dashql_runtime.md). The members return promises where the runtime awaits them. */
|
|
165
|
+
export interface RuntimePlatform {
|
|
166
|
+
/** The clock in milliseconds since epoch, and timers */
|
|
167
|
+
clock: { now(): number; sleep(ms: number): Promise<void> };
|
|
168
|
+
/** Log a message with its details as key value pairs, on a target of the log */
|
|
169
|
+
log(level: 'debug' | 'info' | 'warn' | 'error', message: string, details: [string, string][], target?: string): void;
|
|
170
|
+
/** The handle table of the host objects that the runtime names by a number */
|
|
171
|
+
handles: RuntimeHandles;
|
|
172
|
+
/** The Arrow tables of the host by handle, result data never enters the module */
|
|
173
|
+
tables: RuntimeTables;
|
|
174
|
+
/** The compute database of the computations, null until the host set it up */
|
|
175
|
+
readonly compute: ComputePlatform | null;
|
|
176
|
+
/** Send requests with the HTTP client of the platform */
|
|
177
|
+
http: RuntimeHttp;
|
|
178
|
+
/** The channels of the host: the ones that the setups connect, and the ones that run queries themselves (the embedded Hyper, gRPC through the native proxy, the channels of tests) */
|
|
179
|
+
channels: RuntimeChannels;
|
|
180
|
+
/** The query result cache, null without one */
|
|
181
|
+
readonly resultCache: RuntimeResultCache | null;
|
|
182
|
+
/** The files of the runs of workbooks in the compute database: the materialized results, the cached results that they scan and the attachments. Null without a compute database that reads Parquet files. */
|
|
183
|
+
readonly mounts: RuntimeMounts | null;
|
|
184
|
+
/** Random ids and the SHA-256 digests of the keys of the query result cache */
|
|
185
|
+
crypto: { randomUuid(): string; sha256(bytes: Uint8Array): Promise<Uint8Array> };
|
|
186
|
+
/** The OAuth flows of the setups */
|
|
187
|
+
oauth: RuntimeOAuth;
|
|
188
|
+
/** The specs of the client functions of the extensions, the JSON text */
|
|
189
|
+
extensions: { loadSpec(extension: string): Promise<string> };
|
|
190
|
+
/** The storage of the workbooks and the connections, the storage writer and the restore read and write through it */
|
|
191
|
+
readonly storage: RuntimeStorage | null;
|
|
192
|
+
/** The `.dashql` archives of imports and exports: the ZIP container and the Parquet files of the workbook tables. Null without. */
|
|
193
|
+
readonly archives: RuntimeArchives | null;
|
|
194
|
+
/** The state of the runtime changed, the host takes the changes. Urgent changes are taken at the end of the task, the others before the next frame. */
|
|
195
|
+
changed(urgent: boolean): void;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/** The storage of the platform: the workbook files, scripts and attachments of the workbooks, the app manifest and the files of the connections. Workbook files and connection entries cross as plain JSON values. */
|
|
199
|
+
export interface RuntimeStorage {
|
|
200
|
+
/** The workbook file, rejects if there is none */
|
|
201
|
+
loadWorkbook(workbookId: string): Promise<unknown>;
|
|
202
|
+
/**
|
|
203
|
+
* The writes of the workbook file and of the scripts take what they expect on disk: `undefined` for any file, `null` for none, else the stamp that the
|
|
204
|
+
* runtime recorded. A storage with stamps rejects a write whose file differs with an `ExternalScriptChangeError` (by its name, with `workbookId` and
|
|
205
|
+
* `fileName`) and resolves with the stamp of what it wrote; a storage without stamps ignores the expectation and resolves with nothing. A write into a
|
|
206
|
+
* workbook folder that is gone rejects with a `WorkbookFolderMissingError` (by its name), the runtime stops retrying it.
|
|
207
|
+
*/
|
|
208
|
+
saveWorkbook(workbookId: string, workbook: unknown, expected?: RuntimeFileStamp | null): Promise<RuntimeFileStamp | null | void>;
|
|
209
|
+
saveScript(workbookId: string, fileName: string, text: string, expected?: RuntimeFileStamp | null): Promise<RuntimeFileStamp | null | void>;
|
|
210
|
+
/** A missing file is deleted already */
|
|
211
|
+
deleteScript(workbookId: string, fileName: string, expected?: RuntimeFileStamp | null): Promise<void>;
|
|
212
|
+
/** The file keeps its stamp, a missing source is renamed already */
|
|
213
|
+
renameScript(workbookId: string, from: string, to: string, expectedFrom?: RuntimeFileStamp | null, expectedTo?: RuntimeFileStamp | null): Promise<void>;
|
|
214
|
+
/** The names of the attachments, the runtime normalizes them to NFC and orders them naturally */
|
|
215
|
+
listAttachments(workbookId: string): Promise<string[]>;
|
|
216
|
+
/** Update the connection entries of the app manifest exclusively. The update gets the entries, null before the connections were migrated, and returns the new ones, null if nothing changed. */
|
|
217
|
+
updateConnections(update: (connections: unknown[] | null) => unknown[] | null): Promise<void>;
|
|
218
|
+
saveConnectionFile(connectionId: string, fileName: string, text: string): Promise<void>;
|
|
219
|
+
deleteConnectionFiles(connectionId: string): Promise<void>;
|
|
220
|
+
deleteWorkbook(workbookId: string): Promise<void>;
|
|
221
|
+
/** Does the storage own the connections? A storage of a single workbook folder doesn't. */
|
|
222
|
+
ownsConnections(): boolean;
|
|
223
|
+
/** The entries of the workbook tree in the order of the sidebar: the id of a workbook as `path`, where it is stored and its native folder */
|
|
224
|
+
listWorkbooks(): Promise<{ path: string; storageType?: string; nativePath?: string | null }[]>;
|
|
225
|
+
/** The connection entries of the app manifest, null if the manifest has none */
|
|
226
|
+
loadManifestConnections(): Promise<unknown[] | null>;
|
|
227
|
+
/** The script files of a workbook */
|
|
228
|
+
loadScripts(workbookId: string): Promise<RestoreScriptFile[]>;
|
|
229
|
+
/** The data files of a workbook */
|
|
230
|
+
listDataFiles(workbookId: string): Promise<WorkbookDataFile[]>;
|
|
231
|
+
/** A file of a connection, null if it doesn't exist */
|
|
232
|
+
loadConnectionFile(connectionId: string, fileName: string): Promise<string | null>;
|
|
233
|
+
/** An attachment of a workbook, a Blob or its bytes */
|
|
234
|
+
loadDataFile(workbookId: string, name: string): Promise<Blob | Uint8Array>;
|
|
235
|
+
/** Write an attachment of a workbook */
|
|
236
|
+
saveDataFile(workbookId: string, name: string, file: Blob | Uint8Array): Promise<void>;
|
|
237
|
+
/** Rename an attachment of a workbook, keeping its contents */
|
|
238
|
+
renameDataFile(workbookId: string, from: string, to: string): Promise<void>;
|
|
239
|
+
/** Add or replace an entry of the workbook tree, e.g. to route a workbook to the origin private file system */
|
|
240
|
+
upsertWorkbookEntry(entry: unknown): Promise<void>;
|
|
241
|
+
/** Delete the files of a workbook, its entry stays */
|
|
242
|
+
deleteWorkbookFiles(workbookId: string): Promise<void>;
|
|
243
|
+
/** Register a native workbook folder in place under an id: the platform adds it to the workbook tree, the runtime migrates it */
|
|
244
|
+
registerNativeWorkbook(dir: string, workbookId: string): Promise<void>;
|
|
245
|
+
/** The folder of a workbook that the platform keeps in a folder of its own, e.g. a native workbook folder; null for the workbooks of the storage root, which `migrateStorage` migrates. The runtime migrates the folder when it reads a workbook file of an older format and checks it for changes outside the app. */
|
|
246
|
+
workbookFolder?(workbookId: string): RuntimeWorkbookFolder | null;
|
|
247
|
+
/** The attachments of a workbook folder changed outside the app, e.g. its mount looks them up again */
|
|
248
|
+
attachmentsChanged?(workbookId: string): void;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/** The top-level files of a workbook folder, as the migrations read and write them */
|
|
252
|
+
export interface RuntimeFolder {
|
|
253
|
+
/** A file, null if the folder doesn't hold it */
|
|
254
|
+
readText(name: string): Promise<string | null>;
|
|
255
|
+
/** Write a file, resolves with its stamp if the folder keeps stamps */
|
|
256
|
+
writeText(name: string, text: string): Promise<RuntimeFileStamp | null | void>;
|
|
257
|
+
/** Remove a file, a missing file is ignored */
|
|
258
|
+
remove(name: string): Promise<void>;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/** The stamp of a file: size and modification time */
|
|
262
|
+
export interface RuntimeFileStamp {
|
|
263
|
+
size: number;
|
|
264
|
+
mtimeMs: number;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/** The stamps of the files of a workbook folder */
|
|
268
|
+
export interface RuntimeFolderStamps {
|
|
269
|
+
scripts: ({ name: string } & RuntimeFileStamp)[];
|
|
270
|
+
attachments: ({ name: string } & RuntimeFileStamp)[];
|
|
271
|
+
/** The workbook file, null if there is none */
|
|
272
|
+
workbook: RuntimeFileStamp | null;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/** A workbook folder that may change outside the app, e.g. a native workbook folder. The runtime keeps the stamps of what it wrote and acknowledged. */
|
|
276
|
+
export interface RuntimeWorkbookFolder extends RuntimeFolder {
|
|
277
|
+
/** The stamps of the scripts, the attachments and the workbook file of the folder */
|
|
278
|
+
stampFolder(): Promise<RuntimeFolderStamps>;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/** The storage root of the app for its migrations: files and directories by their paths below the root, `/` separated */
|
|
282
|
+
export interface RuntimeStorageRoot {
|
|
283
|
+
/** A file, null if it doesn't exist */
|
|
284
|
+
readText(path: string): Promise<string | null>;
|
|
285
|
+
/** Write a file, its directories are created */
|
|
286
|
+
writeText(path: string, text: string): Promise<void>;
|
|
287
|
+
/** Create a directory and its parents */
|
|
288
|
+
createDirectory(path: string): Promise<void>;
|
|
289
|
+
/** Remove a file, or a directory with its content; a missing one is ignored */
|
|
290
|
+
remove(path: string): Promise<void>;
|
|
291
|
+
/** The entries of a directory, null if it doesn't exist */
|
|
292
|
+
list(path: string): Promise<{ name: string; directory: boolean }[] | null>;
|
|
293
|
+
/** Copy the files and folders of a directory into another one, which is created. Existing files are replaced, or kept with `keepExisting`. */
|
|
294
|
+
copyDirectory(from: string, to: string, keepExisting: boolean): Promise<void>;
|
|
295
|
+
/** The folder of a native workbook, claimed for the app; null without native folders or if it doesn't exist */
|
|
296
|
+
nativeFolder(nativePath: string): Promise<RuntimeFolder | null>;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/** An entry of a `.dashql` archive that the platform writes: a workbook table from the Arrow IPC of its rows, written as Parquet, or a file of the handle table as it is */
|
|
300
|
+
export interface RuntimeArchiveEntry {
|
|
301
|
+
fileName: string;
|
|
302
|
+
/** Stored without compression, else deflated */
|
|
303
|
+
stored: boolean;
|
|
304
|
+
table: Uint8Array | null;
|
|
305
|
+
file: number | null;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/** The `.dashql` archives of the platform. An archive that is read is a Blob of the handle table, the platform keeps its reader until `close`. */
|
|
309
|
+
export interface RuntimeArchives {
|
|
310
|
+
/** Write an archive of the entries in order, resolves with its Blob */
|
|
311
|
+
write(entries: RuntimeArchiveEntry[]): Promise<Blob>;
|
|
312
|
+
/** The bytes of an archive of the handle table, e.g. for a link */
|
|
313
|
+
bytes(archive: number): Promise<Uint8Array>;
|
|
314
|
+
/** The entries of an archive, the runtime normalizes their names to NFC */
|
|
315
|
+
entries(archive: number): Promise<{ filename: string; directory: boolean }[]>;
|
|
316
|
+
/** The text of an entry */
|
|
317
|
+
readText(archive: number, index: number): Promise<string>;
|
|
318
|
+
/** A workbook table of a Parquet entry as Arrow IPC */
|
|
319
|
+
readTable(archive: number, index: number): Promise<Uint8Array>;
|
|
320
|
+
/** A file entry: a slice of the archive with the CRC-32 of the entry if it is stored and `slice` is set, else its bytes checked against the CRC-32 */
|
|
321
|
+
readFile(archive: number, index: number, slice: boolean): Promise<{ file: Blob; crc32: number | null }>;
|
|
322
|
+
/** Close the reader of an archive */
|
|
323
|
+
close(archive: number): Promise<void>;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/** A workbook folder that an import reads: a native folder, a folder of the browser, a hosted workbook */
|
|
327
|
+
export interface RuntimeImportFolder {
|
|
328
|
+
/** A top-level file or a catalog file of a connection (`connections/<id>/<file>`), null if missing */
|
|
329
|
+
readText(path: string): Promise<string | null>;
|
|
330
|
+
/** The script files, given the scripts that the workbook file lists */
|
|
331
|
+
scripts(listed: string[]): Promise<{ name: string; sql: string }[]>;
|
|
332
|
+
/** The attachments, given the attachments that the workbook file lists */
|
|
333
|
+
attachments(listed: string[]): Promise<{ name: string; file: Blob | Uint8Array }[]>;
|
|
334
|
+
/** The prefix of the errors, e.g. "Invalid remote workbook" */
|
|
335
|
+
readonly errorPrefix?: string;
|
|
336
|
+
/** Metadata of the source that the workbook file takes, e.g. the URL of a hosted workbook */
|
|
337
|
+
readonly metadata?: unknown;
|
|
338
|
+
/** The folder of a native workbook that is registered in place */
|
|
339
|
+
readonly nativePath?: string | null;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
/** The source of an import: a `.dashql` archive (a Blob of the handle table), a workbook folder, or the workbook tables with the rows of each table as Arrow IPC and the Parquet files of the data tables */
|
|
343
|
+
export type ImportSource =
|
|
344
|
+
| { archive: number }
|
|
345
|
+
| { folder: RuntimeImportFolder }
|
|
346
|
+
| { tables: { rows: Record<string, Uint8Array>; data: { tableName: string; file: Blob | Uint8Array; crc32?: number | null }[]; errorPrefix?: string } };
|
|
347
|
+
|
|
348
|
+
/** A step of the commit of an import */
|
|
349
|
+
export type ImportStep = 'results' | 'workbook' | 'scripts' | 'attachments' | 'open';
|
|
350
|
+
|
|
351
|
+
/** The workbook tables of an export */
|
|
352
|
+
export interface ExportedTables {
|
|
353
|
+
/** The rows of the workbook tables by table name */
|
|
354
|
+
rows: Record<string, Record<string, string | number | boolean | null>[]>;
|
|
355
|
+
/** The Parquet files of the attachment and result tables by handle */
|
|
356
|
+
data: { tableName: string; file: number; size: number; crc32: number | null }[];
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
/** A channel of the host that a setup asks the host to connect: the embedded Hyper, or Hyper over gRPC through the native proxy. The runtime speaks Trino, Hyper over HTTP and the Hyper of Salesforce itself. */
|
|
360
|
+
export type RuntimeChannelRequest = { type: 'hyper'; kind: 'embedded' | 'grpc'; params: any };
|
|
361
|
+
|
|
362
|
+
/** How the platform takes the user through the redirect page */
|
|
363
|
+
export interface RuntimeOAuthFlowInfo {
|
|
364
|
+
redirectVariant: 'WEB_OPENER_FLOW' | 'NATIVE_LINK_FLOW';
|
|
365
|
+
redirectCallbackUrl: string | null;
|
|
366
|
+
debugMode: boolean;
|
|
367
|
+
flavor: string | null;
|
|
368
|
+
}
|
|
369
|
+
/** The OAuth flows of the platform. A flow belongs to a setup by the id of the setup, `abort` with the id of the flow stops it: the runtime aborts a flow that it stops waiting for, e.g. a cancelled setup, which closes the loopback server or the window of the flow. */
|
|
370
|
+
export interface RuntimeOAuth {
|
|
371
|
+
/** A PKCE challenge: a random verifier and the base64url of its SHA-256 digest */
|
|
372
|
+
pkce(): Promise<{ value: string; verifier: string }>;
|
|
373
|
+
flowInfo(setupId: string): RuntimeOAuthFlowInfo;
|
|
374
|
+
/** Open the authorization URL and wait for the loopback redirect. The events are 'WINDOW_OPENED', 'WINDOW_CLOSED' and 'EXTERNAL_BROWSER_OPENED'. */
|
|
375
|
+
authorizeWithLoopback(setupId: string, flow: number, url: string, callbackUrl: string, onEvent: (event: string) => void): Promise<{ code?: string; state?: string; error?: string; errorDescription?: string }>;
|
|
376
|
+
/** Open the authorization URL and wait for the callback of the redirect page whose state has the flow id */
|
|
377
|
+
authorizeWithRedirectPage(setupId: string, flow: number, url: string, flowId: string, onEvent: (event: string) => void): Promise<unknown>;
|
|
378
|
+
abort(flow: number): void;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
/** The handle table of the host */
|
|
382
|
+
export interface RuntimeHandles {
|
|
383
|
+
/** Keep an object under a new handle */
|
|
384
|
+
register(object: unknown): number;
|
|
385
|
+
/** Forget the object of a handle */
|
|
386
|
+
release(handle: number): void;
|
|
387
|
+
/** The object of a handle */
|
|
388
|
+
get(handle: number): unknown;
|
|
389
|
+
/** Keep the object of a handle under a new handle as well, e.g. a result table that a computation takes too */
|
|
390
|
+
duplicate(handle: number): number;
|
|
391
|
+
/** Close the object of a handle, the handle stays until its release. The runtime closes at once with it and releases the handle with the changes, without it the store closes and releases. */
|
|
392
|
+
close?(handle: number): void;
|
|
393
|
+
/** Abort the object of a handle with a reason, the runtime aborts at once with it and leaves the abort to the store without it */
|
|
394
|
+
abort?(handle: number, reason: string): void;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
/** The Arrow tables of the host by handle */
|
|
398
|
+
export interface RuntimeTables {
|
|
399
|
+
/** Begin a table with an Arrow IPC stream, its schema and maybe batches, returns its handle */
|
|
400
|
+
begin(ipc: Uint8Array): number;
|
|
401
|
+
/** Append the batches of an Arrow IPC stream to a table that began */
|
|
402
|
+
append(table: number, ipc: Uint8Array): void;
|
|
403
|
+
/** Open a table that streams in parts of one Arrow IPC stream, a message may span parts. A channel of the host pushes its batches into it. */
|
|
404
|
+
open(): number;
|
|
405
|
+
/** Push the next part of the Arrow IPC stream of a table that was opened */
|
|
406
|
+
push(table: number, part: Uint8Array): void;
|
|
407
|
+
/** Finish a table, it is a table of the handle table from then on */
|
|
408
|
+
finish(table: number): { rows: number; bytes: number; columns: number; batches: number };
|
|
409
|
+
/** A table of the handle table as an Arrow IPC stream, for the small tables that the runtime parses, e.g. the results of the metadata queries of the catalog loader */
|
|
410
|
+
read(table: number): Uint8Array;
|
|
411
|
+
/** The rows of a table of the handle table and its schema as an Arrow IPC stream without batches, the rows stay with the host */
|
|
412
|
+
describe(table: number): { rows: number; schema: Uint8Array };
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
/** A request of the runtime for the HTTP client of the host */
|
|
416
|
+
export interface RuntimeHttpRequest {
|
|
417
|
+
method: string;
|
|
418
|
+
url: string;
|
|
419
|
+
headers: [string, string][];
|
|
420
|
+
body: string | null;
|
|
421
|
+
/** The request or its response carries credentials, e.g. a token request: the host keeps no record of their bodies and headers */
|
|
422
|
+
sensitive: boolean;
|
|
423
|
+
}
|
|
424
|
+
/** A response of the HTTP client of the host */
|
|
425
|
+
export interface RuntimeHttpResponse {
|
|
426
|
+
status: number;
|
|
427
|
+
statusText: string;
|
|
428
|
+
headers: [string, string][];
|
|
429
|
+
body: Uint8Array;
|
|
430
|
+
}
|
|
431
|
+
/** Fetch of the platform: `abort` with the id of a request stops it */
|
|
432
|
+
export interface RuntimeHttp {
|
|
433
|
+
fetch(id: number, request: RuntimeHttpRequest): Promise<RuntimeHttpResponse>;
|
|
434
|
+
abort(id: number): void;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
/** What a channel of the host reports while it streams a result, the batches go into the table of the query */
|
|
438
|
+
export type RuntimeChannelMessage =
|
|
439
|
+
| { type: 'progress'; progress: QueryProgressView }
|
|
440
|
+
| { type: 'batch'; metrics: QueryStreamMetrics }
|
|
441
|
+
| { type: 'end'; metrics: QueryStreamMetrics };
|
|
442
|
+
/** A query on a channel of the host, what the host needs to run it there */
|
|
443
|
+
export interface RuntimeChannelQuery {
|
|
444
|
+
text: string;
|
|
445
|
+
/** The time to wait for the next batch, null for the default of the channel */
|
|
446
|
+
readTimeoutMs: number | null;
|
|
447
|
+
/** Collect the result, a statement whose output nothing reads drains it */
|
|
448
|
+
publishResults: boolean;
|
|
449
|
+
/** The name of the connector, e.g. for the error of a channel that is not set up */
|
|
450
|
+
connector: string;
|
|
451
|
+
/** Is the query a call of a client function? The runtime sends its requests itself, the host names only the tokens of a Salesforce channel. */
|
|
452
|
+
clientFunction: boolean;
|
|
453
|
+
}
|
|
454
|
+
/** The channels of the host. The setups connect them, the queries of the host run on them by query: the host knows the channel of a query from the query it described. */
|
|
455
|
+
export interface RuntimeChannels {
|
|
456
|
+
/** Connect a channel of a setup, returns its handle. A channel that the runtime stops waiting for is closed once it is connected. */
|
|
457
|
+
connect(setupId: string, request: RuntimeChannelRequest): Promise<number>;
|
|
458
|
+
/** The token of the link to a Hyper that the page holds, null without */
|
|
459
|
+
hyperLinkToken(connectionId: string): string | null;
|
|
460
|
+
/** Describe a query on a channel of the host (null before its setup) as `{ type: 'host' }`. The connections own the channels that the runtime speaks itself (Trino, Hyper over HTTP, the Hyper of Salesforce), the host never describes them. The host keeps the channel and the query until `forget`. */
|
|
461
|
+
describe(queryId: number, channel: number | null, query: RuntimeChannelQuery): Promise<RuntimeChannelTarget>;
|
|
462
|
+
/** The query ended */
|
|
463
|
+
forget(queryId: number): void;
|
|
464
|
+
/** Run a query on its channel, its batches go into the table that was opened for it. False if the channel returned no result. */
|
|
465
|
+
open(queryId: number, table: number): Promise<boolean>;
|
|
466
|
+
/** The next message of the stream of a query */
|
|
467
|
+
next(queryId: number): Promise<RuntimeChannelMessage>;
|
|
468
|
+
/** Cancel the query of a channel: one that `open` still opens, the open then fails or returns a stream that the next cancel stops, or its stream at the backend */
|
|
469
|
+
cancel(queryId: number): Promise<void>;
|
|
470
|
+
/** Is the profile of the query shown? A channel fetches the plan and its statistics only then. */
|
|
471
|
+
profileDetail(queryId: number, shown: boolean): void;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
/** The query result cache of the platform, Parquet files that the compute database reads and writes */
|
|
475
|
+
export interface RuntimeResultCache {
|
|
476
|
+
/** The newest file of a key, null on a miss */
|
|
477
|
+
lookup(key: string): Promise<{ name: string; cachedAt: number; size: number } | null>;
|
|
478
|
+
/** Read a file into a table of the handle table */
|
|
479
|
+
read(name: string): Promise<RuntimeCachedTable>;
|
|
480
|
+
/** Record a read of a file */
|
|
481
|
+
touch(name: string): Promise<void>;
|
|
482
|
+
/** Write a table of the handle table as the newest file of a key, resolves with the name of the file */
|
|
483
|
+
write(key: string, table: number): Promise<string>;
|
|
484
|
+
/** Keep the newest file of a key until `release`, null on a miss */
|
|
485
|
+
retain(key: string): Promise<{ id: number; name: string } | null>;
|
|
486
|
+
/** Release a file that `retain` or `pin` of the mounts kept */
|
|
487
|
+
release(id: number): Promise<void>;
|
|
488
|
+
/** The Blob of a file, e.g. one that `retain` kept for an export */
|
|
489
|
+
file(name: string): Promise<Blob>;
|
|
490
|
+
/** Add a result of a key from a file of the handle table, checked against the CRC-32. Resolves false if the key was cached already, the files of the app win. */
|
|
491
|
+
import(key: string, file: number, crc32: number | null): Promise<boolean>;
|
|
492
|
+
/** The limits of the files, the runtime evicts the least recently read files beyond them after every write of a file of a key */
|
|
493
|
+
capacity(): { maxBytes: number; maxFiles: number };
|
|
494
|
+
/** The Parquet files with their sizes, their write times and the times they were read last (the write time if never), for the eviction */
|
|
495
|
+
files(): Promise<{ name: string; size: number; mtimeMs: number; lastAccessMs: number }[]>;
|
|
496
|
+
/** Remove a file and its marker if nobody reads it, resolves false if the file is read and stays */
|
|
497
|
+
remove(name: string): Promise<boolean>;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
/** The files of the runs of workbooks in the compute database, the files of the query result cache. The runtime keeps the pins of a run, releases them with `release` of the cache once the run settled and then removes its transient files with `remove`. */
|
|
501
|
+
export interface RuntimeMounts {
|
|
502
|
+
/** The directory of the files of the runs, the files of the query result cache; null without the cache */
|
|
503
|
+
prefix(): string | null;
|
|
504
|
+
/** The name of a new file of the result of a script: a file of its key if the key is reusable, a transient file otherwise */
|
|
505
|
+
fileName(key: string | null): string;
|
|
506
|
+
/** Mount the files in the compute database and pin a file at a path below the prefix, also one that is about to be written. Resolves with the id that `release` of the cache releases it with. */
|
|
507
|
+
pin(path: string): Promise<number>;
|
|
508
|
+
/** Write a table of the handle table as Parquet file at a path below the prefix that is pinned, resolves with its rows */
|
|
509
|
+
write(path: string, table: number): Promise<number>;
|
|
510
|
+
/** Mount the attachments of a workbook */
|
|
511
|
+
attachments(workbookId: string): Promise<void>;
|
|
512
|
+
/** The columns of a Parquet attachment of a workbook */
|
|
513
|
+
attachmentColumns(workbookId: string, fileName: string): Promise<string[]>;
|
|
514
|
+
/** Unmount the attachments of a workbook that was deleted */
|
|
515
|
+
dropAttachments(workbookId: string): Promise<void>;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
/** The compute database of the computations, the embedded Hyper of the platform. The context of a call names the computation, the title of its task, the connection and the client context of the computation, and the run that `cancel` aborts. Result data never enters the module: a result is imported as the Arrow table of its handle, the tables that the tasks read stay Arrow tables, the runtime reads only the small ones that it parses as Arrow IPC streams. */
|
|
519
|
+
export interface ComputePlatform {
|
|
520
|
+
/** Create the table of a data frame from an Arrow table of the handle table, with its rows numbered from 1 in an appended column of 64-bit integers that can't be null */
|
|
521
|
+
importTable(dataFrame: number, tableName: string, table: unknown, rowNumberField: string, context: ComputeCallContext): Promise<void>;
|
|
522
|
+
/** Create the table of a data frame from a SELECT, the host tracks the SELECT as a query of the task */
|
|
523
|
+
createTable(dataFrame: number, tableName: string, sql: string, context: ComputeCallContext): Promise<void>;
|
|
524
|
+
/** Run a query whose small result the runtime parses, resolves to its result as an Arrow IPC stream */
|
|
525
|
+
query(sql: string, context: ComputeCallContext): Promise<Uint8Array>;
|
|
526
|
+
/** Run a query, resolves to its result as an Arrow table that the runtime keeps in the handle table */
|
|
527
|
+
queryTable(sql: string, context: ComputeCallContext): Promise<unknown>;
|
|
528
|
+
/** Drop the table of a data frame */
|
|
529
|
+
dropTable(dataFrame: number, tableName: string): Promise<void>;
|
|
530
|
+
/** Abort the calls of a run */
|
|
531
|
+
cancel(run: number): void;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* A cached result that the query result cache read into a table of the handle table
|
|
537
|
+
*/
|
|
538
|
+
export interface RuntimeCachedTable {
|
|
539
|
+
table: number;
|
|
540
|
+
rows: number;
|
|
541
|
+
columns: number;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* Where a query of a channel of the host runs, as the platform describes it: the channel of the host. The connections
|
|
546
|
+
* own the channels that the module speaks itself (Trino, Hyper over HTTP, the Hyper of Salesforce), the platform never
|
|
547
|
+
* describes them.
|
|
548
|
+
*/
|
|
549
|
+
export type RuntimeChannelTarget = { type: "host" };
|
|
550
|
+
|
|
551
|
+
/**
|
|
552
|
+
* An effect of the runtime on a handle of the host, applied by the store when it takes the changes
|
|
553
|
+
*/
|
|
554
|
+
export type HandleEffect = { type: "release"; handle: number } | { type: "close"; handle: number } | { type: "abort"; handle: number; reason: string };
|
|
555
|
+
|
|
556
|
+
/**
|
|
557
|
+
* A hold of the writer (no workbook) or of a workbook
|
|
558
|
+
*/
|
|
559
|
+
export interface StorageHoldView {
|
|
560
|
+
workbookId: string | null;
|
|
561
|
+
reason: StorageHoldReason;
|
|
562
|
+
count: number;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
/**
|
|
566
|
+
* A write that failed. One that failed for a moment runs again after a backoff, one whose target is gone stops
|
|
567
|
+
* (`permanent`) until a newer write of its key or until the app discards it (`storageDiscardWrites`).
|
|
568
|
+
*/
|
|
569
|
+
export interface FailedStorageWriteView {
|
|
570
|
+
key: string;
|
|
571
|
+
/**
|
|
572
|
+
* The workbook of the key, null for the files of the app
|
|
573
|
+
*/
|
|
574
|
+
workbookId: string | null;
|
|
575
|
+
/**
|
|
576
|
+
* The last error
|
|
577
|
+
*/
|
|
578
|
+
error: string;
|
|
579
|
+
/**
|
|
580
|
+
* The failed attempts in a row
|
|
581
|
+
*/
|
|
582
|
+
attempts: number;
|
|
583
|
+
/**
|
|
584
|
+
* The target of the write is gone, e.g. a moved workbook folder: the writer stopped retrying it
|
|
585
|
+
*/
|
|
586
|
+
permanent: boolean;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
/**
|
|
590
|
+
* The statistics of a key: the scheduled writes of the key and the writes of its file
|
|
591
|
+
*/
|
|
592
|
+
export interface StorageWriteStatistics {
|
|
593
|
+
scheduledWrites: number;
|
|
594
|
+
writes: number;
|
|
595
|
+
writtenBytes: number;
|
|
596
|
+
writeTimeMs: number;
|
|
597
|
+
/**
|
|
598
|
+
* The time of the last write in milliseconds since the epoch
|
|
599
|
+
*/
|
|
600
|
+
lastWriteMs: number | null;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
/**
|
|
604
|
+
* The outcome of a write. A failed write carries what the host failed with, a patch of a workbook file that is not
|
|
605
|
+
* available names the workbook.
|
|
606
|
+
*/
|
|
607
|
+
export type StorageWriteOutcome = { status: "written" } | { status: "superseded" } | { status: "cancelled" } | { status: "deferred" } | { status: "failed"; error: unknown; unavailableWorkbook?: string };
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* The statistics of the writes of a key, with the key within its workbook for display
|
|
611
|
+
*/
|
|
612
|
+
export interface StorageKeyStatistics {
|
|
613
|
+
key: string;
|
|
614
|
+
/**
|
|
615
|
+
* The key without the prefix of its workbook, e.g. `scripts/a.sql:delete`
|
|
616
|
+
*/
|
|
617
|
+
label: string;
|
|
618
|
+
statistics: StorageWriteStatistics;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
/**
|
|
622
|
+
* Why the writes of the writer or of a workbook are held
|
|
623
|
+
*/
|
|
624
|
+
export type StorageHoldReason = "externalChange" | "reload" | "import" | "handover" | "pause";
|
|
625
|
+
|
|
626
|
+
/**
|
|
627
|
+
* A workbook of the list of the workbooks
|
|
628
|
+
*/
|
|
629
|
+
export interface WorkbookListEntry {
|
|
630
|
+
workbookId: string;
|
|
631
|
+
name: string | null;
|
|
632
|
+
ephemeral: boolean;
|
|
633
|
+
/**
|
|
634
|
+
* Is the workbook a read-only look at a version of a published workbook?
|
|
635
|
+
*/
|
|
636
|
+
cloudPreview: boolean;
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
/**
|
|
640
|
+
* A change of the text of a script in the offset unit of the editors
|
|
641
|
+
*/
|
|
642
|
+
export interface WorkbookTextChange {
|
|
643
|
+
from: number;
|
|
644
|
+
to: number;
|
|
645
|
+
insert: string;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
/**
|
|
649
|
+
* What the runtime derives from the scripts of a workbook with the planner: the checked script references, the
|
|
650
|
+
* dataflow and the inputs. The text spans are in the offset unit of the editors.
|
|
651
|
+
*/
|
|
652
|
+
export interface WorkbookDerivedView {
|
|
653
|
+
workbookId: string;
|
|
654
|
+
/**
|
|
655
|
+
* The keys of the scripts in the order of the derived buffers, the feed order
|
|
656
|
+
*/
|
|
657
|
+
scriptKeys: number[];
|
|
658
|
+
/**
|
|
659
|
+
* The file names of the scripts in the order of the derived buffers, the references name scripts by index
|
|
660
|
+
*/
|
|
661
|
+
scriptFiles: string[];
|
|
662
|
+
/**
|
|
663
|
+
* The file names of the attachments in the order that the references name them by index
|
|
664
|
+
*/
|
|
665
|
+
attachments: string[];
|
|
666
|
+
references: FlatBuffer<buffers_execution.ScriptReferenceCheck>;
|
|
667
|
+
dataflow: FlatBuffer<buffers_execution.SessionDataflow>;
|
|
668
|
+
inputs: FlatBuffer<buffers_execution.SessionInputs>;
|
|
669
|
+
/**
|
|
670
|
+
* The hashes of the references, the dataflow and the inputs: a buffer with the hash of the previous view has its
|
|
671
|
+
* bytes
|
|
672
|
+
*/
|
|
673
|
+
hashes: [string, string, string];
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
/**
|
|
677
|
+
* A script as the workbook file lists it: its name and the connection it names
|
|
678
|
+
*/
|
|
679
|
+
export interface WorkbookScriptListEntry {
|
|
680
|
+
name: string;
|
|
681
|
+
connectionId: string;
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
/**
|
|
685
|
+
* The visualization of a script, the compiled visualization is null when the host holds the one of the key
|
|
686
|
+
*/
|
|
687
|
+
export interface WorkbookScriptVisualization {
|
|
688
|
+
key: number;
|
|
689
|
+
/**
|
|
690
|
+
* The SQL of the query
|
|
691
|
+
*/
|
|
692
|
+
sql: string;
|
|
693
|
+
/**
|
|
694
|
+
* The statement with the tags
|
|
695
|
+
*/
|
|
696
|
+
statementId: number;
|
|
697
|
+
visualization: FlatBuffer<buffers_execution.CompiledVisualization> | null;
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
/**
|
|
701
|
+
* The dashboard placement of a script, the `@board` tag of its last statement
|
|
702
|
+
*/
|
|
703
|
+
export interface WorkbookBoardPosition {
|
|
704
|
+
statementId: number;
|
|
705
|
+
row: number | null;
|
|
706
|
+
column: number | null;
|
|
707
|
+
width: number;
|
|
708
|
+
height: number;
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
/**
|
|
712
|
+
* The keys of the payloads of a script that the host holds, the view leaves their bytes out
|
|
713
|
+
*/
|
|
714
|
+
export interface WorkbookScriptKeys {
|
|
715
|
+
editorUpdate: string | null;
|
|
716
|
+
pendingDiff: number | null;
|
|
717
|
+
visualization: number | null;
|
|
718
|
+
/**
|
|
719
|
+
* The newest processing statistics, the host holds the older ones as well
|
|
720
|
+
*/
|
|
721
|
+
statistics: number | null;
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
/**
|
|
725
|
+
* The workbooks in the order they were registered and the workbooks that were refused a load
|
|
726
|
+
*/
|
|
727
|
+
export interface WorkbookListView {
|
|
728
|
+
workbooks: WorkbookListEntry[];
|
|
729
|
+
invalidWorkbooks: RestoredInvalidWorkbook[];
|
|
730
|
+
/**
|
|
731
|
+
* The name of a new workbook: the first of "Untitled", "Untitled 2", ... that no other workbook has
|
|
732
|
+
*/
|
|
733
|
+
nextWorkbookName: string;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
/**
|
|
737
|
+
* The cached result of a script: the reusable key of its result and when the newest file of the key was written
|
|
738
|
+
*/
|
|
739
|
+
export interface WorkbookScriptCachedResult {
|
|
740
|
+
key: string;
|
|
741
|
+
/**
|
|
742
|
+
* Milliseconds since the epoch
|
|
743
|
+
*/
|
|
744
|
+
cachedAt: number;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
/**
|
|
748
|
+
* A copy of a connection that the workbook file holds, its params are JSON
|
|
749
|
+
*/
|
|
750
|
+
export interface WorkbookConnectionCopy {
|
|
751
|
+
connectionId: string;
|
|
752
|
+
params: string;
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
/**
|
|
756
|
+
* A workbook: its plain fields and its scripts in feed order. It lists the keys of its scripts, not their revisions:
|
|
757
|
+
* a change of a script changes the slice of the script and leaves the workbook alone.
|
|
758
|
+
*/
|
|
759
|
+
export interface WorkbookView {
|
|
760
|
+
workbookId: string;
|
|
761
|
+
name: string | null;
|
|
762
|
+
/**
|
|
763
|
+
* The metadata of the workbook file: the origin, whether it is ephemeral, the whole link to a cloud
|
|
764
|
+
*/
|
|
765
|
+
workbookMetadata: JsonValue;
|
|
766
|
+
ephemeral: boolean;
|
|
767
|
+
/**
|
|
768
|
+
* The connection of the next appended script when no script determines it
|
|
769
|
+
*/
|
|
770
|
+
pendingConnectionId: string | null;
|
|
771
|
+
cloud: WorkbookCloudLink | null;
|
|
772
|
+
/**
|
|
773
|
+
* Null until storage listed the files of the workbook
|
|
774
|
+
*/
|
|
775
|
+
attachments: WorkbookAttachmentView[] | null;
|
|
776
|
+
/**
|
|
777
|
+
* The script list of the workbook file
|
|
778
|
+
*/
|
|
779
|
+
scriptList: WorkbookScriptList;
|
|
780
|
+
/**
|
|
781
|
+
* The keys of the scripts in feed order
|
|
782
|
+
*/
|
|
783
|
+
scriptKeys: number[];
|
|
784
|
+
/**
|
|
785
|
+
* The file names of the scripts in feed order
|
|
786
|
+
*/
|
|
787
|
+
scriptOrder: string[];
|
|
788
|
+
/**
|
|
789
|
+
* The connections of the scripts in feed order
|
|
790
|
+
*/
|
|
791
|
+
scriptConnections: string[];
|
|
792
|
+
/**
|
|
793
|
+
* The connections that the workbook uses: of its scripts in the order they first use them, then the pending one
|
|
794
|
+
*/
|
|
795
|
+
connectionIds: string[];
|
|
796
|
+
/**
|
|
797
|
+
* The connection that an appended script runs on, the one that `createScript` without a connection takes
|
|
798
|
+
*/
|
|
799
|
+
nextScriptConnectionId: string | null;
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
/**
|
|
803
|
+
* The published workbook of a cloud that a workbook came from or was published to
|
|
804
|
+
*/
|
|
805
|
+
export interface WorkbookCloudLink {
|
|
806
|
+
workbookId: string;
|
|
807
|
+
versionId: string;
|
|
808
|
+
preview: boolean;
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
/**
|
|
812
|
+
* The processing statistics of an analysis, null when the host holds the ones of the key
|
|
813
|
+
*/
|
|
814
|
+
export interface WorkbookScriptStatistics {
|
|
815
|
+
key: number;
|
|
816
|
+
statistics: FlatBuffer<buffers_editor.EditorProcessingStatistics> | null;
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
/**
|
|
820
|
+
* The script list of the workbook file
|
|
821
|
+
*/
|
|
822
|
+
export interface WorkbookScriptList {
|
|
823
|
+
scripts: WorkbookScriptListEntry[];
|
|
824
|
+
connections: WorkbookConnectionCopy[];
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
/**
|
|
828
|
+
* A staged rewrite of a script, the diff is null when the host holds the diff of the key
|
|
829
|
+
*/
|
|
830
|
+
export interface WorkbookPendingDiff {
|
|
831
|
+
key: number;
|
|
832
|
+
/**
|
|
833
|
+
* The text before the rewrite
|
|
834
|
+
*/
|
|
835
|
+
priorText: string;
|
|
836
|
+
diff: FlatBuffer<buffers_diff.ScriptDiff> | null;
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
/**
|
|
840
|
+
* A script with its payloads
|
|
841
|
+
*/
|
|
842
|
+
export interface WorkbookScriptView {
|
|
843
|
+
key: number;
|
|
844
|
+
/**
|
|
845
|
+
* The workbook of the script
|
|
846
|
+
*/
|
|
847
|
+
workbookId: string;
|
|
848
|
+
revision: number;
|
|
849
|
+
/**
|
|
850
|
+
* Names the session of the script, a script that moved to another connection has a new one. An editor event names
|
|
851
|
+
* it (`Runtime.applyEditorEvent`).
|
|
852
|
+
*/
|
|
853
|
+
sessionGeneration: number;
|
|
854
|
+
fileName: string;
|
|
855
|
+
connectionId: string;
|
|
856
|
+
unresolvedConnectionId: string | null;
|
|
857
|
+
analysisOutdated: boolean;
|
|
858
|
+
latestQueryId: number | null;
|
|
859
|
+
latestResultQueryId: number | null;
|
|
860
|
+
/**
|
|
861
|
+
* The cached result of a run of the script in the query result cache, null without one
|
|
862
|
+
*/
|
|
863
|
+
cachedResult: WorkbookScriptCachedResult | null;
|
|
864
|
+
externalChanges: WorkbookExternalChanges | null;
|
|
865
|
+
/**
|
|
866
|
+
* What the views read of the analysis
|
|
867
|
+
*/
|
|
868
|
+
annotations: WorkbookScriptAnnotations;
|
|
869
|
+
/**
|
|
870
|
+
* Names the editor update: the generation of the session and a serial that is unique across the scripts of the
|
|
871
|
+
* runtime. An update with the same key is the same update. `Runtime.applyEditorEvent` returns the key of its update,
|
|
872
|
+
* an event names the key of the update that the editor holds.
|
|
873
|
+
*/
|
|
874
|
+
editorUpdateKey: string | null;
|
|
875
|
+
editorUpdate: FlatBuffer<buffers_editor.EditorUpdate> | null;
|
|
876
|
+
pendingDiff: WorkbookPendingDiff | null;
|
|
877
|
+
visualization: WorkbookScriptVisualization | null;
|
|
878
|
+
/**
|
|
879
|
+
* The processing statistics of the latest analyses, the oldest first
|
|
880
|
+
*/
|
|
881
|
+
statistics: WorkbookScriptStatistics[];
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
/**
|
|
885
|
+
* An attachment of a workbook
|
|
886
|
+
*/
|
|
887
|
+
export interface WorkbookAttachmentView {
|
|
888
|
+
fileName: string;
|
|
889
|
+
name: string;
|
|
890
|
+
sizeBytes: number;
|
|
891
|
+
mtimeMs: number;
|
|
892
|
+
columns: string[] | null;
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
/**
|
|
896
|
+
* A script as storage holds it, on a connection of the runtime
|
|
897
|
+
*/
|
|
898
|
+
export interface StoredScriptView {
|
|
899
|
+
name: string;
|
|
900
|
+
sql: string;
|
|
901
|
+
connectionId: string;
|
|
902
|
+
/**
|
|
903
|
+
* The connection that the workbook file names for the script while the app doesn't know it
|
|
904
|
+
*/
|
|
905
|
+
unresolvedConnectionId?: string;
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
/**
|
|
909
|
+
* What the views read of the analysis of a script: its tables, its positions on the canvas and the board, whether its
|
|
910
|
+
* last statement is a query and whether it runs only on request. Empty without an analysis.
|
|
911
|
+
*/
|
|
912
|
+
export interface WorkbookScriptAnnotations {
|
|
913
|
+
/**
|
|
914
|
+
* The names of the tables that the script defines, sorted
|
|
915
|
+
*/
|
|
916
|
+
tableDefs: string[];
|
|
917
|
+
flowPosition: WorkbookFlowPosition | null;
|
|
918
|
+
boardPosition: WorkbookBoardPosition | null;
|
|
919
|
+
lastStatementIsQuery: boolean;
|
|
920
|
+
manual: boolean;
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
/**
|
|
924
|
+
* The last change of the text of a script that the workbook made
|
|
925
|
+
*/
|
|
926
|
+
export interface WorkbookExternalChanges {
|
|
927
|
+
fromText: string;
|
|
928
|
+
changes: WorkbookTextChange[];
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
/**
|
|
932
|
+
* The placement of a script on the dataflow canvas, its `@flow` tag
|
|
933
|
+
*/
|
|
934
|
+
export interface WorkbookFlowPosition {
|
|
935
|
+
statementId: number;
|
|
936
|
+
x: number | null;
|
|
937
|
+
y: number | null;
|
|
938
|
+
width: number | null;
|
|
939
|
+
height: number | null;
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
/**
|
|
943
|
+
* A data file of a workbook as storage lists it
|
|
944
|
+
*/
|
|
945
|
+
export interface WorkbookDataFile {
|
|
946
|
+
name: string;
|
|
947
|
+
sizeBytes: number;
|
|
948
|
+
/**
|
|
949
|
+
* The time of the last modification, 0 without one
|
|
950
|
+
*/
|
|
951
|
+
mtimeMs?: number;
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
/**
|
|
955
|
+
* The update of an editor event for the editor, with its key (`WorkbookScriptView.editorUpdateKey`)
|
|
956
|
+
*/
|
|
957
|
+
export interface EditorEventOutcome {
|
|
958
|
+
update: FlatBuffer<buffers_editor.EditorUpdate>;
|
|
959
|
+
/**
|
|
960
|
+
* Names the update, the next event of the editor names it as the update that the editor holds
|
|
961
|
+
*/
|
|
962
|
+
key: string;
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
/**
|
|
966
|
+
* An event of a script of a run
|
|
967
|
+
*/
|
|
968
|
+
export type WorkbookScriptRunEvent = { type: "planned"; follows: string[] } | { type: "cached"; key: string; queryId: number } | { type: "skipped"; reason: string } | { type: "started" } | { type: "done"; key: string | null; queryId: number | null } | { type: "failed"; failure: WorkbookRunFailure } | { type: "cancelled" };
|
|
969
|
+
|
|
970
|
+
/**
|
|
971
|
+
* How a run ended
|
|
972
|
+
*/
|
|
973
|
+
export interface RunOutcome {
|
|
974
|
+
/**
|
|
975
|
+
* Why the run didn't start, e.g. another run holds the workbook, null for a run that started
|
|
976
|
+
*/
|
|
977
|
+
refused: string | null;
|
|
978
|
+
/**
|
|
979
|
+
* The queries of the last outputs of the scripts in feed order
|
|
980
|
+
*/
|
|
981
|
+
outputs: (number | null)[];
|
|
982
|
+
failure: WorkbookRunFailure | null;
|
|
983
|
+
/**
|
|
984
|
+
* Did the run hand a statement to the executor?
|
|
985
|
+
*/
|
|
986
|
+
launched: boolean;
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
/**
|
|
990
|
+
* The options of a run of a script
|
|
991
|
+
*/
|
|
992
|
+
export interface RunScriptOptions {
|
|
993
|
+
/**
|
|
994
|
+
* Read no cached results, neither of the script nor of the scripts it references
|
|
995
|
+
*/
|
|
996
|
+
refresh?: boolean;
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
/**
|
|
1000
|
+
* The state of a run of a workbook
|
|
1001
|
+
*/
|
|
1002
|
+
export interface WorkbookRunState {
|
|
1003
|
+
phase: WorkbookRunPhase;
|
|
1004
|
+
totalScripts: number;
|
|
1005
|
+
completedScripts: number;
|
|
1006
|
+
/**
|
|
1007
|
+
* The planned statements that run
|
|
1008
|
+
*/
|
|
1009
|
+
totalStatements: number;
|
|
1010
|
+
completedStatements: number;
|
|
1011
|
+
/**
|
|
1012
|
+
* The script of the statement that started last
|
|
1013
|
+
*/
|
|
1014
|
+
activeFileName: string | null;
|
|
1015
|
+
activeStatementIndex: number | null;
|
|
1016
|
+
activeStatementCount: number | null;
|
|
1017
|
+
error: string | null;
|
|
1018
|
+
/**
|
|
1019
|
+
* The scripts that the run left out: their connection can't run or could not be set up, they have no cached
|
|
1020
|
+
* result or follow a script that runs on such a connection
|
|
1021
|
+
*/
|
|
1022
|
+
skippedScripts: number;
|
|
1023
|
+
skippedFiles: string[];
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
/**
|
|
1027
|
+
* The runs of a workbook, the slice `run` of the runtime
|
|
1028
|
+
*/
|
|
1029
|
+
export interface WorkbookRunView {
|
|
1030
|
+
workbookId: string;
|
|
1031
|
+
/**
|
|
1032
|
+
* The run that holds the workbook, null while none does. The workbook starts no other run then.
|
|
1033
|
+
*/
|
|
1034
|
+
held: WorkbookRunKind | null;
|
|
1035
|
+
/**
|
|
1036
|
+
* The state of the last run of the whole workbook, it stays once the run ended
|
|
1037
|
+
*/
|
|
1038
|
+
state: WorkbookRunState | null;
|
|
1039
|
+
/**
|
|
1040
|
+
* The inputs whose change waits for the workbook
|
|
1041
|
+
*/
|
|
1042
|
+
pendingInputs: string[];
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
/**
|
|
1046
|
+
* The phase of a run
|
|
1047
|
+
*/
|
|
1048
|
+
export type WorkbookRunPhase = "planning" | "running" | "stopping" | "succeeded" | "failed" | "cancelled";
|
|
1049
|
+
|
|
1050
|
+
/**
|
|
1051
|
+
* The failure of a run or of a script, what the platform failed with goes next to it
|
|
1052
|
+
*/
|
|
1053
|
+
export interface WorkbookRunFailure {
|
|
1054
|
+
kind: WorkbookRunFailureKind;
|
|
1055
|
+
message: string;
|
|
1056
|
+
/**
|
|
1057
|
+
* The details of the error of a failed statement, e.g. what Trino said
|
|
1058
|
+
*/
|
|
1059
|
+
details: Record<string, string>;
|
|
1060
|
+
/**
|
|
1061
|
+
* The target of the log messages of the error of a failed statement
|
|
1062
|
+
*/
|
|
1063
|
+
target: string | null;
|
|
1064
|
+
/**
|
|
1065
|
+
* The query of the statement that failed, null for a failure of no statement
|
|
1066
|
+
*/
|
|
1067
|
+
queryId: number | null;
|
|
1068
|
+
/**
|
|
1069
|
+
* Did the platform fail with a value? It goes next to the failure.
|
|
1070
|
+
*/
|
|
1071
|
+
hostValue: boolean;
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
/**
|
|
1075
|
+
* The options of a run of the scripts of a workbook
|
|
1076
|
+
*/
|
|
1077
|
+
export interface RunWorkbookOptions {
|
|
1078
|
+
/**
|
|
1079
|
+
* Run the scripts that a change of these inputs affects. A run that holds the workbook stops, the run starts once
|
|
1080
|
+
* the workbook is free, with the inputs of every change since.
|
|
1081
|
+
*/
|
|
1082
|
+
inputs?: string[];
|
|
1083
|
+
/**
|
|
1084
|
+
* Run these scripts with what they need, by their indexes in feed order, every script without
|
|
1085
|
+
*/
|
|
1086
|
+
targets?: number[];
|
|
1087
|
+
/**
|
|
1088
|
+
* Read no cached results: the scripts run, the results with reusable keys become the newest files of their keys
|
|
1089
|
+
*/
|
|
1090
|
+
refresh?: boolean;
|
|
1091
|
+
/**
|
|
1092
|
+
* Analyze the results of the outputs on the compute database, true by default. The command line tool prints them.
|
|
1093
|
+
*/
|
|
1094
|
+
analyze?: boolean;
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
/**
|
|
1098
|
+
* The run that holds a workbook: a run of the whole workbook or of one of its scripts
|
|
1099
|
+
*/
|
|
1100
|
+
export type WorkbookRunKind = "workbook" | "script";
|
|
1101
|
+
|
|
1102
|
+
/**
|
|
1103
|
+
* Why a run failed
|
|
1104
|
+
*/
|
|
1105
|
+
export type WorkbookRunFailureKind = "plan" | "cancelled" | "error";
|
|
1106
|
+
|
|
1107
|
+
/**
|
|
1108
|
+
* The versions of the storage format of the module: of the storage root and of workbook files
|
|
1109
|
+
*/
|
|
1110
|
+
export interface StorageVersions {
|
|
1111
|
+
/**
|
|
1112
|
+
* The storage version of the app, `storageVersion` of the manifest
|
|
1113
|
+
*/
|
|
1114
|
+
storageVersion: number;
|
|
1115
|
+
/**
|
|
1116
|
+
* The workbook format version of the app, `formatVersion` of a workbook file
|
|
1117
|
+
*/
|
|
1118
|
+
formatVersion: number;
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
/**
|
|
1122
|
+
* What a migration of the storage changed, with the versions it migrated to
|
|
1123
|
+
*/
|
|
1124
|
+
export interface StorageMigrationOutcome {
|
|
1125
|
+
/**
|
|
1126
|
+
* The storage steps that ran
|
|
1127
|
+
*/
|
|
1128
|
+
steps: number;
|
|
1129
|
+
/**
|
|
1130
|
+
* The workbook folders that were brought to the current workbook format
|
|
1131
|
+
*/
|
|
1132
|
+
workbooks: number;
|
|
1133
|
+
/**
|
|
1134
|
+
* The storage version of the app
|
|
1135
|
+
*/
|
|
1136
|
+
storageVersion: number;
|
|
1137
|
+
/**
|
|
1138
|
+
* The workbook format version of the app
|
|
1139
|
+
*/
|
|
1140
|
+
formatVersion: number;
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
|
|
1144
|
+
/** A file to attach to a workbook, with the name it was dropped with */
|
|
1145
|
+
export interface AttachedFile {
|
|
1146
|
+
name: string;
|
|
1147
|
+
file: Blob | Uint8Array;
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
|
|
1151
|
+
/**
|
|
1152
|
+
* What an attach did
|
|
1153
|
+
*/
|
|
1154
|
+
export interface AttachFilesOutcome {
|
|
1155
|
+
/**
|
|
1156
|
+
* The attachments that were written or wait for a hold of the workbook, in the order of the files
|
|
1157
|
+
*/
|
|
1158
|
+
attached: AttachedFileName[];
|
|
1159
|
+
/**
|
|
1160
|
+
* The files that are no attachments (Parquet files only), by their names
|
|
1161
|
+
*/
|
|
1162
|
+
refused: string[];
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
/**
|
|
1166
|
+
* A file that was attached, with the name it got
|
|
1167
|
+
*/
|
|
1168
|
+
export interface AttachedFileName {
|
|
1169
|
+
/**
|
|
1170
|
+
* The name the file was dropped with
|
|
1171
|
+
*/
|
|
1172
|
+
name: string;
|
|
1173
|
+
/**
|
|
1174
|
+
* The file name of the attachment, its table parameter takes no name of a script or another attachment
|
|
1175
|
+
*/
|
|
1176
|
+
fileName: string;
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
|
|
1180
|
+
/** The slices of the runtime by kind: the id of a slice, its view, and the keys of the payloads of its view that the host holds */
|
|
1181
|
+
export interface RuntimeViews {
|
|
1182
|
+
computation: { id: number; view: ComputationView; known: undefined };
|
|
1183
|
+
connectionList: { id: 'root'; view: ConnectionListView; known: undefined };
|
|
1184
|
+
connection: { id: string; view: ConnectionView; known: undefined };
|
|
1185
|
+
query: { id: number; view: QueryView; known: (QueryProfileKeys | null)[] };
|
|
1186
|
+
workbookList: { id: 'root'; view: WorkbookListView; known: undefined };
|
|
1187
|
+
workbook: { id: string; view: WorkbookView; known: undefined };
|
|
1188
|
+
script: { id: number; view: WorkbookScriptView; known: (WorkbookScriptKeys | null)[] };
|
|
1189
|
+
workbookDerived: { id: string; view: WorkbookDerivedView; known: undefined };
|
|
1190
|
+
storage: { id: 'root'; view: StorageView; known: undefined };
|
|
1191
|
+
run: { id: string; view: WorkbookRunView; known: undefined };
|
|
1192
|
+
}
|
|
1193
|
+
/** A kind of slices of the runtime */
|
|
1194
|
+
export type ViewKind = keyof RuntimeViews;
|
|
1195
|
+
/** The id of a slice of a kind */
|
|
1196
|
+
export type ViewId<K extends ViewKind> = RuntimeViews[K]['id'];
|
|
1197
|
+
/** The view of a slice of a kind */
|
|
1198
|
+
export type ViewOf<K extends ViewKind> = RuntimeViews[K]['view'];
|
|
1199
|
+
/** The keys of the payloads that the host holds, they don't cross again */
|
|
1200
|
+
export type KnownKeys<K extends ViewKind> = RuntimeViews[K]['known'];
|
|
1201
|
+
/** The read of a slice that a task of the runtime holds: it moves with the next changes, the host keeps its view */
|
|
1202
|
+
export type BusyView = 'busy';
|
|
1203
|
+
export interface Runtime {
|
|
1204
|
+
/** The views of the slices of a kind, null for a slice that is gone, `'busy'` for one that a task holds. One crossing per kind and flush. */
|
|
1205
|
+
views<K extends ViewKind>(kind: K, ids: ViewId<K>[], known?: KnownKeys<K>): (ViewOf<K> | BusyView | null)[];
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
|
|
1209
|
+
/**
|
|
1210
|
+
* The slice that an action changes
|
|
1211
|
+
*/
|
|
1212
|
+
export type Target = { computation: number } | { connection: string } | { workbook: string } | "app";
|
|
1213
|
+
|
|
1214
|
+
/**
|
|
1215
|
+
* The actions of the runtime. An action changes the state in the call and returns its outcome; a failed action leaves
|
|
1216
|
+
* the state as it was.
|
|
1217
|
+
*/
|
|
1218
|
+
export type RuntimeAction = { kind: "deleteComputation" } | { kind: "orderBy"; value: { constraints: ComputationOrderBy[] } } | { kind: "histogramFilter"; value: { columnGroup: number; selection: [number, number] | null } } | { kind: "mostFrequentValueFilter"; value: { columnGroup: number; valueId: number | null } } | { kind: "clearCrossFilters" } | { kind: "setResultSearchPattern"; value: { search: ComputationSearchKind; pattern: string } } | { kind: "requestFilteredColumnAggregation"; value: { columnGroup: number } } | { kind: "createConnection"; value: { connectionId?: string; connectorType: ConnectorType; setupParams?: JsonParams; active?: boolean; params?: JsonParams; paramsDraft?: JsonParams; name?: string; cacheQueryResults?: boolean } } | { kind: "createWorkbook"; value: { workbookId?: string; connectionId: string; name?: string; ephemeral?: boolean; originalFileName?: string } } | { kind: "deleteWorkbook"; value: { workbookId: string } } | { kind: "createScript"; value: { index?: number; text?: string; base: string; connectionId?: string } } | { kind: "deleteScript"; value: { fileName: string } } | { kind: "renameScript"; value: { fileName: string; newName: string } } | { kind: "reorderScripts"; value: { order: string[] } } | { kind: "setScriptText"; value: { scriptKey: number; text: string; withDiff?: boolean } } | { kind: "acceptPendingDiff"; value: { scriptKey: number } } | { kind: "rejectPendingDiff"; value: { scriptKey: number } } | { kind: "setScriptVisSpec"; value: { scriptKey: number; spec: string } } | { kind: "setWorkbookInput"; value: { name: string; literal: string; scriptKeys: number[] } } | { kind: "analyzeOutdatedScript"; value: { scriptKey: number } } | { kind: "showScript"; value: { scriptKey: number; selected: boolean } } | { kind: "hideScript"; value: { scriptKey: number; selected: boolean } } | { kind: "renameWorkbook"; value: { name?: string } } | { kind: "setScriptConnection"; value: { fileName: string; connectionId: string } } | { kind: "setPendingConnection"; value: { connectionId: string } } | { kind: "replaceConnection"; value: { from: string; into: string } } | { kind: "detachConnection"; value: { from: string; into: string } } | { kind: "setWorkbookAttachments"; value: { files: WorkbookDataFile[] } } | { kind: "setCloudLink"; value: { link?: JsonValue } } | { kind: "setDraft"; value: { params: JsonParams } } | { kind: "discardDraft" } | { kind: "rename"; value: { name: string } } | { kind: "setQueryResultCaching"; value: { caching: boolean } } | { kind: "deleteConnection" } | { kind: "resetConnection" } | { kind: "relationsTouched"; value: { names: ConnectionTableName[] } } | { kind: "queryCacheDeleted"; value: { queryId: number } };
|
|
1219
|
+
|
|
1220
|
+
/**
|
|
1221
|
+
* The id of a slice or of what an action created: a number or a string
|
|
1222
|
+
*/
|
|
1223
|
+
export type SliceId = number | string;
|
|
1224
|
+
|
|
1225
|
+
/**
|
|
1226
|
+
* A slice that changed since the host took the changes, its revision is null if it went
|
|
1227
|
+
*/
|
|
1228
|
+
export interface SliceChange {
|
|
1229
|
+
kind: ViewKind;
|
|
1230
|
+
id: SliceId;
|
|
1231
|
+
revision: number | null;
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
/**
|
|
1235
|
+
* The changes since the host took them last: the changed slices and the effects on handles, in order
|
|
1236
|
+
*/
|
|
1237
|
+
export interface ChangeSet {
|
|
1238
|
+
changes: SliceChange[];
|
|
1239
|
+
effects: HandleEffect[];
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
/**
|
|
1243
|
+
* What a dispatch did
|
|
1244
|
+
*/
|
|
1245
|
+
export interface DispatchOutcome {
|
|
1246
|
+
/**
|
|
1247
|
+
* Was the action applied? A failed action leaves the state as it was.
|
|
1248
|
+
*/
|
|
1249
|
+
ok: boolean;
|
|
1250
|
+
/**
|
|
1251
|
+
* Did the action change the state?
|
|
1252
|
+
*/
|
|
1253
|
+
changed: boolean;
|
|
1254
|
+
/**
|
|
1255
|
+
* The error of a failed action
|
|
1256
|
+
*/
|
|
1257
|
+
error: string | null;
|
|
1258
|
+
/**
|
|
1259
|
+
* What the action created: the id of a connection or of a query
|
|
1260
|
+
*/
|
|
1261
|
+
id: SliceId | null;
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
/**
|
|
1265
|
+
* The storage of the runtime: what holds the writes, the writes that failed, and the questions about workbook folders
|
|
1266
|
+
* that changed outside the app. The workbooks whose writes a change outside the app holds are the holds with the
|
|
1267
|
+
* reason `externalChange`.
|
|
1268
|
+
*/
|
|
1269
|
+
export interface StorageView {
|
|
1270
|
+
/**
|
|
1271
|
+
* The holds of the writer (no workbook) and of the workbooks, with their reasons
|
|
1272
|
+
*/
|
|
1273
|
+
holds: StorageHoldView[];
|
|
1274
|
+
/**
|
|
1275
|
+
* The writes that failed, with their last errors
|
|
1276
|
+
*/
|
|
1277
|
+
failedWrites: FailedStorageWriteView[];
|
|
1278
|
+
/**
|
|
1279
|
+
* The workbooks whose scripts changed on disk, the app asks the user whether to reload them
|
|
1280
|
+
* (`answerExternalChange`)
|
|
1281
|
+
*/
|
|
1282
|
+
externalChanges: ExternalChangeView[];
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
/**
|
|
1286
|
+
* A question about a workbook folder whose scripts changed outside the app
|
|
1287
|
+
*/
|
|
1288
|
+
export interface ExternalChangeView {
|
|
1289
|
+
workbookId: string;
|
|
1290
|
+
/**
|
|
1291
|
+
* The number of the question, the answer names it. A second question about the same change has a new number.
|
|
1292
|
+
*/
|
|
1293
|
+
prompt: number;
|
|
1294
|
+
/**
|
|
1295
|
+
* Does the app hold writes of the scripts that a reload discards?
|
|
1296
|
+
*/
|
|
1297
|
+
pendingWrites: boolean;
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
/**
|
|
1301
|
+
* A command of the storage writer that waits for writes. The commands that change the writer right away are methods
|
|
1302
|
+
* of the runtime (`storageHold`, `storageRelease`, `storageDiscardWrites`).
|
|
1303
|
+
*/
|
|
1304
|
+
export type StorageCommand = { kind: "flush"; closing?: boolean } | { kind: "settle" } | { kind: "flushWorkbook"; workbookId: string } | { kind: "deleteWorkbook"; workbookId: string } | { kind: "handOver" };
|
|
1305
|
+
|
|
1306
|
+
/**
|
|
1307
|
+
* The database and schema of the relations that unqualified statements of a connection create or drop
|
|
1308
|
+
*/
|
|
1309
|
+
export interface ConnectionNameDefaults {
|
|
1310
|
+
databaseName: string;
|
|
1311
|
+
schemaName: string;
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
/**
|
|
1315
|
+
* Opaque JSON params: the params of a connection with one field named after the connector (`{ trino: {...} }`), or
|
|
1316
|
+
* the params of a connector without that field
|
|
1317
|
+
*/
|
|
1318
|
+
export type JsonParams = Record<string, unknown>;
|
|
1319
|
+
|
|
1320
|
+
/**
|
|
1321
|
+
* The catalog updates of a connection
|
|
1322
|
+
*/
|
|
1323
|
+
export interface ConnectionCatalogUpdates {
|
|
1324
|
+
/**
|
|
1325
|
+
* The running updates in the order of their ids
|
|
1326
|
+
*/
|
|
1327
|
+
tasksRunning: ConnectionCatalogUpdateTask[];
|
|
1328
|
+
/**
|
|
1329
|
+
* The finished updates in the order of their ids
|
|
1330
|
+
*/
|
|
1331
|
+
tasksFinished: ConnectionCatalogUpdateTask[];
|
|
1332
|
+
/**
|
|
1333
|
+
* Does the catalog describe the connection?
|
|
1334
|
+
*/
|
|
1335
|
+
described: boolean;
|
|
1336
|
+
/**
|
|
1337
|
+
* The running or most recently started full refresh
|
|
1338
|
+
*/
|
|
1339
|
+
currentFullRefresh: number | null;
|
|
1340
|
+
/**
|
|
1341
|
+
* The relations that executed statements touched and that no update has answered yet
|
|
1342
|
+
*/
|
|
1343
|
+
touchedRelations: ConnectionRelationName[];
|
|
1344
|
+
/**
|
|
1345
|
+
* The updates in a row that failed to answer them
|
|
1346
|
+
*/
|
|
1347
|
+
touchedFailures: number;
|
|
1348
|
+
/**
|
|
1349
|
+
* Might the catalog miss what executed statements did, since asking the connection failed too often?
|
|
1350
|
+
*/
|
|
1351
|
+
outOfDate: boolean;
|
|
1352
|
+
/**
|
|
1353
|
+
* Is the current full refresh running?
|
|
1354
|
+
*/
|
|
1355
|
+
refreshRunning: boolean;
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
/**
|
|
1359
|
+
* A catalog update
|
|
1360
|
+
*/
|
|
1361
|
+
export interface ConnectionCatalogUpdateTask {
|
|
1362
|
+
taskId: number;
|
|
1363
|
+
variant: CatalogUpdateVariant;
|
|
1364
|
+
status: CatalogUpdateTaskStatus;
|
|
1365
|
+
queries: number[];
|
|
1366
|
+
error: ConnectionError | null;
|
|
1367
|
+
startedAt: number | null;
|
|
1368
|
+
finishedAt: number | null;
|
|
1369
|
+
touchedRelations: ConnectionRelationName[];
|
|
1370
|
+
/**
|
|
1371
|
+
* The handle of the record of the update at the host: its cancellation and its error
|
|
1372
|
+
*/
|
|
1373
|
+
handle: number | null;
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1376
|
+
/**
|
|
1377
|
+
* The OAuth flow of a Trino connection, the steps that didn't happen yet are null. The PKCE verifier, the code and
|
|
1378
|
+
* the token stay in the runtime.
|
|
1379
|
+
*/
|
|
1380
|
+
export interface ConnectionTrinoOAuthState {
|
|
1381
|
+
/**
|
|
1382
|
+
* Was the PKCE challenge generated?
|
|
1383
|
+
*/
|
|
1384
|
+
pkceGenerated: boolean;
|
|
1385
|
+
/**
|
|
1386
|
+
* When the code arrived
|
|
1387
|
+
*/
|
|
1388
|
+
authCodeReceivedAt: string | null;
|
|
1389
|
+
accessToken: ConnectionTokenSummary | null;
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
/**
|
|
1393
|
+
* The details that only one connector keeps, Database.com has the ones of Salesforce
|
|
1394
|
+
*/
|
|
1395
|
+
export type ConnectionConnectorDetails = { kind: "hyper" } | { kind: "trino"; schemaResolutionError: ConnectionError | null; oauthState: ConnectionTrinoOAuthState | null } | { kind: "salesforce"; setupError: ConnectionError | null; oauthState: ConnectionSalesforceOAuthState | null };
|
|
1396
|
+
|
|
1397
|
+
/**
|
|
1398
|
+
* The state of saving a connection: whether it saves and the outcome of the last save
|
|
1399
|
+
*/
|
|
1400
|
+
export interface ConnectionSaveView {
|
|
1401
|
+
/**
|
|
1402
|
+
* Is the connection being saved?
|
|
1403
|
+
*/
|
|
1404
|
+
saving: boolean;
|
|
1405
|
+
/**
|
|
1406
|
+
* The outcome of the last save, null before one
|
|
1407
|
+
*/
|
|
1408
|
+
outcome: ConnectionSaveOutcome | null;
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
/**
|
|
1412
|
+
* The parameters of the OAuth flow of a Salesforce connection
|
|
1413
|
+
*/
|
|
1414
|
+
export interface ConnectionSalesforceOAuthParams {
|
|
1415
|
+
instanceUrl: string;
|
|
1416
|
+
appConsumerKey: string;
|
|
1417
|
+
requestedAt: number;
|
|
1418
|
+
expiresAt: number;
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1421
|
+
/**
|
|
1422
|
+
* A connection, the slice `connection` of the runtime. The field names are the ones the app reads. The queries are
|
|
1423
|
+
* listed by id, each one is a slice `query` of its own: the connection changes when a query starts or finishes, not
|
|
1424
|
+
* with the progress of a query.
|
|
1425
|
+
*/
|
|
1426
|
+
export interface ConnectionView {
|
|
1427
|
+
connectionId: string;
|
|
1428
|
+
/**
|
|
1429
|
+
* Does the connection belong to a committed workbook or was it online once?
|
|
1430
|
+
*/
|
|
1431
|
+
active: boolean;
|
|
1432
|
+
connectionStatus: ConnectionStatus;
|
|
1433
|
+
connectionHealth: ConnectionHealth;
|
|
1434
|
+
connectorType: ConnectorType;
|
|
1435
|
+
/**
|
|
1436
|
+
* The name the user gave the connection, the label falls back to the connector without it
|
|
1437
|
+
*/
|
|
1438
|
+
name: string | null;
|
|
1439
|
+
/**
|
|
1440
|
+
* Does the connection cache query results? Null for the default of the connector.
|
|
1441
|
+
*/
|
|
1442
|
+
cacheQueryResults: boolean | null;
|
|
1443
|
+
/**
|
|
1444
|
+
* Does the connection cache query results, the choice of the user or the default of the connector?
|
|
1445
|
+
*/
|
|
1446
|
+
cachesQueryResults: boolean;
|
|
1447
|
+
/**
|
|
1448
|
+
* Is the connection connected or connecting? An open connection keeps its protocol and can't be merged.
|
|
1449
|
+
*/
|
|
1450
|
+
open: boolean;
|
|
1451
|
+
/**
|
|
1452
|
+
* The health as the app prints it, e.g. `Not Started`
|
|
1453
|
+
*/
|
|
1454
|
+
healthLabel: string;
|
|
1455
|
+
/**
|
|
1456
|
+
* Can the queries of the connection read the data files that are attached to a workbook? The embedded Hyper reads
|
|
1457
|
+
* them.
|
|
1458
|
+
*/
|
|
1459
|
+
readsAttachments: boolean;
|
|
1460
|
+
details: ConnectionDetailsView;
|
|
1461
|
+
/**
|
|
1462
|
+
* The params of the last successful setup, the initial ones until then
|
|
1463
|
+
*/
|
|
1464
|
+
params: JsonParams;
|
|
1465
|
+
/**
|
|
1466
|
+
* The local settings of the form
|
|
1467
|
+
*/
|
|
1468
|
+
paramsDraft: JsonParams | null;
|
|
1469
|
+
/**
|
|
1470
|
+
* The params of the running setup, never saved
|
|
1471
|
+
*/
|
|
1472
|
+
setupAttemptParams: JsonParams | null;
|
|
1473
|
+
/**
|
|
1474
|
+
* The draft when the running setup started
|
|
1475
|
+
*/
|
|
1476
|
+
setupAttemptDraft: JsonParams | null;
|
|
1477
|
+
catalogUpdates: ConnectionCatalogUpdates;
|
|
1478
|
+
/**
|
|
1479
|
+
* The catalog entry of the relations of the connection
|
|
1480
|
+
*/
|
|
1481
|
+
catalogRelationEntryId: number;
|
|
1482
|
+
/**
|
|
1483
|
+
* The database and schema of the relations that unqualified statements create or drop
|
|
1484
|
+
*/
|
|
1485
|
+
catalogNameDefaults: ConnectionNameDefaults;
|
|
1486
|
+
/**
|
|
1487
|
+
* The script with the functions of the connection, null once it is deleted
|
|
1488
|
+
*/
|
|
1489
|
+
functionScriptEntryId: number | null;
|
|
1490
|
+
/**
|
|
1491
|
+
* The metrics of the finished queries
|
|
1492
|
+
*/
|
|
1493
|
+
metrics: QueryHistoryMetrics;
|
|
1494
|
+
/**
|
|
1495
|
+
* The active queries in the order they started
|
|
1496
|
+
*/
|
|
1497
|
+
queriesActiveOrdered: number[];
|
|
1498
|
+
/**
|
|
1499
|
+
* The active queries that run on the connection, not the queries of the computations that it only tracks
|
|
1500
|
+
*/
|
|
1501
|
+
queriesRunning: number;
|
|
1502
|
+
/**
|
|
1503
|
+
* The finished queries in the order they finished
|
|
1504
|
+
*/
|
|
1505
|
+
queriesFinishedOrdered: number[];
|
|
1506
|
+
/**
|
|
1507
|
+
* Changes whenever a query starts or finishes
|
|
1508
|
+
*/
|
|
1509
|
+
snapshotQueriesActiveFinished: number;
|
|
1510
|
+
/**
|
|
1511
|
+
* The workbooks that use the connection
|
|
1512
|
+
*/
|
|
1513
|
+
workbooks: string[];
|
|
1514
|
+
/**
|
|
1515
|
+
* Saving the connection
|
|
1516
|
+
*/
|
|
1517
|
+
save: ConnectionSaveView;
|
|
1518
|
+
/**
|
|
1519
|
+
* Can the user refresh the catalog: is the connection online without a running full refresh?
|
|
1520
|
+
*/
|
|
1521
|
+
canRefresh: boolean;
|
|
1522
|
+
/**
|
|
1523
|
+
* Does a setup of the connection run?
|
|
1524
|
+
*/
|
|
1525
|
+
setupRunning: boolean;
|
|
1526
|
+
/**
|
|
1527
|
+
* Counts the announcements of a new catalog: the scripts that use the connection are analyzed again with it
|
|
1528
|
+
*/
|
|
1529
|
+
catalogVersion: number;
|
|
1530
|
+
/**
|
|
1531
|
+
* The identity of the catalog of the connection: a connection that is created again under the same id has another
|
|
1532
|
+
* catalog, a handle of the catalog (`Runtime.catalog`) goes with its identity
|
|
1533
|
+
*/
|
|
1534
|
+
catalogId: number;
|
|
1535
|
+
}
|
|
1536
|
+
|
|
1537
|
+
/**
|
|
1538
|
+
* The connections of the runtime, the slice `connectionList`
|
|
1539
|
+
*/
|
|
1540
|
+
export interface ConnectionListView {
|
|
1541
|
+
/**
|
|
1542
|
+
* The connections in the order they were registered
|
|
1543
|
+
*/
|
|
1544
|
+
connections: ConnectionListEntry[];
|
|
1545
|
+
/**
|
|
1546
|
+
* The ids of the connections by connector, in the order they were registered
|
|
1547
|
+
*/
|
|
1548
|
+
connectionsByType: string[][];
|
|
1549
|
+
}
|
|
1550
|
+
|
|
1551
|
+
/**
|
|
1552
|
+
* The details of the setup of a connection
|
|
1553
|
+
*/
|
|
1554
|
+
export interface ConnectionDetailsView {
|
|
1555
|
+
/**
|
|
1556
|
+
* When the steps of the setup happened, by the name of the step, e.g. `channelReadyAt`
|
|
1557
|
+
*/
|
|
1558
|
+
setupTimings: Record<string, number>;
|
|
1559
|
+
/**
|
|
1560
|
+
* The params of the connector that the setup uses, without the field of the connector
|
|
1561
|
+
*/
|
|
1562
|
+
setupParams: Record<string, unknown> | null;
|
|
1563
|
+
channelError: ConnectionError | null;
|
|
1564
|
+
healthCheckError: ConnectionError | null;
|
|
1565
|
+
/**
|
|
1566
|
+
* The handle of a channel of the host, once it is ready: the embedded Hyper or Hyper over gRPC. The channels that
|
|
1567
|
+
* the runtime speaks itself have none.
|
|
1568
|
+
*/
|
|
1569
|
+
channel: number | null;
|
|
1570
|
+
connector: ConnectionConnectorDetails;
|
|
1571
|
+
}
|
|
1572
|
+
|
|
1573
|
+
/**
|
|
1574
|
+
* A table name of the analyzer, null for a name that a statement left out
|
|
1575
|
+
*/
|
|
1576
|
+
export interface ConnectionTableName {
|
|
1577
|
+
databaseName: string | null;
|
|
1578
|
+
schemaName: string | null;
|
|
1579
|
+
tableName: string | null;
|
|
1580
|
+
}
|
|
1581
|
+
|
|
1582
|
+
/**
|
|
1583
|
+
* The tokens of a connection as their JSON, null for a token that the connection doesn't hold. Only
|
|
1584
|
+
* `Runtime.revealConnectionSecrets` hands them out, the views summarize them.
|
|
1585
|
+
*/
|
|
1586
|
+
export interface ConnectionSecrets {
|
|
1587
|
+
/**
|
|
1588
|
+
* The OAuth token of a Trino connection
|
|
1589
|
+
*/
|
|
1590
|
+
accessToken: string | null;
|
|
1591
|
+
/**
|
|
1592
|
+
* The core token of a Salesforce connection
|
|
1593
|
+
*/
|
|
1594
|
+
coreAccessToken: string | null;
|
|
1595
|
+
/**
|
|
1596
|
+
* The Data Cloud token of a Salesforce connection
|
|
1597
|
+
*/
|
|
1598
|
+
dataCloudAccessToken: string | null;
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1601
|
+
/**
|
|
1602
|
+
* A connection of the list of connections
|
|
1603
|
+
*/
|
|
1604
|
+
export interface ConnectionListEntry {
|
|
1605
|
+
connectionId: string;
|
|
1606
|
+
connectorType: ConnectorType;
|
|
1607
|
+
active: boolean;
|
|
1608
|
+
/**
|
|
1609
|
+
* Is the connection listed next to the workbooks? Connections that workbooks use are, as are active ones.
|
|
1610
|
+
*/
|
|
1611
|
+
listed: boolean;
|
|
1612
|
+
/**
|
|
1613
|
+
* The number of the connection among the listed connections of its connector from 1, null if it is the only one
|
|
1614
|
+
*/
|
|
1615
|
+
ordinal: number | null;
|
|
1616
|
+
}
|
|
1617
|
+
|
|
1618
|
+
/**
|
|
1619
|
+
* A token of a connection without its secret: the facts around it that the views show, e.g. the instance or the
|
|
1620
|
+
* expiry. The token itself stays in the runtime, `Runtime.revealConnectionSecrets` hands it out on request.
|
|
1621
|
+
*/
|
|
1622
|
+
export interface ConnectionTokenSummary {
|
|
1623
|
+
tokenType: string | null;
|
|
1624
|
+
scope: string | null;
|
|
1625
|
+
/**
|
|
1626
|
+
* The instance that the token is for, e.g. the org of Salesforce or the tenant of Data Cloud
|
|
1627
|
+
*/
|
|
1628
|
+
instanceUrl: string | null;
|
|
1629
|
+
/**
|
|
1630
|
+
* The tenant or org that the token names, e.g. the audience of the Data Cloud JWT
|
|
1631
|
+
*/
|
|
1632
|
+
tenantId: string | null;
|
|
1633
|
+
issuedAt: string | null;
|
|
1634
|
+
expiresAt: string | null;
|
|
1635
|
+
}
|
|
1636
|
+
|
|
1637
|
+
/**
|
|
1638
|
+
* A relation that a statement touched or that a catalog update answers, empty names for none
|
|
1639
|
+
*/
|
|
1640
|
+
export interface ConnectionRelationName {
|
|
1641
|
+
databaseName: string;
|
|
1642
|
+
schemaName: string;
|
|
1643
|
+
tableName: string;
|
|
1644
|
+
}
|
|
1645
|
+
|
|
1646
|
+
/**
|
|
1647
|
+
* The OAuth flow of a Salesforce connection, the steps that didn't happen yet are null. The PKCE verifier, the code
|
|
1648
|
+
* and the tokens stay in the runtime.
|
|
1649
|
+
*/
|
|
1650
|
+
export interface ConnectionSalesforceOAuthState {
|
|
1651
|
+
oauthParams: ConnectionSalesforceOAuthParams | null;
|
|
1652
|
+
/**
|
|
1653
|
+
* Was the PKCE challenge generated?
|
|
1654
|
+
*/
|
|
1655
|
+
pkceGenerated: boolean;
|
|
1656
|
+
/**
|
|
1657
|
+
* When the code of the core login arrived
|
|
1658
|
+
*/
|
|
1659
|
+
coreAuthCodeReceivedAt: string | null;
|
|
1660
|
+
coreAccessToken: ConnectionTokenSummary | null;
|
|
1661
|
+
dataCloudAccessToken: ConnectionTokenSummary | null;
|
|
1662
|
+
}
|
|
1663
|
+
|
|
1664
|
+
/**
|
|
1665
|
+
* An error with a message and optional details
|
|
1666
|
+
*/
|
|
1667
|
+
export interface ConnectionError {
|
|
1668
|
+
message: string;
|
|
1669
|
+
data?: Record<string, string>;
|
|
1670
|
+
}
|
|
1671
|
+
|
|
1672
|
+
/**
|
|
1673
|
+
* A question about a connection of an imported workbook: connections of the app may describe the same database
|
|
1674
|
+
*/
|
|
1675
|
+
export interface ImportQuestion {
|
|
1676
|
+
/**
|
|
1677
|
+
* The id of the connection in the workbook
|
|
1678
|
+
*/
|
|
1679
|
+
connectionId: string;
|
|
1680
|
+
/**
|
|
1681
|
+
* The params in the workbook, shared workbooks carry them without secrets
|
|
1682
|
+
*/
|
|
1683
|
+
params: JsonValue;
|
|
1684
|
+
/**
|
|
1685
|
+
* The name the connection had in the exporting app
|
|
1686
|
+
*/
|
|
1687
|
+
name: string | null;
|
|
1688
|
+
/**
|
|
1689
|
+
* The connections of the app that describe the same database, the first is the default
|
|
1690
|
+
*/
|
|
1691
|
+
candidates: ImportCandidate[];
|
|
1692
|
+
}
|
|
1693
|
+
|
|
1694
|
+
/**
|
|
1695
|
+
* What an import does with a registered workbook of the same id
|
|
1696
|
+
*/
|
|
1697
|
+
export type ImportConflictChoice = "replace" | "create-new";
|
|
1698
|
+
|
|
1699
|
+
/**
|
|
1700
|
+
* The cached query results that an imported workbook carries
|
|
1701
|
+
*/
|
|
1702
|
+
export interface ImportResultFiles {
|
|
1703
|
+
count: number;
|
|
1704
|
+
bytes: number;
|
|
1705
|
+
}
|
|
1706
|
+
|
|
1707
|
+
/**
|
|
1708
|
+
* A connection of the app that an imported connection may use
|
|
1709
|
+
*/
|
|
1710
|
+
export interface ImportCandidate {
|
|
1711
|
+
id: string;
|
|
1712
|
+
params: JsonValue;
|
|
1713
|
+
name: string | null;
|
|
1714
|
+
}
|
|
1715
|
+
|
|
1716
|
+
/**
|
|
1717
|
+
* What the user chose for a connection that may use an existing one
|
|
1718
|
+
*/
|
|
1719
|
+
export type ImportChoice = { kind: "link"; connectionId: string } | { kind: "separate" };
|
|
1720
|
+
|
|
1721
|
+
/**
|
|
1722
|
+
* The answers of an import
|
|
1723
|
+
*/
|
|
1724
|
+
export interface ImportAnswers {
|
|
1725
|
+
/**
|
|
1726
|
+
* The choices of the questions by the id of the imported connection, an unanswered question keeps its connection
|
|
1727
|
+
* separate
|
|
1728
|
+
*/
|
|
1729
|
+
connections?: Record<string, ImportChoice>;
|
|
1730
|
+
/**
|
|
1731
|
+
* Answer every question with its first candidate, e.g. a preview of a published workbook
|
|
1732
|
+
*/
|
|
1733
|
+
preview?: boolean;
|
|
1734
|
+
/**
|
|
1735
|
+
* What to do with a registered workbook of the same id, an import fails on one without
|
|
1736
|
+
*/
|
|
1737
|
+
conflict?: ImportConflictChoice;
|
|
1738
|
+
/**
|
|
1739
|
+
* The id of the written workbook, the id of the source if absent
|
|
1740
|
+
*/
|
|
1741
|
+
workbookId?: string;
|
|
1742
|
+
/**
|
|
1743
|
+
* The metadata of the written workbook, the metadata of the source if absent
|
|
1744
|
+
*/
|
|
1745
|
+
metadata?: unknown;
|
|
1746
|
+
/**
|
|
1747
|
+
* Add the cached query results to the cache, true if absent. A link never does.
|
|
1748
|
+
*/
|
|
1749
|
+
results?: boolean;
|
|
1750
|
+
/**
|
|
1751
|
+
* Restore a written copy into the runtime, true if absent. Without, the caller reloads the app.
|
|
1752
|
+
*/
|
|
1753
|
+
restore?: boolean;
|
|
1754
|
+
}
|
|
1755
|
+
|
|
1756
|
+
/**
|
|
1757
|
+
* The workbook with the same id that the storage registered
|
|
1758
|
+
*/
|
|
1759
|
+
export interface ImportConflict {
|
|
1760
|
+
/**
|
|
1761
|
+
* The id of the registered workbook, as the registry spells it
|
|
1762
|
+
*/
|
|
1763
|
+
workbookId: string;
|
|
1764
|
+
/**
|
|
1765
|
+
* The entry of the workbook tree, `{ path, storageType, nativePath }`
|
|
1766
|
+
*/
|
|
1767
|
+
entry: JsonValue;
|
|
1768
|
+
}
|
|
1769
|
+
|
|
1770
|
+
/**
|
|
1771
|
+
* What an import wrote
|
|
1772
|
+
*/
|
|
1773
|
+
export interface ImportOutcome {
|
|
1774
|
+
/**
|
|
1775
|
+
* The id of the written workbook
|
|
1776
|
+
*/
|
|
1777
|
+
workbookId: string;
|
|
1778
|
+
/**
|
|
1779
|
+
* The outcome of the query results, null for a workbook without results
|
|
1780
|
+
*/
|
|
1781
|
+
results: ImportedResults | null;
|
|
1782
|
+
/**
|
|
1783
|
+
* The connections that the import registered, the app didn't have them
|
|
1784
|
+
*/
|
|
1785
|
+
registered: string[];
|
|
1786
|
+
/**
|
|
1787
|
+
* Did a connection use an existing one that the user would have been asked about?
|
|
1788
|
+
*/
|
|
1789
|
+
unasked: boolean;
|
|
1790
|
+
/**
|
|
1791
|
+
* Was the workbook restored into the runtime? A replacement or a native folder is not, the app reloads.
|
|
1792
|
+
*/
|
|
1793
|
+
restored: boolean;
|
|
1794
|
+
}
|
|
1795
|
+
|
|
1796
|
+
/**
|
|
1797
|
+
* The outcome of the import of the query results of a workbook
|
|
1798
|
+
*/
|
|
1799
|
+
export interface ImportedResults {
|
|
1800
|
+
/**
|
|
1801
|
+
* The results of the workbook
|
|
1802
|
+
*/
|
|
1803
|
+
total: number;
|
|
1804
|
+
/**
|
|
1805
|
+
* The results that became files of the cache
|
|
1806
|
+
*/
|
|
1807
|
+
added: number;
|
|
1808
|
+
/**
|
|
1809
|
+
* The results whose keys were cached already, the results of the app win
|
|
1810
|
+
*/
|
|
1811
|
+
kept: number;
|
|
1812
|
+
/**
|
|
1813
|
+
* The results that couldn't be added
|
|
1814
|
+
*/
|
|
1815
|
+
failed: number;
|
|
1816
|
+
/**
|
|
1817
|
+
* The results left out because the workbook holds more than the cache keeps
|
|
1818
|
+
*/
|
|
1819
|
+
dropped: number;
|
|
1820
|
+
/**
|
|
1821
|
+
* The bytes of the results that were added
|
|
1822
|
+
*/
|
|
1823
|
+
bytes: number;
|
|
1824
|
+
/**
|
|
1825
|
+
* Why the first result that failed couldn't be added, or why none was
|
|
1826
|
+
*/
|
|
1827
|
+
error: string | null;
|
|
1828
|
+
}
|
|
1829
|
+
|
|
1830
|
+
/**
|
|
1831
|
+
* What an import read, before anything is written
|
|
1832
|
+
*/
|
|
1833
|
+
export interface ImportPreview {
|
|
1834
|
+
/**
|
|
1835
|
+
* The pending import, `commitImport` and `dropImport` name it
|
|
1836
|
+
*/
|
|
1837
|
+
importId: number;
|
|
1838
|
+
/**
|
|
1839
|
+
* The workbook file, migrated and with the file lists of its files
|
|
1840
|
+
*/
|
|
1841
|
+
workbook: JsonValue;
|
|
1842
|
+
/**
|
|
1843
|
+
* The script files
|
|
1844
|
+
*/
|
|
1845
|
+
scriptCount: number;
|
|
1846
|
+
/**
|
|
1847
|
+
* The attachments
|
|
1848
|
+
*/
|
|
1849
|
+
attachmentCount: number;
|
|
1850
|
+
/**
|
|
1851
|
+
* The cached query results
|
|
1852
|
+
*/
|
|
1853
|
+
results: ImportResultFiles;
|
|
1854
|
+
/**
|
|
1855
|
+
* The registered workbook with the same id, null if there is none
|
|
1856
|
+
*/
|
|
1857
|
+
conflict: ImportConflict | null;
|
|
1858
|
+
/**
|
|
1859
|
+
* The connections that the user decides on
|
|
1860
|
+
*/
|
|
1861
|
+
questions: ImportQuestion[];
|
|
1862
|
+
/**
|
|
1863
|
+
* The catalog files that didn't parse and were left out
|
|
1864
|
+
*/
|
|
1865
|
+
invalidCatalogs: string[];
|
|
1866
|
+
/**
|
|
1867
|
+
* False when unusable entries were removed from the file lists of the workbook file
|
|
1868
|
+
*/
|
|
1869
|
+
filesValid: boolean;
|
|
1870
|
+
/**
|
|
1871
|
+
* The folder of a native workbook that is registered in place, null for a copy
|
|
1872
|
+
*/
|
|
1873
|
+
nativePath: string | null;
|
|
1874
|
+
}
|
|
1875
|
+
|
|
1876
|
+
|
|
1877
|
+
/** What hears a run of a workbook */
|
|
1878
|
+
export interface RunListener {
|
|
1879
|
+
/** Something happened to a script of the run, a failure comes with what the platform failed with */
|
|
1880
|
+
script?(file: string, event: WorkbookScriptRunEvent, error: unknown): void;
|
|
1881
|
+
/** Set up a connection that statements run on before the first statement, e.g. with the credentials of the command line tool. The scripts of a connection whose setup rejects are skipped. A run with it takes every connection of the workbook. */
|
|
1882
|
+
prepareConnection?(connectionId: string): Promise<void>;
|
|
1883
|
+
}
|
|
1884
|
+
|
|
1885
|
+
|
|
1886
|
+
/**
|
|
1887
|
+
* The error of a failed or cancelled query
|
|
1888
|
+
*/
|
|
1889
|
+
export interface QueryErrorView {
|
|
1890
|
+
message: string;
|
|
1891
|
+
details: string | null;
|
|
1892
|
+
}
|
|
1893
|
+
|
|
1894
|
+
/**
|
|
1895
|
+
* A query, the slice `query` of the runtime: its text, what it is, its status and its latest progress. The field names
|
|
1896
|
+
* are the ones the app reads. The result table is a table of the handle table of the platform.
|
|
1897
|
+
*/
|
|
1898
|
+
export interface QueryView {
|
|
1899
|
+
queryId: number;
|
|
1900
|
+
/**
|
|
1901
|
+
* The connection of the query
|
|
1902
|
+
*/
|
|
1903
|
+
connectionId: string;
|
|
1904
|
+
/**
|
|
1905
|
+
* The trace of the log messages of the query
|
|
1906
|
+
*/
|
|
1907
|
+
traceId: number;
|
|
1908
|
+
queryText: string;
|
|
1909
|
+
queryMetadata: QueryMetadataView;
|
|
1910
|
+
status: QueryExecutionStatus;
|
|
1911
|
+
metrics: QueryMetricsView;
|
|
1912
|
+
error: QueryErrorView | null;
|
|
1913
|
+
resultTable: QueryResultTableView | null;
|
|
1914
|
+
cacheKey: string | null;
|
|
1915
|
+
servedFromCache: boolean;
|
|
1916
|
+
cacheDeleted: boolean;
|
|
1917
|
+
cachedAt: number | null;
|
|
1918
|
+
latestProgressUpdate: QueryLatestProgressView | null;
|
|
1919
|
+
revision: number;
|
|
1920
|
+
/**
|
|
1921
|
+
* The handle of the record of the query at the host
|
|
1922
|
+
*/
|
|
1923
|
+
handle: number | null;
|
|
1924
|
+
}
|
|
1925
|
+
|
|
1926
|
+
/**
|
|
1927
|
+
* A progress update of a channel of the host: the plain fields and the raw progress payload of the engine, e.g.
|
|
1928
|
+
* `{ kind: 'hyper_query_status', status, receivedAt }`. The progress model of the query in the executor turns the
|
|
1929
|
+
* payload into the structured progress.
|
|
1930
|
+
*/
|
|
1931
|
+
export interface QueryProgressView {
|
|
1932
|
+
isQueued: boolean | null;
|
|
1933
|
+
progressPercent: number | null;
|
|
1934
|
+
resultRows: number | null;
|
|
1935
|
+
rowsProcessed: number | null;
|
|
1936
|
+
executionTimeMs: number | null;
|
|
1937
|
+
/**
|
|
1938
|
+
* The metrics of the response stream, none counts nothing
|
|
1939
|
+
*/
|
|
1940
|
+
metrics?: QueryStreamMetrics | null;
|
|
1941
|
+
phase?: string | null;
|
|
1942
|
+
/**
|
|
1943
|
+
* The raw progress payload of the engine, a payload of an unknown kind is dropped
|
|
1944
|
+
*/
|
|
1945
|
+
engineProgress?: unknown;
|
|
1946
|
+
}
|
|
1947
|
+
|
|
1948
|
+
/**
|
|
1949
|
+
* What a query is and who issued it. A planned statement of a run of a workbook is opaque JSON
|
|
1950
|
+
* (`PlannedStatement` of the app).
|
|
1951
|
+
*/
|
|
1952
|
+
export interface QueryMetadataView {
|
|
1953
|
+
queryType: QueryType;
|
|
1954
|
+
title: string | null;
|
|
1955
|
+
description: string | null;
|
|
1956
|
+
issuer: string | null;
|
|
1957
|
+
userProvided: boolean;
|
|
1958
|
+
workbookId?: string;
|
|
1959
|
+
resultOwner?: string;
|
|
1960
|
+
planned?: unknown;
|
|
1961
|
+
}
|
|
1962
|
+
|
|
1963
|
+
/**
|
|
1964
|
+
* The metrics of the finished queries of a history, internal queries don't count
|
|
1965
|
+
*/
|
|
1966
|
+
export interface QueryHistoryMetrics {
|
|
1967
|
+
successfulQueries: QueryOutcomeMetrics;
|
|
1968
|
+
canceledQueries: QueryOutcomeMetrics;
|
|
1969
|
+
failedQueries: QueryOutcomeMetrics;
|
|
1970
|
+
}
|
|
1971
|
+
|
|
1972
|
+
/**
|
|
1973
|
+
* The metrics of the finished queries of one outcome
|
|
1974
|
+
*/
|
|
1975
|
+
export interface QueryOutcomeMetrics {
|
|
1976
|
+
totalQueries: number;
|
|
1977
|
+
totalBatchesReceived: number;
|
|
1978
|
+
totalRowsReceived: number;
|
|
1979
|
+
accumulatedTimeUntilFirstBatch: number;
|
|
1980
|
+
accumulatedQueryDuration: number;
|
|
1981
|
+
}
|
|
1982
|
+
|
|
1983
|
+
/**
|
|
1984
|
+
* The keys of the structured progress of a query that the host holds, their payloads don't cross again
|
|
1985
|
+
*/
|
|
1986
|
+
export interface QueryProfileKeys {
|
|
1987
|
+
/**
|
|
1988
|
+
* The revision of the progress, the execution state crosses when it differs
|
|
1989
|
+
*/
|
|
1990
|
+
revision: number | null;
|
|
1991
|
+
/**
|
|
1992
|
+
* The version of the structure, the structure crosses when it differs
|
|
1993
|
+
*/
|
|
1994
|
+
structureVersion: number | null;
|
|
1995
|
+
}
|
|
1996
|
+
|
|
1997
|
+
/**
|
|
1998
|
+
* The structured progress of a query: the plan with its stages and their execution state. A payload is null when the
|
|
1999
|
+
* host holds it already, its key names it.
|
|
2000
|
+
*/
|
|
2001
|
+
export interface QueryProfileProgressView {
|
|
2002
|
+
/**
|
|
2003
|
+
* The revision of the progress, it changes with the structure or the execution state
|
|
2004
|
+
*/
|
|
2005
|
+
revision: number;
|
|
2006
|
+
/**
|
|
2007
|
+
* The version of the structure
|
|
2008
|
+
*/
|
|
2009
|
+
structureVersion: number;
|
|
2010
|
+
/**
|
|
2011
|
+
* The packed `QueryProfile`, null while the host holds its version
|
|
2012
|
+
*/
|
|
2013
|
+
structure: FlatBuffer<buffers_profile.QueryProfile> | null;
|
|
2014
|
+
/**
|
|
2015
|
+
* The execution state as packed `QueryProfileEvents`, one event per entity with state, null while the host holds
|
|
2016
|
+
* the revision
|
|
2017
|
+
*/
|
|
2018
|
+
execution: FlatBuffer<buffers_profile.QueryProfileEvents> | null;
|
|
2019
|
+
}
|
|
2020
|
+
|
|
2021
|
+
/**
|
|
2022
|
+
* The result table of a query, the host keeps it under its handle
|
|
2023
|
+
*/
|
|
2024
|
+
export interface QueryResultTableView {
|
|
2025
|
+
id: number;
|
|
2026
|
+
rows: number;
|
|
2027
|
+
}
|
|
2028
|
+
|
|
2029
|
+
/**
|
|
2030
|
+
* The metrics of the response stream of a query, as the connector counts them
|
|
2031
|
+
*/
|
|
2032
|
+
export interface QueryStreamMetrics {
|
|
2033
|
+
totalDataBytesReceived: number;
|
|
2034
|
+
totalBatchesReceived: number;
|
|
2035
|
+
totalRowsReceived: number;
|
|
2036
|
+
totalQueryRequestsStarted: number;
|
|
2037
|
+
totalQueryRequestsSucceeded: number;
|
|
2038
|
+
totalQueryRequestsFailed: number;
|
|
2039
|
+
totalQueryRequestDurationMs: number;
|
|
2040
|
+
durationUntilFirstBatchMs: number | null;
|
|
2041
|
+
}
|
|
2042
|
+
|
|
2043
|
+
/**
|
|
2044
|
+
* The latest progress update of a query: the plain fields and the structured progress
|
|
2045
|
+
*/
|
|
2046
|
+
export interface QueryLatestProgressView {
|
|
2047
|
+
isQueued: boolean | null;
|
|
2048
|
+
progressPercent: number | null;
|
|
2049
|
+
resultRows: number | null;
|
|
2050
|
+
rowsProcessed: number | null;
|
|
2051
|
+
executionTimeMs: number | null;
|
|
2052
|
+
metrics: QueryStreamMetrics;
|
|
2053
|
+
phase: string | null;
|
|
2054
|
+
profile: QueryProfileProgressView | null;
|
|
2055
|
+
}
|
|
2056
|
+
|
|
2057
|
+
/**
|
|
2058
|
+
* The layout of the plans of query profiles, the fields of `ProfileLayoutConfigT` of the generated FlatBuffer code
|
|
2059
|
+
*/
|
|
2060
|
+
export interface ProfileLayoutView {
|
|
2061
|
+
levelHeight: number;
|
|
2062
|
+
nodeHeight: number;
|
|
2063
|
+
nodeMarginHorizontal: number;
|
|
2064
|
+
nodePaddingLeft: number;
|
|
2065
|
+
nodePaddingRight: number;
|
|
2066
|
+
iconWidth: number;
|
|
2067
|
+
iconMarginRight: number;
|
|
2068
|
+
maxLabelChars: number;
|
|
2069
|
+
widthPerLabelChar: number;
|
|
2070
|
+
nodeMinWidth: number;
|
|
2071
|
+
nodeMarginVertical: number;
|
|
2072
|
+
/**
|
|
2073
|
+
* A `ProfileLayoutOrientation`
|
|
2074
|
+
*/
|
|
2075
|
+
orientation: number;
|
|
2076
|
+
symbolWidth: number;
|
|
2077
|
+
}
|
|
2078
|
+
|
|
2079
|
+
/**
|
|
2080
|
+
* The points in time of a query in milliseconds since epoch and its counters
|
|
2081
|
+
*/
|
|
2082
|
+
export interface QueryMetricsView {
|
|
2083
|
+
queryRequestedAt: number | null;
|
|
2084
|
+
querySendingStartedAt: number | null;
|
|
2085
|
+
queryQueuedStartedAt: number | null;
|
|
2086
|
+
queryRunningStartedAt: number | null;
|
|
2087
|
+
receivedFirstBatchAt: number | null;
|
|
2088
|
+
receivedLastBatchAt: number | null;
|
|
2089
|
+
receivedAllBatchesAt: number | null;
|
|
2090
|
+
processingResultsStartedAt: number | null;
|
|
2091
|
+
processedResultsAt: number | null;
|
|
2092
|
+
querySucceededAt: number | null;
|
|
2093
|
+
queryFailedAt: number | null;
|
|
2094
|
+
queryCancelledAt: number | null;
|
|
2095
|
+
lastUpdatedAt: number | null;
|
|
2096
|
+
progressUpdatesReceived: number;
|
|
2097
|
+
queryDurationMs: number | null;
|
|
2098
|
+
textLength: number | null;
|
|
2099
|
+
streamMetrics: QueryStreamMetrics;
|
|
2100
|
+
}
|
|
2101
|
+
|
|
2102
|
+
|
|
2103
|
+
import type * as buffers_editor from '../gen/flatbuffers/dashql/buffers/editor.js';
|
|
2104
|
+
import type * as buffers_diff from '../gen/flatbuffers/dashql/buffers/diff.js';
|
|
2105
|
+
import type * as buffers_execution from '../gen/flatbuffers/dashql/buffers/execution.js';
|
|
2106
|
+
import type * as buffers_profile from '../gen/flatbuffers/dashql/buffers/profile.js';
|
|
2107
|
+
/** The bytes of a packed FlatBuffer whose root table is `T`, read with the generated accessors */
|
|
2108
|
+
export type FlatBuffer<T> = Uint8Array & { readonly __flatbufferRoot?: T };
|
|
2109
|
+
|
|
2110
|
+
|
|
2111
|
+
/**
|
|
2112
|
+
* Opaque JSON in a view: a workbook file, a connection entry, the params of a connection. It crosses as a plain JS
|
|
2113
|
+
* value and is read the way `JSON.stringify` reads it: members that are undefined or functions are left out, `toJSON`
|
|
2114
|
+
* is called, numbers that are not finite are null.
|
|
2115
|
+
*/
|
|
2116
|
+
export type JsonValue = unknown;
|
|
2117
|
+
|
|
2118
|
+
/**
|
|
2119
|
+
* The rows that a data search matched with their matching columns, the table by its handle
|
|
2120
|
+
*/
|
|
2121
|
+
export interface ComputationDataSearchTable {
|
|
2122
|
+
dataTable: number;
|
|
2123
|
+
rows: number;
|
|
2124
|
+
dataFrame: number;
|
|
2125
|
+
inputRowNumberColumnName: string;
|
|
2126
|
+
version: ComputationVersionValue;
|
|
2127
|
+
requestId: number;
|
|
2128
|
+
}
|
|
2129
|
+
|
|
2130
|
+
/**
|
|
2131
|
+
* A key of an ordering, ascending and nulls last without
|
|
2132
|
+
*/
|
|
2133
|
+
export interface ComputationOrderBy {
|
|
2134
|
+
field: string;
|
|
2135
|
+
ascending?: boolean;
|
|
2136
|
+
nullsFirst?: boolean;
|
|
2137
|
+
}
|
|
2138
|
+
|
|
2139
|
+
/**
|
|
2140
|
+
* The version of a computation: the data changes with a new data frame, the filter with every scheduled filtering
|
|
2141
|
+
*/
|
|
2142
|
+
export interface ComputationVersionValue {
|
|
2143
|
+
data: number;
|
|
2144
|
+
filter: number;
|
|
2145
|
+
}
|
|
2146
|
+
|
|
2147
|
+
/**
|
|
2148
|
+
* The context of a call of the compute platform: the computation, the title of its task in the query history, the
|
|
2149
|
+
* connection and the client context of the computation, and the run that `cancel` aborts
|
|
2150
|
+
*/
|
|
2151
|
+
export interface ComputeCallContext {
|
|
2152
|
+
tableId: number;
|
|
2153
|
+
title: string;
|
|
2154
|
+
connectionId: string | null;
|
|
2155
|
+
/**
|
|
2156
|
+
* The client context of the queries of a computation without a connection, opaque JSON
|
|
2157
|
+
*/
|
|
2158
|
+
clientContext: string | null;
|
|
2159
|
+
run: number;
|
|
2160
|
+
}
|
|
2161
|
+
|
|
2162
|
+
/**
|
|
2163
|
+
* The selection in the summary of a column group
|
|
2164
|
+
*/
|
|
2165
|
+
export type ComputationCrossFilter = { kind: "histogram"; column: number; selection: [number, number] } | { kind: "mostFrequent"; column: number; valueId: number };
|
|
2166
|
+
|
|
2167
|
+
/**
|
|
2168
|
+
* A column of the grid of a result
|
|
2169
|
+
*/
|
|
2170
|
+
export type ComputationColumnGroup = { type: "ROWNUMBER"; value: { rowNumberFieldName: string } } | { type: "SKIPPED"; value: { inputFieldName: string; inputFieldType: string; inputFieldNullable: boolean } } | { type: "ORDINAL"; value: ComputationValueColumn } | { type: "STRING"; value: ComputationValueColumn } | { type: "LIST"; value: ComputationValueColumn };
|
|
2171
|
+
|
|
2172
|
+
/**
|
|
2173
|
+
* The fields of the table aggregation with the statistics of a column
|
|
2174
|
+
*/
|
|
2175
|
+
export interface ComputationStatsFields {
|
|
2176
|
+
countFieldName: string;
|
|
2177
|
+
distinctCountFieldName: string | null;
|
|
2178
|
+
minAggregateFieldName: string | null;
|
|
2179
|
+
maxAggregateFieldName: string | null;
|
|
2180
|
+
}
|
|
2181
|
+
|
|
2182
|
+
/**
|
|
2183
|
+
* The table and the data frame of a summary
|
|
2184
|
+
*/
|
|
2185
|
+
export interface ComputationColumnSummary {
|
|
2186
|
+
table: number;
|
|
2187
|
+
dataFrame: number;
|
|
2188
|
+
analysis: ComputationSummaryAnalysis | null;
|
|
2189
|
+
}
|
|
2190
|
+
|
|
2191
|
+
/**
|
|
2192
|
+
* The rows that pass the filters, the table by its handle
|
|
2193
|
+
*/
|
|
2194
|
+
export interface ComputationFilterTable {
|
|
2195
|
+
dataTable: number;
|
|
2196
|
+
rows: number;
|
|
2197
|
+
dataFrame: number;
|
|
2198
|
+
inputRowNumberColumnName: string;
|
|
2199
|
+
version: ComputationVersionValue;
|
|
2200
|
+
}
|
|
2201
|
+
|
|
2202
|
+
/**
|
|
2203
|
+
* The tasks that a computation tracks
|
|
2204
|
+
*/
|
|
2205
|
+
export interface ComputationTasks {
|
|
2206
|
+
tableAggregationTask: ComputationTrackedTask | null;
|
|
2207
|
+
systemColumnTask: ComputationTrackedTask | null;
|
|
2208
|
+
filteringTask: ComputationTrackedTask | null;
|
|
2209
|
+
orderingTask: ComputationTrackedTask | null;
|
|
2210
|
+
dataSearchTask: ComputationTrackedTask | null;
|
|
2211
|
+
columnAggregationTasks: (ComputationTrackedTask | null)[];
|
|
2212
|
+
filteredColumnAggregationTasks: (ComputationTrackedTask | null)[];
|
|
2213
|
+
}
|
|
2214
|
+
|
|
2215
|
+
/**
|
|
2216
|
+
* What is searched, the columns by their names or the data
|
|
2217
|
+
*/
|
|
2218
|
+
export type ComputationSearchKind = "columns" | "data";
|
|
2219
|
+
|
|
2220
|
+
/**
|
|
2221
|
+
* The summary of a column over the rows that the filters and the data search select
|
|
2222
|
+
*/
|
|
2223
|
+
export interface ComputationFilteredAggregate {
|
|
2224
|
+
aggregate: ComputationColumnAggregate;
|
|
2225
|
+
filterVersion: ComputationVersionValue;
|
|
2226
|
+
dataSearchRequestId: number | null;
|
|
2227
|
+
}
|
|
2228
|
+
|
|
2229
|
+
/**
|
|
2230
|
+
* The summary of a column: the table of the binned or the frequent values by its handle, with its analysis
|
|
2231
|
+
*/
|
|
2232
|
+
export type ComputationColumnAggregate = ({ kind: "ordinal" } & ComputationColumnSummary) | ({ kind: "string" } & ComputationColumnSummary) | ({ kind: "list" } & ComputationColumnSummary) | { kind: "skipped" };
|
|
2233
|
+
|
|
2234
|
+
/**
|
|
2235
|
+
* What the lower bounds of the bins of a histogram are
|
|
2236
|
+
*/
|
|
2237
|
+
export type ComputationBinBounds = "numbers" | "epochMillis";
|
|
2238
|
+
|
|
2239
|
+
/**
|
|
2240
|
+
* The value column of a column group, ordinal, string or list
|
|
2241
|
+
*/
|
|
2242
|
+
export interface ComputationValueColumn {
|
|
2243
|
+
inputFieldName: string;
|
|
2244
|
+
/**
|
|
2245
|
+
* The type of the field as the runtime names it, the app reads the Arrow type from the schema of the table
|
|
2246
|
+
*/
|
|
2247
|
+
inputFieldType: string;
|
|
2248
|
+
inputFieldNullable: boolean;
|
|
2249
|
+
statsFields: ComputationStatsFields | null;
|
|
2250
|
+
/**
|
|
2251
|
+
* The bins of an ordinal column, null without
|
|
2252
|
+
*/
|
|
2253
|
+
binFieldName: string | null;
|
|
2254
|
+
/**
|
|
2255
|
+
* The number of bins of an ordinal column, 0 without
|
|
2256
|
+
*/
|
|
2257
|
+
binCount: number;
|
|
2258
|
+
/**
|
|
2259
|
+
* The value ids of a string or a list column, null without
|
|
2260
|
+
*/
|
|
2261
|
+
valueIdFieldName: string | null;
|
|
2262
|
+
}
|
|
2263
|
+
|
|
2264
|
+
/**
|
|
2265
|
+
* The numbers of the analysis of a summary that the runtime computed. The app formats the values of the tables: the
|
|
2266
|
+
* minimum and the maximum of the statistics, the lower bounds of the bins and the frequent values.
|
|
2267
|
+
*/
|
|
2268
|
+
export type ComputationSummaryAnalysis = { kind: "ordinal"; totalCount: number; countNotNull: number; countNull: number; binCount: number; binValueCounts: number[]; binPercentages: number[]; binLowerBounds: (number | null)[]; binBounds: ComputationBinBounds } | { kind: "string"; totalCount: number; countNotNull: number; countNull: number; countDistinct: number; isUnique: boolean; frequentValueIds: number[]; frequentValueCounts: number[]; frequentValuePercentages: number[] };
|
|
2269
|
+
|
|
2270
|
+
/**
|
|
2271
|
+
* The view of the computation of a result table. The tables are handles of the platform, the data frames ids of
|
|
2272
|
+
* the compute database.
|
|
2273
|
+
*/
|
|
2274
|
+
export interface ComputationView {
|
|
2275
|
+
tableId: number;
|
|
2276
|
+
revision: number;
|
|
2277
|
+
connectionId: string | null;
|
|
2278
|
+
/**
|
|
2279
|
+
* The client context of the queries of a computation without a connection, opaque JSON
|
|
2280
|
+
*/
|
|
2281
|
+
clientContext: string | null;
|
|
2282
|
+
tasks: ComputationTasks;
|
|
2283
|
+
version: ComputationVersionValue;
|
|
2284
|
+
/**
|
|
2285
|
+
* The table, with the system columns once they are computed
|
|
2286
|
+
*/
|
|
2287
|
+
dataTable: number;
|
|
2288
|
+
dataTableRows: number;
|
|
2289
|
+
/**
|
|
2290
|
+
* The fields of the table that the computation was created with, in order
|
|
2291
|
+
*/
|
|
2292
|
+
dataTableFields: string[];
|
|
2293
|
+
dataFrame: number | null;
|
|
2294
|
+
/**
|
|
2295
|
+
* The column groups of the grid
|
|
2296
|
+
*/
|
|
2297
|
+
columnGroups: ComputationColumnGroup[];
|
|
2298
|
+
dataTableOrdering: ComputationOrderBy[];
|
|
2299
|
+
/**
|
|
2300
|
+
* The selections in the summaries of the column groups, in the order of the column groups
|
|
2301
|
+
*/
|
|
2302
|
+
crossFilters: ComputationCrossFilter[];
|
|
2303
|
+
filterTable: ComputationFilterTable | null;
|
|
2304
|
+
orderingTable: ComputationOrderingTable | null;
|
|
2305
|
+
columnSearch: ComputationSearch;
|
|
2306
|
+
dataSearch: ComputationSearch;
|
|
2307
|
+
dataSearchTable: ComputationDataSearchTable | null;
|
|
2308
|
+
rowNumberColumnGroup: number | null;
|
|
2309
|
+
rowNumberColumnName: string | null;
|
|
2310
|
+
tableAggregation: ComputationTableAggregation | null;
|
|
2311
|
+
columnAggregates: (ComputationColumnAggregate | null)[];
|
|
2312
|
+
filteredColumnAggregates: (ComputationFilteredAggregate | null)[];
|
|
2313
|
+
filteredColumnAggregatesOutdated: boolean[];
|
|
2314
|
+
}
|
|
2315
|
+
|
|
2316
|
+
/**
|
|
2317
|
+
* The comparison of a scalar filter
|
|
2318
|
+
*/
|
|
2319
|
+
export type ComputationFilterOp = "=" | "<" | "<=" | ">" | ">=";
|
|
2320
|
+
|
|
2321
|
+
/**
|
|
2322
|
+
* A task that a computation tracks, the latest of its kind
|
|
2323
|
+
*/
|
|
2324
|
+
export interface ComputationTrackedTask {
|
|
2325
|
+
/**
|
|
2326
|
+
* The task of the scheduler
|
|
2327
|
+
*/
|
|
2328
|
+
taskId: number;
|
|
2329
|
+
/**
|
|
2330
|
+
* The version that the task computes for
|
|
2331
|
+
*/
|
|
2332
|
+
tableVersion: ComputationVersionValue;
|
|
2333
|
+
/**
|
|
2334
|
+
* The filters of a filtering
|
|
2335
|
+
*/
|
|
2336
|
+
filters?: ComputationScalarFilter[];
|
|
2337
|
+
/**
|
|
2338
|
+
* The ordering of an ordering, cleared with the ordering of the table
|
|
2339
|
+
*/
|
|
2340
|
+
orderingConstraints?: ComputationOrderBy[];
|
|
2341
|
+
progress: ComputationTaskProgress;
|
|
2342
|
+
}
|
|
2343
|
+
|
|
2344
|
+
/**
|
|
2345
|
+
* A filter that compares a field with a number
|
|
2346
|
+
*/
|
|
2347
|
+
export interface ComputationScalarFilter {
|
|
2348
|
+
fieldName: string;
|
|
2349
|
+
op: ComputationFilterOp;
|
|
2350
|
+
value: number;
|
|
2351
|
+
}
|
|
2352
|
+
|
|
2353
|
+
/**
|
|
2354
|
+
* The statistics of all columns of a table, the table by its handle
|
|
2355
|
+
*/
|
|
2356
|
+
export interface ComputationTableAggregation {
|
|
2357
|
+
table: number;
|
|
2358
|
+
dataFrame: number;
|
|
2359
|
+
countStarFieldName: string;
|
|
2360
|
+
}
|
|
2361
|
+
|
|
2362
|
+
/**
|
|
2363
|
+
* The options of the analysis of a result
|
|
2364
|
+
*/
|
|
2365
|
+
export interface AnalyzeTableOptions {
|
|
2366
|
+
/**
|
|
2367
|
+
* The connection that ran the query of the result, its query history lists the queries of the computation
|
|
2368
|
+
*/
|
|
2369
|
+
connectionId?: string;
|
|
2370
|
+
/**
|
|
2371
|
+
* The client context of the queries of a computation without a connection, opaque JSON
|
|
2372
|
+
*/
|
|
2373
|
+
clientContext?: string;
|
|
2374
|
+
/**
|
|
2375
|
+
* Compute the summaries of the columns, true without
|
|
2376
|
+
*/
|
|
2377
|
+
columnAggregates?: boolean;
|
|
2378
|
+
/**
|
|
2379
|
+
* Order the rows before the analysis settles, e.g. like a result that the result replaces. An ordering of fields
|
|
2380
|
+
* that the result doesn't have is skipped.
|
|
2381
|
+
*/
|
|
2382
|
+
ordering?: ComputationOrderBy[];
|
|
2383
|
+
}
|
|
2384
|
+
|
|
2385
|
+
/**
|
|
2386
|
+
* The progress of a task, times in milliseconds since epoch
|
|
2387
|
+
*/
|
|
2388
|
+
export interface ComputationTaskProgress {
|
|
2389
|
+
status: TaskStatus;
|
|
2390
|
+
startedAt: number;
|
|
2391
|
+
completedAt: number | null;
|
|
2392
|
+
failedAt: number | null;
|
|
2393
|
+
failedWithError: string | null;
|
|
2394
|
+
}
|
|
2395
|
+
|
|
2396
|
+
/**
|
|
2397
|
+
* The search of a result, of its columns or of its data
|
|
2398
|
+
*/
|
|
2399
|
+
export interface ComputationSearch {
|
|
2400
|
+
requestedPattern: string;
|
|
2401
|
+
appliedPattern: string;
|
|
2402
|
+
requestId: number;
|
|
2403
|
+
appliedRequestId: number;
|
|
2404
|
+
matchingColumnGroups: number[] | null;
|
|
2405
|
+
/**
|
|
2406
|
+
* Does the search hold matching rows? They are the rows of the table of the data search.
|
|
2407
|
+
*/
|
|
2408
|
+
hasMatchingRows: boolean;
|
|
2409
|
+
pending: boolean;
|
|
2410
|
+
error: string | null;
|
|
2411
|
+
}
|
|
2412
|
+
|
|
2413
|
+
/**
|
|
2414
|
+
* The row numbers in the order of the grid, the table by its handle
|
|
2415
|
+
*/
|
|
2416
|
+
export interface ComputationOrderingTable {
|
|
2417
|
+
dataTable: number;
|
|
2418
|
+
rows: number;
|
|
2419
|
+
dataFrame: number;
|
|
2420
|
+
inputRowNumberColumnName: string;
|
|
2421
|
+
orderingConstraints: ComputationOrderBy[];
|
|
2422
|
+
version: ComputationVersionValue;
|
|
2423
|
+
dataSearchRequestId: number | null;
|
|
2424
|
+
}
|
|
2425
|
+
|
|
2426
|
+
/**
|
|
2427
|
+
* How a setup runs
|
|
2428
|
+
*/
|
|
2429
|
+
export interface SetupOptions {
|
|
2430
|
+
/**
|
|
2431
|
+
* The params of the setup, the params of the connection by default
|
|
2432
|
+
*/
|
|
2433
|
+
params?: JsonParams;
|
|
2434
|
+
/**
|
|
2435
|
+
* The params that the channel connects with when they differ from the ones that the connection keeps, e.g. the
|
|
2436
|
+
* credentials of the environment that are never written
|
|
2437
|
+
*/
|
|
2438
|
+
channelParams?: JsonParams;
|
|
2439
|
+
/**
|
|
2440
|
+
* Log in again instead of using a session of the browser
|
|
2441
|
+
*/
|
|
2442
|
+
forceRelogin?: boolean;
|
|
2443
|
+
/**
|
|
2444
|
+
* The redirect page of the app that an OAuth flow of Salesforce returns to
|
|
2445
|
+
*/
|
|
2446
|
+
oauthRedirect?: string;
|
|
2447
|
+
}
|
|
2448
|
+
|
|
2449
|
+
/**
|
|
2450
|
+
* The tokens and the user of a login
|
|
2451
|
+
*/
|
|
2452
|
+
export interface SetupAuthentication {
|
|
2453
|
+
tokens: { core: any; dataCloud: any };
|
|
2454
|
+
userInfo: any | null;
|
|
2455
|
+
}
|
|
2456
|
+
|
|
2457
|
+
/**
|
|
2458
|
+
* How a setup or a login ended
|
|
2459
|
+
*/
|
|
2460
|
+
export interface SetupOutcome {
|
|
2461
|
+
status: 'succeeded' | 'failed' | 'cancelled';
|
|
2462
|
+
/**
|
|
2463
|
+
* The error of a setup that didn't succeed
|
|
2464
|
+
*/
|
|
2465
|
+
message: string | null;
|
|
2466
|
+
/**
|
|
2467
|
+
* The details of the error, e.g. the status of a rejected request
|
|
2468
|
+
*/
|
|
2469
|
+
data: Record<string, string>;
|
|
2470
|
+
/**
|
|
2471
|
+
* The tokens of a login
|
|
2472
|
+
*/
|
|
2473
|
+
authentication: SetupAuthentication | null;
|
|
2474
|
+
}
|
|
2475
|
+
|
|
2476
|
+
/**
|
|
2477
|
+
* What the executor does around a query besides running its text
|
|
2478
|
+
*/
|
|
2479
|
+
export interface QueryOptions {
|
|
2480
|
+
/**
|
|
2481
|
+
* Analyze the result on the compute database, false by default
|
|
2482
|
+
*/
|
|
2483
|
+
analyzeResults?: boolean;
|
|
2484
|
+
/**
|
|
2485
|
+
* Collect the result, true by default. A statement whose output nothing reads drains it.
|
|
2486
|
+
*/
|
|
2487
|
+
publishResults?: boolean;
|
|
2488
|
+
/**
|
|
2489
|
+
* Reject with the error of a failed query instead of resolving
|
|
2490
|
+
*/
|
|
2491
|
+
throwOnError?: boolean;
|
|
2492
|
+
/**
|
|
2493
|
+
* A call of a client function that runs instead of the text, as the core describes it
|
|
2494
|
+
*/
|
|
2495
|
+
clientFunctionCall?: JsonValue;
|
|
2496
|
+
/**
|
|
2497
|
+
* The time to wait for the next batch of a channel of the host, the default of the channel without
|
|
2498
|
+
*/
|
|
2499
|
+
readTimeoutMs?: number;
|
|
2500
|
+
/**
|
|
2501
|
+
* The query result cache, none for a query that never reads or writes it
|
|
2502
|
+
*/
|
|
2503
|
+
cache?: QueryCacheOptions;
|
|
2504
|
+
}
|
|
2505
|
+
|
|
2506
|
+
/**
|
|
2507
|
+
* How a query uses the query result cache
|
|
2508
|
+
*/
|
|
2509
|
+
export interface QueryCacheOptions {
|
|
2510
|
+
/**
|
|
2511
|
+
* The semantic signature of the script that the key of the result derives from, with the params of the connection
|
|
2512
|
+
*/
|
|
2513
|
+
signature: string;
|
|
2514
|
+
/**
|
|
2515
|
+
* Run the query instead of serving a cached result, the result becomes the newest file of its key
|
|
2516
|
+
*/
|
|
2517
|
+
refresh?: boolean;
|
|
2518
|
+
/**
|
|
2519
|
+
* Serve the cached result or fail with a cache miss instead of running the query
|
|
2520
|
+
*/
|
|
2521
|
+
only?: boolean;
|
|
2522
|
+
}
|
|
2523
|
+
|
|
2524
|
+
/**
|
|
2525
|
+
* The failure of a query, `hostValue` tells whether `value` of the outcome is what the host failed with
|
|
2526
|
+
*/
|
|
2527
|
+
export interface QueryRunFailure {
|
|
2528
|
+
kind: QueryRunFailureKind;
|
|
2529
|
+
message: string;
|
|
2530
|
+
details: Record<string, string>;
|
|
2531
|
+
target: string;
|
|
2532
|
+
hostValue: boolean;
|
|
2533
|
+
}
|
|
2534
|
+
|
|
2535
|
+
/**
|
|
2536
|
+
* A query that runs: its id and its outcome
|
|
2537
|
+
*/
|
|
2538
|
+
export interface QueryTicket {
|
|
2539
|
+
queryId: number;
|
|
2540
|
+
done: Promise<QueryRunOutcome>;
|
|
2541
|
+
}
|
|
2542
|
+
|
|
2543
|
+
/**
|
|
2544
|
+
* A query that the runtime runs
|
|
2545
|
+
*/
|
|
2546
|
+
export interface QueryArgs {
|
|
2547
|
+
/**
|
|
2548
|
+
* The text of the query as the history shows it
|
|
2549
|
+
*/
|
|
2550
|
+
text: string;
|
|
2551
|
+
metadata: QueryMetadataView;
|
|
2552
|
+
/**
|
|
2553
|
+
* The trace and the span of the log messages of the query
|
|
2554
|
+
*/
|
|
2555
|
+
traceId: number;
|
|
2556
|
+
spanId?: number;
|
|
2557
|
+
/**
|
|
2558
|
+
* What the executor does around the query
|
|
2559
|
+
*/
|
|
2560
|
+
options?: QueryOptions;
|
|
2561
|
+
}
|
|
2562
|
+
|
|
2563
|
+
/**
|
|
2564
|
+
* The kind of the failure of a query
|
|
2565
|
+
*/
|
|
2566
|
+
export type QueryRunFailureKind = "error" | "cancelled" | "cacheMiss" | "processing";
|
|
2567
|
+
|
|
2568
|
+
/**
|
|
2569
|
+
* What the caller of a query hears while it runs: the timings and the result before its analysis
|
|
2570
|
+
*/
|
|
2571
|
+
export type QueryCallerEvent = { type: "timing"; label: string; elapsedMs: number } | { type: "resultsReady" };
|
|
2572
|
+
|
|
2573
|
+
/**
|
|
2574
|
+
* How a query ended for its caller: resolved with the result table, or rejected with the failure and what the host
|
|
2575
|
+
* failed with
|
|
2576
|
+
*/
|
|
2577
|
+
export type QueryRunOutcome = { status: "resolved"; hasResult: boolean; table: unknown } | { status: "rejected"; failure: QueryRunFailure; value: unknown };
|
|
2578
|
+
|
|
2579
|
+
/**
|
|
2580
|
+
* The type of a column of a workbook table
|
|
2581
|
+
*/
|
|
2582
|
+
export type WorkbookTableColumnType = "text" | "integer" | "boolean";
|
|
2583
|
+
|
|
2584
|
+
/**
|
|
2585
|
+
* What an export writes
|
|
2586
|
+
*/
|
|
2587
|
+
export type ExportFormat = "archive" | "link" | "tables";
|
|
2588
|
+
|
|
2589
|
+
/**
|
|
2590
|
+
* A column of a workbook table
|
|
2591
|
+
*/
|
|
2592
|
+
export interface WorkbookTableColumn {
|
|
2593
|
+
name: string;
|
|
2594
|
+
type: WorkbookTableColumnType;
|
|
2595
|
+
nullable: boolean;
|
|
2596
|
+
}
|
|
2597
|
+
|
|
2598
|
+
/**
|
|
2599
|
+
* A workbook table of the format with its columns
|
|
2600
|
+
*/
|
|
2601
|
+
export interface WorkbookTableSchema {
|
|
2602
|
+
name: string;
|
|
2603
|
+
columns: WorkbookTableColumn[];
|
|
2604
|
+
}
|
|
2605
|
+
|
|
2606
|
+
/**
|
|
2607
|
+
* The cached results of the scripts of a workbook
|
|
2608
|
+
*/
|
|
2609
|
+
export interface ExportedResults {
|
|
2610
|
+
/**
|
|
2611
|
+
* The scripts with a cached result
|
|
2612
|
+
*/
|
|
2613
|
+
cachedScripts: number;
|
|
2614
|
+
/**
|
|
2615
|
+
* The scripts
|
|
2616
|
+
*/
|
|
2617
|
+
totalScripts: number;
|
|
2618
|
+
/**
|
|
2619
|
+
* The files of the results, one per key
|
|
2620
|
+
*/
|
|
2621
|
+
files: number;
|
|
2622
|
+
/**
|
|
2623
|
+
* The bytes of the files. An archive stores them as they are, it grows by about as much.
|
|
2624
|
+
*/
|
|
2625
|
+
bytes: number;
|
|
2626
|
+
}
|
|
2627
|
+
|
|
2628
|
+
/**
|
|
2629
|
+
* What an export wrote
|
|
2630
|
+
*/
|
|
2631
|
+
export interface ExportOutcome {
|
|
2632
|
+
/**
|
|
2633
|
+
* The archive, a Blob of the handle table that the caller releases
|
|
2634
|
+
*/
|
|
2635
|
+
archive: number | null;
|
|
2636
|
+
/**
|
|
2637
|
+
* The link
|
|
2638
|
+
*/
|
|
2639
|
+
link: string | null;
|
|
2640
|
+
/**
|
|
2641
|
+
* The cached results that the export carries
|
|
2642
|
+
*/
|
|
2643
|
+
results: ExportedResults;
|
|
2644
|
+
}
|
|
2645
|
+
|
|
2646
|
+
/**
|
|
2647
|
+
* The options of the link of a connection
|
|
2648
|
+
*/
|
|
2649
|
+
export interface ConnectionLinkOptions {
|
|
2650
|
+
/**
|
|
2651
|
+
* Carry the login hint of the sharer in the params, true if absent
|
|
2652
|
+
*/
|
|
2653
|
+
withLoginHint?: boolean;
|
|
2654
|
+
/**
|
|
2655
|
+
* The URL of the app that opens the link
|
|
2656
|
+
*/
|
|
2657
|
+
linkBase: string;
|
|
2658
|
+
}
|
|
2659
|
+
|
|
2660
|
+
/**
|
|
2661
|
+
* The options of an export of a workbook
|
|
2662
|
+
*/
|
|
2663
|
+
export interface ExportOptions {
|
|
2664
|
+
/**
|
|
2665
|
+
* What the export writes
|
|
2666
|
+
*/
|
|
2667
|
+
format?: ExportFormat;
|
|
2668
|
+
/**
|
|
2669
|
+
* Carry the cached query results of the scripts, a link never does
|
|
2670
|
+
*/
|
|
2671
|
+
results?: boolean;
|
|
2672
|
+
/**
|
|
2673
|
+
* Carry the catalogs of the connections, true for files and tables and false for links if absent
|
|
2674
|
+
*/
|
|
2675
|
+
withCatalog?: boolean;
|
|
2676
|
+
/**
|
|
2677
|
+
* Carry the login hint of the sharer in the params, true if absent
|
|
2678
|
+
*/
|
|
2679
|
+
withLoginHint?: boolean;
|
|
2680
|
+
/**
|
|
2681
|
+
* Keep the workbook and connection ids instead of fresh ones
|
|
2682
|
+
*/
|
|
2683
|
+
preserveUuids?: boolean;
|
|
2684
|
+
/**
|
|
2685
|
+
* The URL of the app that opens a link
|
|
2686
|
+
*/
|
|
2687
|
+
linkBase?: string;
|
|
2688
|
+
}
|
|
2689
|
+
|
|
2690
|
+
/**
|
|
2691
|
+
* What a restore restored: the connections and the workbooks that the runtime took, in order, the workbooks that were
|
|
2692
|
+
* refused a load and the progress
|
|
2693
|
+
*/
|
|
2694
|
+
export interface RestoreOutcome {
|
|
2695
|
+
connectionIds: string[];
|
|
2696
|
+
workbookIds: string[];
|
|
2697
|
+
invalidWorkbooks: RestoredInvalidWorkbook[];
|
|
2698
|
+
progress: RestoreProgress;
|
|
2699
|
+
}
|
|
2700
|
+
|
|
2701
|
+
/**
|
|
2702
|
+
* A counter of the progress of a step of a restore
|
|
2703
|
+
*/
|
|
2704
|
+
export interface RestoreProgressCounter {
|
|
2705
|
+
started: number;
|
|
2706
|
+
succeeded: number;
|
|
2707
|
+
skipped: number;
|
|
2708
|
+
failed: number;
|
|
2709
|
+
/**
|
|
2710
|
+
* Null until the total is known
|
|
2711
|
+
*/
|
|
2712
|
+
total: number | null;
|
|
2713
|
+
}
|
|
2714
|
+
|
|
2715
|
+
/**
|
|
2716
|
+
* A script file of a workbook
|
|
2717
|
+
*/
|
|
2718
|
+
export interface RestoreScriptFile {
|
|
2719
|
+
name: string;
|
|
2720
|
+
sql: string;
|
|
2721
|
+
}
|
|
2722
|
+
|
|
2723
|
+
/**
|
|
2724
|
+
* The progress of a restore
|
|
2725
|
+
*/
|
|
2726
|
+
export interface RestoreProgress {
|
|
2727
|
+
restoreConnections: RestoreProgressCounter;
|
|
2728
|
+
restoreCatalogs: RestoreProgressCounter;
|
|
2729
|
+
restoreWorkbookScripts: RestoreProgressCounter;
|
|
2730
|
+
}
|
|
2731
|
+
|
|
2732
|
+
/**
|
|
2733
|
+
* A workbook that failed its validation or couldn't be restored
|
|
2734
|
+
*/
|
|
2735
|
+
export interface RestoredInvalidWorkbook {
|
|
2736
|
+
workbookId: string;
|
|
2737
|
+
title: string;
|
|
2738
|
+
connectorType: ConnectorType | null;
|
|
2739
|
+
/**
|
|
2740
|
+
* The code of the validation error, e.g. `unsupported_format_version`
|
|
2741
|
+
*/
|
|
2742
|
+
error: string;
|
|
2743
|
+
/**
|
|
2744
|
+
* A short explanation of the error for the user
|
|
2745
|
+
*/
|
|
2746
|
+
description: string;
|
|
2747
|
+
}
|
|
2748
|
+
|
|
2749
|
+
/**
|
|
2750
|
+
* The outcome of saving a connection
|
|
2751
|
+
*/
|
|
2752
|
+
export interface ConnectionSaveOutcome {
|
|
2753
|
+
/**
|
|
2754
|
+
* The saved params
|
|
2755
|
+
*/
|
|
2756
|
+
params: JsonParams;
|
|
2757
|
+
/**
|
|
2758
|
+
* The outcome of writing the app manifest
|
|
2759
|
+
*/
|
|
2760
|
+
manifest: StorageWriteOutcome;
|
|
2761
|
+
/**
|
|
2762
|
+
* The outcomes of writing the copies of the workbooks, none if the manifest wasn't written
|
|
2763
|
+
*/
|
|
2764
|
+
workbooks: ConnectionCopyOutcome[];
|
|
2765
|
+
}
|
|
2766
|
+
|
|
2767
|
+
/**
|
|
2768
|
+
* The outcome of writing the copy of a connection into a workbook
|
|
2769
|
+
*/
|
|
2770
|
+
export interface ConnectionCopyOutcome {
|
|
2771
|
+
workbookId: string;
|
|
2772
|
+
result: StorageWriteOutcome;
|
|
2773
|
+
}
|
|
2774
|
+
|
|
2775
|
+
/**
|
|
2776
|
+
* A catalog (`dashql_catalog_*`)
|
|
2777
|
+
*/
|
|
2778
|
+
export class Catalog {
|
|
2779
|
+
free(): void;
|
|
2780
|
+
/**
|
|
2781
|
+
* The `CatalogStatistics`
|
|
2782
|
+
*/
|
|
2783
|
+
statistics(): Uint8Array;
|
|
2784
|
+
/**
|
|
2785
|
+
* Drop a script from the catalog
|
|
2786
|
+
*/
|
|
2787
|
+
dropScript(script: Script): void;
|
|
2788
|
+
/**
|
|
2789
|
+
* Load the analysis of a script into a `CatalogLayer`
|
|
2790
|
+
*/
|
|
2791
|
+
loadScript(script: Script, layer: number): void;
|
|
2792
|
+
/**
|
|
2793
|
+
* Does the catalog change only through the runtime, the catalog of a connection?
|
|
2794
|
+
*/
|
|
2795
|
+
isReadOnly(): boolean;
|
|
2796
|
+
/**
|
|
2797
|
+
* Load the analyses of several scripts atomically
|
|
2798
|
+
*/
|
|
2799
|
+
loadScripts(batch: ScriptBatch): void;
|
|
2800
|
+
/**
|
|
2801
|
+
* Update the tables of a descriptor entry with a packed `CatalogTableUpdate`
|
|
2802
|
+
*/
|
|
2803
|
+
replaceTables(id: number, layer: number, update: Uint8Array): void;
|
|
2804
|
+
dropDescriptor(id: number): void;
|
|
2805
|
+
/**
|
|
2806
|
+
* The relations that the connection reported as gone, as packed `TouchedRelations`
|
|
2807
|
+
*/
|
|
2808
|
+
absentRelations(): Uint8Array;
|
|
2809
|
+
/**
|
|
2810
|
+
* The `CatalogEntries` of all entries in rank order
|
|
2811
|
+
*/
|
|
2812
|
+
describeEntries(): Uint8Array;
|
|
2813
|
+
/**
|
|
2814
|
+
* The packed `CatalogDescriptor` of a descriptor entry
|
|
2815
|
+
*/
|
|
2816
|
+
descriptorBytes(id: number): Uint8Array | undefined;
|
|
2817
|
+
allocateEntryId(): number;
|
|
2818
|
+
containsEntryId(id: number): boolean;
|
|
2819
|
+
/**
|
|
2820
|
+
* Publish descriptor bytes in a `CatalogLayer`
|
|
2821
|
+
*/
|
|
2822
|
+
replaceDescriptor(id: number, layer: number, descriptor: Uint8Array): void;
|
|
2823
|
+
/**
|
|
2824
|
+
* The `CatalogEntries` of one entry, empty if the entry is unknown
|
|
2825
|
+
*/
|
|
2826
|
+
describeEntriesOf(id: number): Uint8Array | undefined;
|
|
2827
|
+
/**
|
|
2828
|
+
* Drop the client functions of a namespace
|
|
2829
|
+
*/
|
|
2830
|
+
dropClientFunctions(namespace: string): void;
|
|
2831
|
+
/**
|
|
2832
|
+
* Register client functions from their JSON spec and return their namespace. The namespace must be free.
|
|
2833
|
+
*/
|
|
2834
|
+
registerClientFunctions(spec: string): string;
|
|
2835
|
+
constructor();
|
|
2836
|
+
clear(): void;
|
|
2837
|
+
/**
|
|
2838
|
+
* The `FlatCatalog`
|
|
2839
|
+
*/
|
|
2840
|
+
flatten(): Uint8Array;
|
|
2841
|
+
/**
|
|
2842
|
+
* The version of the catalog, every change of its contents bumps it. Sessions and shells change the catalog
|
|
2843
|
+
* too, the version tells JS when its copies of the catalog are outdated.
|
|
2844
|
+
*/
|
|
2845
|
+
version(): number;
|
|
2846
|
+
}
|
|
2847
|
+
/**
|
|
2848
|
+
* A query profile (`dashql_query_profile_*`)
|
|
2849
|
+
*/
|
|
2850
|
+
export class QueryProfile {
|
|
2851
|
+
free(): void;
|
|
2852
|
+
/**
|
|
2853
|
+
* Start an empty model for a query of an engine (`ProfileEngine`), the structure appears with the progress
|
|
2854
|
+
*/
|
|
2855
|
+
startQuery(engine: number): void;
|
|
2856
|
+
/**
|
|
2857
|
+
* Apply input events (a JSON array), returns the packed `QueryProfileEvents` of the effective state changes
|
|
2858
|
+
*/
|
|
2859
|
+
applyEvents(events: Uint8Array): Uint8Array;
|
|
2860
|
+
/**
|
|
2861
|
+
* Lay out the loaded plan again with the configured layout, e.g. after configuring the other orientation
|
|
2862
|
+
*/
|
|
2863
|
+
computeLayout(): void;
|
|
2864
|
+
/**
|
|
2865
|
+
* Load a Hyper plan and compute the layout, throws if the plan cannot be parsed
|
|
2866
|
+
*/
|
|
2867
|
+
loadHyperPlan(plan: Uint8Array): void;
|
|
2868
|
+
/**
|
|
2869
|
+
* Load a Trino plan (EXPLAIN JSON fragments or a QueryInfo with stage plans) and compute the layout, throws
|
|
2870
|
+
* if the plan cannot be parsed. Resets the execution state.
|
|
2871
|
+
*/
|
|
2872
|
+
loadTrinoPlan(plan: Uint8Array): void;
|
|
2873
|
+
/**
|
|
2874
|
+
* Reset the execution state, drops the structure that was registered at runtime
|
|
2875
|
+
*/
|
|
2876
|
+
resetExecution(): void;
|
|
2877
|
+
/**
|
|
2878
|
+
* The current execution state as packed `QueryProfileEvents`, one update per entity with state
|
|
2879
|
+
*/
|
|
2880
|
+
snapshotEvents(): Uint8Array;
|
|
2881
|
+
/**
|
|
2882
|
+
* The structure version, the structure must be repacked when it changes
|
|
2883
|
+
*/
|
|
2884
|
+
structureVersion(): number;
|
|
2885
|
+
/**
|
|
2886
|
+
* Apply a Trino QueryInfo (JSON, pruned or not) received at a time in milliseconds since epoch: the pipelines
|
|
2887
|
+
* and slot statistics of the stages. Returns the packed `QueryProfileEvents` of the effective state changes.
|
|
2888
|
+
*/
|
|
2889
|
+
applyTrinoQueryInfo(info: Uint8Array, time: number): Uint8Array;
|
|
2890
|
+
/**
|
|
2891
|
+
* Apply the `stats` of a Trino `/v1/statement` response (JSON) received at a time in milliseconds since
|
|
2892
|
+
* epoch, returns the packed `QueryProfileEvents` of the effective state changes
|
|
2893
|
+
*/
|
|
2894
|
+
applyTrinoStatementStats(stats: Uint8Array, time: number): Uint8Array;
|
|
2895
|
+
constructor();
|
|
2896
|
+
/**
|
|
2897
|
+
* The packed `QueryProfile`
|
|
2898
|
+
*/
|
|
2899
|
+
pack(): Uint8Array;
|
|
2900
|
+
reset(): void;
|
|
2901
|
+
/**
|
|
2902
|
+
* Configure the layout with a packed `ProfileLayoutConfig`
|
|
2903
|
+
*/
|
|
2904
|
+
configure(level_height: number, node_height: number, node_margin_horizontal: number, node_padding_left: number, node_padding_right: number, icon_width: number, icon_margin_right: number, max_label_chars: number, width_per_label_char: number, node_min_width: number, node_margin_vertical: number, orientation: number, symbol_width: number): void;
|
|
2905
|
+
}
|
|
2906
|
+
/**
|
|
2907
|
+
* A follower of the progress of a query: it replays the recording of the progress with a layout of its own, e.g. the
|
|
2908
|
+
* other orientation of the plan, and applies the payloads that are recorded later as they come
|
|
2909
|
+
*/
|
|
2910
|
+
export class QueryProgressFollower {
|
|
2911
|
+
free(): void;
|
|
2912
|
+
/**
|
|
2913
|
+
* A follower with the layout of its plans, null for the default one
|
|
2914
|
+
*/
|
|
2915
|
+
constructor(layout?: ProfileLayoutView | null);
|
|
2916
|
+
}
|
|
2917
|
+
/**
|
|
2918
|
+
* The runtime of DashQL, see the module
|
|
2919
|
+
*/
|
|
2920
|
+
export class Runtime {
|
|
2921
|
+
private constructor();
|
|
2922
|
+
free(): void;
|
|
2923
|
+
/**
|
|
2924
|
+
* Attach files to a workbook: every Parquet file gets a name whose table parameter takes no name of a script or
|
|
2925
|
+
* another attachment (`sales.parquet` becomes `sales-2.parquet`, a file with the name of an attachment replaces
|
|
2926
|
+
* it), is written through the storage writer and the view of the workbook lists it once the storage does. Resolves
|
|
2927
|
+
* with the names the files got and the refused files, rejects with what the storage failed with.
|
|
2928
|
+
*/
|
|
2929
|
+
attachFiles(workbook_id: string, files: AttachedFile[]): Promise<AttachFilesOutcome>;
|
|
2930
|
+
/**
|
|
2931
|
+
* Rename an attachment of a workbook like a script: the name is a display name, `.parquet` is added unless it has
|
|
2932
|
+
* it, and the name takes no name of a script or another attachment, `sales` becomes `sales-2` then. The scripts
|
|
2933
|
+
* that read the attachment read the new name at once and its file is renamed through the storage writer. A refused
|
|
2934
|
+
* rename, e.g. of a cloud preview or one whose rewrite of the references fails, rejects before anything changed.
|
|
2935
|
+
* Resolves with the new file name once the file has it and the view lists it, null for a name that is unchanged or
|
|
2936
|
+
* no plain file name. Rejects with what the storage failed with, the writer tries the rename again.
|
|
2937
|
+
*/
|
|
2938
|
+
renameAttachment(workbook_id: string, file_name: string, name: string): Promise<string | null>;
|
|
2939
|
+
/**
|
|
2940
|
+
* List the attachments of a workbook again, e.g. after one was removed or renamed in the storage. Resolves once
|
|
2941
|
+
* the view of the workbook lists them, rejects with what the storage failed with.
|
|
2942
|
+
*/
|
|
2943
|
+
refreshAttachments(workbook_id: string): Promise<void>;
|
|
2944
|
+
/**
|
|
2945
|
+
* The identity of the catalog of a connection, `catalogId` of its view, without reading the view. None for an
|
|
2946
|
+
* unknown connection and while a task holds it.
|
|
2947
|
+
*/
|
|
2948
|
+
catalogId(connection_id: string): number | undefined;
|
|
2949
|
+
/**
|
|
2950
|
+
* Write the copies of the last save of a connection into workbooks again, null without a save that wrote the app
|
|
2951
|
+
* manifest
|
|
2952
|
+
*/
|
|
2953
|
+
retrySave(connection_id: string, workbook_ids: string[]): Promise<ConnectionSaveOutcome | null>;
|
|
2954
|
+
/**
|
|
2955
|
+
* Run a script of a workbook with the scripts it references, see `runWorkbook`. A run that holds the workbook
|
|
2956
|
+
* refuses it.
|
|
2957
|
+
*/
|
|
2958
|
+
runScript(workbook_id: string, script_key: number, options?: RunScriptOptions | null): Promise<{ outcome: RunOutcome; error: unknown }>;
|
|
2959
|
+
/**
|
|
2960
|
+
* An id of the sequence of the queries without a query, e.g. for the computation of a result that no query of the
|
|
2961
|
+
* runtime produced. Fails while a task holds the registry.
|
|
2962
|
+
*/
|
|
2963
|
+
allocateId(): number;
|
|
2964
|
+
/**
|
|
2965
|
+
* Drop an import that was read, its files are released
|
|
2966
|
+
*/
|
|
2967
|
+
dropImport(import_id: number): void;
|
|
2968
|
+
/**
|
|
2969
|
+
* Read a workbook to import: a `.dashql` archive, a workbook folder or the workbook tables of a cloud. Nothing is
|
|
2970
|
+
* written, the import waits for `commitImport` or `dropImport`. Resolves with what an import would write, the
|
|
2971
|
+
* registered workbook with the same id and the questions about the connections.
|
|
2972
|
+
*/
|
|
2973
|
+
readImport(source: ImportSource): Promise<ImportPreview>;
|
|
2974
|
+
/**
|
|
2975
|
+
* The reusable result keys of the scripts of a workbook in feed order, the keys that a run reads and writes: of the
|
|
2976
|
+
* targets with what they need, of every script without. Null for a script without one, all null if the analyses as
|
|
2977
|
+
* they are can't be planned.
|
|
2978
|
+
*/
|
|
2979
|
+
resultKeys(workbook_id: string, targets?: Uint32Array | null): Promise<(string | null)[]>;
|
|
2980
|
+
/**
|
|
2981
|
+
* Cancel a query, resolves once it ended
|
|
2982
|
+
*/
|
|
2983
|
+
cancelQuery(query_id: number): Promise<void>;
|
|
2984
|
+
/**
|
|
2985
|
+
* Cancel the setup of a connection or a login that runs, it ends as cancelled at its next step
|
|
2986
|
+
*/
|
|
2987
|
+
cancelSetup(setup_id: string): void;
|
|
2988
|
+
/**
|
|
2989
|
+
* Run the scripts of a workbook: all of them, the targets with what they need, or the scripts that a change of
|
|
2990
|
+
* inputs affects. A change of inputs while the workbook is busy stops the run that holds it and starts once the
|
|
2991
|
+
* workbook is free. The listener hears the events of the scripts and may prepare the connections. Resolves with how
|
|
2992
|
+
* the run ended, `refused` names why it didn't start; `error` is what the platform failed with.
|
|
2993
|
+
*/
|
|
2994
|
+
runWorkbook(workbook_id: string, options: RunWorkbookOptions | null | undefined, listener: RunListener | null): Promise<{ outcome: RunOutcome; error: unknown }>;
|
|
2995
|
+
/**
|
|
2996
|
+
* Hold the writes of the writer (no workbook) or of a workbook for a reason, e.g. `pause` while the app moves a
|
|
2997
|
+
* workbook or `handover` when another tab takes over. Holds are counted, each is released on its own. A flush
|
|
2998
|
+
* writes past a pause of the writer, never past another hold.
|
|
2999
|
+
*/
|
|
3000
|
+
storageHold(reason: StorageHoldReason, workbook_id?: string | null): void;
|
|
3001
|
+
/**
|
|
3002
|
+
* The slices that changed and the effects on handles since the last call: the slices that the services marked,
|
|
3003
|
+
* see `changes.rs`. A slice that is busy is never reported as gone, it follows with the next changes. Changes that
|
|
3004
|
+
* fail to cross come again with the next call.
|
|
3005
|
+
*/
|
|
3006
|
+
takeChanges(): ChangeSet;
|
|
3007
|
+
/**
|
|
3008
|
+
* Tests that stand in for the catalog loader: the catalog of a connection as a handle that writes. Its writes
|
|
3009
|
+
* bypass the runtime, nothing is announced. None for an unknown connection.
|
|
3010
|
+
*/
|
|
3011
|
+
testCatalog(connection_id: string): Catalog | undefined;
|
|
3012
|
+
/**
|
|
3013
|
+
* Analyze a result as the computation of a table: its import into the compute database, the statistics, the
|
|
3014
|
+
* system columns, the summaries of the columns and the ordering of the options. The result is a table of the
|
|
3015
|
+
* handle table, the computation takes its handle; an analysis that starts no computation releases it, so does a
|
|
3016
|
+
* call that fails. The module reads only the rows and the schema of the result. A result without columns has
|
|
3017
|
+
* nothing to analyze, its handle is released. Resolves once the analysis is done, rejects with the error of a
|
|
3018
|
+
* failed task.
|
|
3019
|
+
*/
|
|
3020
|
+
analyzeTable(table_id: number, table: number, options: AnalyzeTableOptions): Promise<void>;
|
|
3021
|
+
/**
|
|
3022
|
+
* Import a workbook that was read, with the answers to its questions: the connections are mapped, the cached
|
|
3023
|
+
* results go to the query result cache, the workbook is written and restored. The listener hears the steps.
|
|
3024
|
+
*/
|
|
3025
|
+
commitImport(import_id: number, answers: ImportAnswers, listener: ((step: ImportStep, results: ImportedResults | null) => void) | null): Promise<ImportOutcome>;
|
|
3026
|
+
/**
|
|
3027
|
+
* Run a query on a connection. The query is in the history of the connection from the start; it runs once the
|
|
3028
|
+
* runtime described it: the target on the channel of the connection, the key of its result in the query result
|
|
3029
|
+
* cache and what the options of the arguments ask for. The caller hears the events of the query (`events`).
|
|
3030
|
+
* `failure` is what a query that the caller failed fails with. Returns the id and the promise of the outcome.
|
|
3031
|
+
*/
|
|
3032
|
+
executeQuery(connection_id: string, args: QueryArgs, failure: any, events: ((event: QueryCallerEvent) => void) | null): QueryTicket;
|
|
3033
|
+
/**
|
|
3034
|
+
* A view starts (`shown` true) or stops showing the profile of a query: the connector then fetches the plan and
|
|
3035
|
+
* its statistics
|
|
3036
|
+
*/
|
|
3037
|
+
watchProfile(query_id: number, shown: boolean): void;
|
|
3038
|
+
/**
|
|
3039
|
+
* The first rows of an analyzed result, at most `limit`, in the order of the result and without the columns of
|
|
3040
|
+
* its computation, as an Arrow IPC stream, e.g. for the table of a terminal. The rows are read from the data
|
|
3041
|
+
* frame of the computation, the result itself doesn't enter the module. Rejects for a table that has no
|
|
3042
|
+
* computation or whose analysis isn't done.
|
|
3043
|
+
*/
|
|
3044
|
+
previewResult(table_id: number, limit: number): Promise<Uint8Array>;
|
|
3045
|
+
/**
|
|
3046
|
+
* The session of a script, shared with its workbook, as a handle that reads it. Every call returns a new handle.
|
|
3047
|
+
* None for an unknown script.
|
|
3048
|
+
*/
|
|
3049
|
+
scriptSession(script_key: number): WorkbookScriptSession | undefined;
|
|
3050
|
+
/**
|
|
3051
|
+
* Export a workbook: a `.dashql` archive (a Blob of the handle table that the caller releases), a link, or the
|
|
3052
|
+
* workbook tables, which go to `consume` and stay readable until it settled. The pending writes of the workbook
|
|
3053
|
+
* are written first, the cached results are retained while the export reads them. Rejects with what the platform
|
|
3054
|
+
* failed with.
|
|
3055
|
+
*/
|
|
3056
|
+
exportWorkbook(workbook_id: string, options: ExportOptions, consume: ((tables: ExportedTables) => Promise<void>) | null): Promise<ExportOutcome>;
|
|
3057
|
+
/**
|
|
3058
|
+
* Bring a storage root of the platform to the current storage version and every workbook folder that its workbook
|
|
3059
|
+
* tree registers to the current workbook format, without a runtime: the app runs it at startup before it sets up
|
|
3060
|
+
* its storage. A fresh storage gets a manifest with the current storage version, a storage of a newer version of
|
|
3061
|
+
* the app is refused. The platform holds the lock of the storage meanwhile. The storage of a runtime migrates a
|
|
3062
|
+
* workbook folder that it keeps elsewhere (`storage.workbookFolder`) when it reads an older workbook file.
|
|
3063
|
+
*/
|
|
3064
|
+
static migrateStorage(root: RuntimeStorageRoot, log: ((level: 'debug' | 'info' | 'warn' | 'error', message: string, details: [string, string][], target: string) => void) | null): Promise<StorageMigrationOutcome>;
|
|
3065
|
+
/**
|
|
3066
|
+
* Request a refresh of the catalog of a connection, a forced one supersedes a running update. The catalog loader
|
|
3067
|
+
* runs it once the connection is online.
|
|
3068
|
+
*/
|
|
3069
|
+
refreshCatalog(connection_id: string, force: boolean): void;
|
|
3070
|
+
/**
|
|
3071
|
+
* Save a connection: the given params, else its draft, else its params. The app manifest first, then the params
|
|
3072
|
+
* are committed and the copies of the workbooks that use the connection are written. The view of the connection
|
|
3073
|
+
* shows the save while it runs.
|
|
3074
|
+
*/
|
|
3075
|
+
saveConnection(connection_id: string, params?: JsonParams | null): Promise<ConnectionSaveOutcome>;
|
|
3076
|
+
/**
|
|
3077
|
+
* Run a command of the storage writer that waits for writes: flush and settle it, flush or delete a workbook, hand
|
|
3078
|
+
* over to another tab.
|
|
3079
|
+
* `flushWorkbook` resolves whether every write of the workbook reached the storage, `deleteWorkbook` rejects with
|
|
3080
|
+
* what the storage failed with.
|
|
3081
|
+
*/
|
|
3082
|
+
storage(command: StorageCommand): Promise<unknown>;
|
|
3083
|
+
/**
|
|
3084
|
+
* Release one hold of a reason. Once nothing holds them, the pending writes wait for their debounce again.
|
|
3085
|
+
*/
|
|
3086
|
+
storageRelease(reason: StorageHoldReason, workbook_id?: string | null): void;
|
|
3087
|
+
/**
|
|
3088
|
+
* The workbook tables of the format with their columns, e.g. the schema of a cloud
|
|
3089
|
+
*/
|
|
3090
|
+
static workbookTables(): WorkbookTableSchema[];
|
|
3091
|
+
/**
|
|
3092
|
+
* The cached results of the scripts of a workbook that an export would carry, counted without reading them
|
|
3093
|
+
*/
|
|
3094
|
+
exportedResults(workbook_id: string): Promise<ExportedResults>;
|
|
3095
|
+
/**
|
|
3096
|
+
* Are the writes of a workbook held, by a hold of the writer or of the workbook, e.g. after one of its files
|
|
3097
|
+
* changed outside the app?
|
|
3098
|
+
*/
|
|
3099
|
+
isWorkbookHeld(workbook_id: string): boolean;
|
|
3100
|
+
/**
|
|
3101
|
+
* Restore a single workbook of the storage, e.g. one that was imported or the folder of a run, against the
|
|
3102
|
+
* connections of the runtime. Unknown connections are registered. A workbook with the same id is replaced. Rejects
|
|
3103
|
+
* if the workbook can't be restored.
|
|
3104
|
+
*/
|
|
3105
|
+
restoreWorkbook(workbook_id: string): Promise<RestoreOutcome>;
|
|
3106
|
+
/**
|
|
3107
|
+
* Set up a connection with its connector: the channel of its params or of the params of the options, then the
|
|
3108
|
+
* health check unless the connection is online with its channel. The steps go to the connection as they happen, the
|
|
3109
|
+
* view of the connection shows them and whether a setup runs. A setup of the connection that runs is cancelled.
|
|
3110
|
+
* Resolves with the outcome, a failure is in the view of the connection as well.
|
|
3111
|
+
*/
|
|
3112
|
+
setupConnection(connection_id: string, options?: SetupOptions | null): Promise<SetupOutcome>;
|
|
3113
|
+
/**
|
|
3114
|
+
* The versions of the storage format of the module: the storage version of the manifest and the format version of
|
|
3115
|
+
* workbook files
|
|
3116
|
+
*/
|
|
3117
|
+
static storageVersions(): StorageVersions;
|
|
3118
|
+
/**
|
|
3119
|
+
* The link of a connection: an empty workbook that holds only the connection, the params sanitized for sharing
|
|
3120
|
+
*/
|
|
3121
|
+
exportConnection(connection_id: string, options: ConnectionLinkOptions): Promise<string>;
|
|
3122
|
+
/**
|
|
3123
|
+
* Apply an event of the editor of a script, a packed `EditorEvent`, and return the packed `EditorUpdate` for the
|
|
3124
|
+
* editor with its key: the workbook takes the update, writes the text and publishes it. The event names the text
|
|
3125
|
+
* version that the editor shows, an editor that missed a change of the text gets the status `STALE_TEXT_VERSION`
|
|
3126
|
+
* and shows the text of the script again. `known` is the key of the update that the editor holds
|
|
3127
|
+
* (`editorUpdateKey`), the update leaves out the analysis if the editor holds the one of the script. An edit of the
|
|
3128
|
+
* user accepts a staged rewrite. Null for an event of a session that the script no longer holds (`sessionGeneration`
|
|
3129
|
+
* of the view of the script).
|
|
3130
|
+
*/
|
|
3131
|
+
applyEditorEvent(workbook_id: string, script_key: number, session_generation: number, event: Uint8Array, known?: string | null): EditorEventOutcome | undefined;
|
|
3132
|
+
/**
|
|
3133
|
+
* Wait for the writes into the query result cache that run, e.g. before a process ends
|
|
3134
|
+
*/
|
|
3135
|
+
flushCacheWrites(): Promise<void>;
|
|
3136
|
+
/**
|
|
3137
|
+
* Start or stop the catalog loader. A stopped loader starts no update, the running ones finish.
|
|
3138
|
+
*/
|
|
3139
|
+
runCatalogLoader(running: boolean): void;
|
|
3140
|
+
/**
|
|
3141
|
+
* The statistics of the writes by key, of a workbook or of all keys, ordered by key. They change with every write
|
|
3142
|
+
* and are no slice: a view of them reads them when it shows them.
|
|
3143
|
+
*/
|
|
3144
|
+
storageStatistics(workbook_id?: string | null): StorageKeyStatistics[];
|
|
3145
|
+
/**
|
|
3146
|
+
* The layout of the plans of the progress of the queries that start later, null for the default one
|
|
3147
|
+
*/
|
|
3148
|
+
setProgressLayout(layout?: ProfileLayoutView | null): void;
|
|
3149
|
+
/**
|
|
3150
|
+
* The text of the script with the functions of a connection, none once it is deleted
|
|
3151
|
+
*/
|
|
3152
|
+
functionScriptText(connection_id: string): string | undefined;
|
|
3153
|
+
/**
|
|
3154
|
+
* Is the analysis of a script outdated, also by a change that the workbook missed?
|
|
3155
|
+
*/
|
|
3156
|
+
isAnalysisOutdated(script_key: number): boolean;
|
|
3157
|
+
/**
|
|
3158
|
+
* Follow the progress of a query with the layout of a follower, none without structured progress. The structure
|
|
3159
|
+
* crosses only when its version differs from the one that the host holds.
|
|
3160
|
+
*/
|
|
3161
|
+
followQueryProgress(query_id: number, follower: QueryProgressFollower, known?: QueryProfileKeys | null): QueryProfileProgressView | undefined;
|
|
3162
|
+
/**
|
|
3163
|
+
* Answer the question about a workbook that changed outside the app: `true` reloads it from disk, `false` keeps the
|
|
3164
|
+
* version of the app and writes it over the disk, `null` gives no answer, e.g. when the question failed. The
|
|
3165
|
+
* answer to an older question is ignored.
|
|
3166
|
+
*/
|
|
3167
|
+
answerExternalChange(workbook_id: string, prompt: number, reload?: boolean | null): void;
|
|
3168
|
+
/**
|
|
3169
|
+
* Check the folders of workbooks that the platform keeps in folders of their own for changes outside the app, e.g.
|
|
3170
|
+
* when the window gets the focus. The checks run one at a time after the ones that are queued. A change of the
|
|
3171
|
+
* scripts asks the question of the `storage` view (`externalChanges`), see `answerExternalChange`.
|
|
3172
|
+
*/
|
|
3173
|
+
checkWorkbookFolders(workbook_ids: string[]): void;
|
|
3174
|
+
/**
|
|
3175
|
+
* Does storage hold the scripts of a workbook as they are: the same files in the same order, on the same
|
|
3176
|
+
* connections, with the same texts?
|
|
3177
|
+
*/
|
|
3178
|
+
matchesStoredScripts(workbook_id: string, scripts: StoredScriptView[]): boolean;
|
|
3179
|
+
/**
|
|
3180
|
+
* Set up the connections of a workbook that the app opens and that need nothing of the user: the embedded Hyper
|
|
3181
|
+
* and the Hyper of a link once the tab holds its token. Every connection is considered once, the app calls it
|
|
3182
|
+
* again when the workbook or the tokens of the links change.
|
|
3183
|
+
*/
|
|
3184
|
+
setUpOpenedWorkbook(workbook_id: string): void;
|
|
3185
|
+
/**
|
|
3186
|
+
* Discard the writes of keys and their failures, e.g. a write that failed because its workbook folder is gone. The
|
|
3187
|
+
* writes that waited for them run.
|
|
3188
|
+
*/
|
|
3189
|
+
storageDiscardWrites(keys: string[]): void;
|
|
3190
|
+
/**
|
|
3191
|
+
* Give the table parameters of a workbook to a session that is no script of it, e.g. the draft of the composer.
|
|
3192
|
+
* Returns whether the analysis of the session is outdated by them.
|
|
3193
|
+
*/
|
|
3194
|
+
attachTableParameters(workbook_id: string, session: ScriptSession): boolean;
|
|
3195
|
+
/**
|
|
3196
|
+
* Log in to Salesforce with the params of the connector, without a connection, e.g. the login of the shell. The
|
|
3197
|
+
* names of the steps go to the listener (`LoginStep`, e.g. `REQUESTING_CORE_AUTH_TOKEN`), never a code or a token;
|
|
3198
|
+
* `cancelSetup` with the id stops the login. The outcome of a success has the tokens and the user.
|
|
3199
|
+
*/
|
|
3200
|
+
authenticateSalesforce(setup_id: string, params: any, options: SetupOptions | null | undefined, events: ((step: string) => void) | null): Promise<SetupOutcome>;
|
|
3201
|
+
/**
|
|
3202
|
+
* Delete the files of a workbook that was refused a load and drop it from the list
|
|
3203
|
+
*/
|
|
3204
|
+
deleteInvalidWorkbook(workbook_id: string): Promise<void>;
|
|
3205
|
+
/**
|
|
3206
|
+
* Bring the folder of a workbook that the platform keeps in a folder of its own (`storage.workbookFolder`) to the
|
|
3207
|
+
* current workbook format, e.g. the folder of a run of the command line tool before it reads the workbook id.
|
|
3208
|
+
* Resolves with the outcome (`current`, `migrated`, `missing`, `unsupported`, `newer`), null for a workbook of the
|
|
3209
|
+
* storage root. The restore migrates the folder of a workbook itself.
|
|
3210
|
+
*/
|
|
3211
|
+
migrateWorkbookFolder(workbook_id: string): Promise<'current' | 'migrated' | 'missing' | 'unsupported' | 'newer' | null>;
|
|
3212
|
+
/**
|
|
3213
|
+
* The recording of the progress of a query as JSON, none without structured progress
|
|
3214
|
+
*/
|
|
3215
|
+
queryProgressRecording(query_id: number): string | undefined;
|
|
3216
|
+
/**
|
|
3217
|
+
* The params of a new connection of a connector, e.g. `{"trino": {...}}`
|
|
3218
|
+
*/
|
|
3219
|
+
static defaultConnectionParams(connector: ConnectorType): Record<string, unknown>;
|
|
3220
|
+
/**
|
|
3221
|
+
* The tokens of a connection as their JSON, e.g. for the settings of a connection that show them on request. The
|
|
3222
|
+
* views only summarize them. Null without the connection.
|
|
3223
|
+
*/
|
|
3224
|
+
revealConnectionSecrets(connection_id: string): ConnectionSecrets | null;
|
|
3225
|
+
/**
|
|
3226
|
+
* Connection params without their secrets, as a link or a file shares them: the identity stays, the login hint only
|
|
3227
|
+
* `withLoginHint`, the raw form rows of a draft go. Params of an unknown connector stay as they are.
|
|
3228
|
+
*/
|
|
3229
|
+
static sanitizeConnectionParams(params: Record<string, unknown>, with_login_hint: boolean): Record<string, unknown>;
|
|
3230
|
+
/**
|
|
3231
|
+
* The database that the catalog of a Salesforce connection names its relations with, also the alias of the Hyper
|
|
3232
|
+
* Cloud database of a Database.com connection
|
|
3233
|
+
*/
|
|
3234
|
+
static salesforceCatalogDatabase(): string;
|
|
3235
|
+
/**
|
|
3236
|
+
* The login hint of connection params (the account username or login), null if there is none. Fails on params of
|
|
3237
|
+
* an unknown connector.
|
|
3238
|
+
*/
|
|
3239
|
+
static connectionParamsLoginHint(params: Record<string, unknown>): string | undefined;
|
|
3240
|
+
/**
|
|
3241
|
+
* Do two connection params describe the same connection, ignoring everything that sharing strips? A shared
|
|
3242
|
+
* workbook carries the params without secrets and login hints, they still describe the connection of the full
|
|
3243
|
+
* params.
|
|
3244
|
+
*/
|
|
3245
|
+
static connectionParamsShareEqual(left: Record<string, unknown>, right: Record<string, unknown>): boolean;
|
|
3246
|
+
/**
|
|
3247
|
+
* The Hyper Cloud database of a Database.com connection that names none
|
|
3248
|
+
*/
|
|
3249
|
+
static hyperCloudDefaultDatabaseName(): string;
|
|
3250
|
+
/**
|
|
3251
|
+
* Connection params without the raw form rows, they belong only to the local draft. Fails on params of an unknown
|
|
3252
|
+
* connector.
|
|
3253
|
+
*/
|
|
3254
|
+
static connectionParamsWithoutDraftRows(params: Record<string, unknown>): Record<string, unknown>;
|
|
3255
|
+
/**
|
|
3256
|
+
* A runtime on a platform
|
|
3257
|
+
*/
|
|
3258
|
+
static create(platform: RuntimePlatform): Runtime;
|
|
3259
|
+
/**
|
|
3260
|
+
* The host failed to project slices of a kind, e.g. a projection threw: they move with the next changes, also if
|
|
3261
|
+
* their views didn't change, and the host is told
|
|
3262
|
+
*/
|
|
3263
|
+
resync(kind: ViewKind, ids: (string | number)[]): void;
|
|
3264
|
+
/**
|
|
3265
|
+
* The catalog of a connection, shared with the connection and the scripts that analyze with it. The handle reads
|
|
3266
|
+
* only: the catalog changes through the runtime, which tells the scripts on it. None for an unknown connection.
|
|
3267
|
+
* The identity of the catalog is `catalogId` of the view of the connection.
|
|
3268
|
+
*/
|
|
3269
|
+
catalog(connection_id: string): Catalog | undefined;
|
|
3270
|
+
/**
|
|
3271
|
+
* Restore the connections of the app manifest and the workbooks of the workbook tree of the storage of the
|
|
3272
|
+
* platform. The runtime takes them, the writes after the restore go through its writer. The listener hears the
|
|
3273
|
+
* progress. Resolves with what was restored, the workbooks that were refused a load are in the list of the
|
|
3274
|
+
* workbooks.
|
|
3275
|
+
*/
|
|
3276
|
+
restore(progress: ((progress: RestoreProgress) => void) | null): Promise<RestoreOutcome>;
|
|
3277
|
+
/**
|
|
3278
|
+
* Apply an action to a slice. Never throws: a malformed target or action and a refused action are failed outcomes,
|
|
3279
|
+
* logged as warnings.
|
|
3280
|
+
*/
|
|
3281
|
+
dispatch(target: Target, action: RuntimeAction): DispatchOutcome;
|
|
3282
|
+
/**
|
|
3283
|
+
* Shut the runtime down, in this order: the runs stop, the catalog loader stops, the writes into the query result
|
|
3284
|
+
* cache and the pending writes of the storage finish, then the imports are dropped, the setups and the queries are
|
|
3285
|
+
* cancelled and the computations go, their runs cancelled and their tables released with the next changes.
|
|
3286
|
+
* Resolves once that is done; from then on the runtime calls the platform no more, a task that is still running
|
|
3287
|
+
* fails at its next call. The host takes the last changes and frees the runtime with `free()`.
|
|
3288
|
+
*/
|
|
3289
|
+
shutdown(): Promise<void>;
|
|
3290
|
+
/**
|
|
3291
|
+
* Stop the run of a workbook, the running statements are cancelled
|
|
3292
|
+
*/
|
|
3293
|
+
stopRun(workbook_id: string): void;
|
|
3294
|
+
/**
|
|
3295
|
+
* Tests of the seam: call a function while a part of the state is borrowed, as a task of the runtime would hold it.
|
|
3296
|
+
* The function may take the changes and read the views. The parts: `workbook:<id>`, `connection:<id>` (its state),
|
|
3297
|
+
* `queries:<connection id>` (its history), `registry`, `workbooks`, `scriptIndex`, `computations`, `runs`,
|
|
3298
|
+
* `storage`.
|
|
3299
|
+
*/
|
|
3300
|
+
testHold(part: string, f: Function): any;
|
|
3301
|
+
/**
|
|
3302
|
+
* Lease a connection for a session of the host, a later lease takes the connection over. Returns the lease that
|
|
3303
|
+
* `closeSession` takes.
|
|
3304
|
+
*/
|
|
3305
|
+
openSession(connection_id: string): number;
|
|
3306
|
+
/**
|
|
3307
|
+
* Close a session of the host: the latest lease of the connection resets it, its channel closes the session. The
|
|
3308
|
+
* runtime keeps the connection, a later session sets it up again. An earlier lease changes nothing.
|
|
3309
|
+
*/
|
|
3310
|
+
closeSession(connection_id: string, lease: number): void;
|
|
3311
|
+
/**
|
|
3312
|
+
* Resolve once the catalog of a connection settled: no update runs and every relation that statements touched is
|
|
3313
|
+
* answered, e.g. after a statement of the shell. Resolves after the timeout as well (10 s by default), and at once
|
|
3314
|
+
* for an unknown connection: a catalog that doesn't follow never fails a statement.
|
|
3315
|
+
*/
|
|
3316
|
+
settleCatalog(connection_id: string, timeout_ms?: number | null): Promise<void>;
|
|
3317
|
+
}
|
|
3318
|
+
/**
|
|
3319
|
+
* A script (`dashql_script_*`)
|
|
3320
|
+
*/
|
|
3321
|
+
export class Script {
|
|
3322
|
+
free(): void;
|
|
3323
|
+
/**
|
|
3324
|
+
* The packed `ParsedScript`
|
|
3325
|
+
*/
|
|
3326
|
+
getParsed(): Uint8Array;
|
|
3327
|
+
/**
|
|
3328
|
+
* Format the script into a new script of another catalog
|
|
3329
|
+
*/
|
|
3330
|
+
formatInto(dialect: number, mode: number, max_width: number, indentation_width: number, debug_mode: boolean, keyword_case: number, parse_if_outdated: boolean, catalog: Catalog): Script;
|
|
3331
|
+
/**
|
|
3332
|
+
* Move the cursor, returns the packed `ScriptCursor`
|
|
3333
|
+
*/
|
|
3334
|
+
moveCursor(offset: number): Uint8Array;
|
|
3335
|
+
/**
|
|
3336
|
+
* The packed `ScriptDiff` from this script to a target script
|
|
3337
|
+
*/
|
|
3338
|
+
computeDiff(target: Script): Uint8Array;
|
|
3339
|
+
/**
|
|
3340
|
+
* The packed `AnalyzedScript`
|
|
3341
|
+
*/
|
|
3342
|
+
getAnalyzed(): Uint8Array;
|
|
3343
|
+
replaceText(text: string): void;
|
|
3344
|
+
/**
|
|
3345
|
+
* Compile the script into the packed `ScriptCompilationResult`
|
|
3346
|
+
*/
|
|
3347
|
+
compileQuery(dialect: number, mode: number, max_width: number, indentation_width: number, allow_extensions: boolean, parse_if_outdated: boolean): Uint8Array;
|
|
3348
|
+
/**
|
|
3349
|
+
* The packed `ScriptStatistics`
|
|
3350
|
+
*/
|
|
3351
|
+
getStatistics(): Uint8Array;
|
|
3352
|
+
/**
|
|
3353
|
+
* Insert text at a code point offset
|
|
3354
|
+
*/
|
|
3355
|
+
insertTextAt(offset: number, text: string): void;
|
|
3356
|
+
/**
|
|
3357
|
+
* The annotation of a statement as JSON, `{"preamble": [...], "tags": [{"name": ..., "lines": [...]}]}`
|
|
3358
|
+
*/
|
|
3359
|
+
readAnnotation(statement_id: number, parse_if_outdated: boolean): string;
|
|
3360
|
+
catalogEntryId(): number;
|
|
3361
|
+
/**
|
|
3362
|
+
* Erase a code point range
|
|
3363
|
+
*/
|
|
3364
|
+
eraseTextRange(offset: number, count: number): void;
|
|
3365
|
+
/**
|
|
3366
|
+
* Visualize the terminal query with a Vega-Lite spec in the text of the script, returns the UTF-8 offset
|
|
3367
|
+
* and length of the written tag
|
|
3368
|
+
*/
|
|
3369
|
+
rewriteVegaLite(spec: string, parse_if_outdated: boolean): Uint32Array;
|
|
3370
|
+
/**
|
|
3371
|
+
* Complete at the cursor, returns the packed `Completion`
|
|
3372
|
+
*/
|
|
3373
|
+
completeAtCursor(limit: number, keyword_case: number): Uint8Array;
|
|
3374
|
+
/**
|
|
3375
|
+
* The first parsed statement without its separator or surrounding trivia
|
|
3376
|
+
*/
|
|
3377
|
+
getStatementText(parse_if_outdated: boolean): string;
|
|
3378
|
+
/**
|
|
3379
|
+
* Replace the annotation of a statement, given as JSON like `readAnnotation` returns it. Returns the new
|
|
3380
|
+
* text, the script is not changed.
|
|
3381
|
+
*/
|
|
3382
|
+
rewriteAnnotation(statement_id: number, annotation: string, parse_if_outdated: boolean): string;
|
|
3383
|
+
/**
|
|
3384
|
+
* Can formatting represent every node?
|
|
3385
|
+
*/
|
|
3386
|
+
isFullyFormattable(dialect: number, mode: number, max_width: number, indentation_width: number, debug_mode: boolean, parse_if_outdated: boolean): boolean;
|
|
3387
|
+
/**
|
|
3388
|
+
* The AST node ids that formatting cannot represent
|
|
3389
|
+
*/
|
|
3390
|
+
getUnformattableNodes(dialect: number, mode: number, max_width: number, indentation_width: number, debug_mode: boolean, parse_if_outdated: boolean): Uint32Array;
|
|
3391
|
+
/**
|
|
3392
|
+
* Does a statement of the parsed script start with a call in a namespace with client functions, even if it doesn't parse?
|
|
3393
|
+
*/
|
|
3394
|
+
startsClientFunctionCall(): boolean;
|
|
3395
|
+
constructor(catalog: Catalog);
|
|
3396
|
+
parse(): void;
|
|
3397
|
+
/**
|
|
3398
|
+
* Format the script into a new script of the catalog of this script
|
|
3399
|
+
*/
|
|
3400
|
+
format(dialect: number, mode: number, max_width: number, indentation_width: number, debug_mode: boolean, keyword_case: number, parse_if_outdated: boolean): Script;
|
|
3401
|
+
analyze(parse_if_outdated: boolean): void;
|
|
3402
|
+
/**
|
|
3403
|
+
* The text, or a byte range of it
|
|
3404
|
+
*/
|
|
3405
|
+
toString(offset?: number | null, length?: number | null): string;
|
|
3406
|
+
}
|
|
3407
|
+
/**
|
|
3408
|
+
* A batch of analyzed scripts for `Catalog::loadScripts`
|
|
3409
|
+
*/
|
|
3410
|
+
export class ScriptBatch {
|
|
3411
|
+
free(): void;
|
|
3412
|
+
/**
|
|
3413
|
+
* Add the analysis of a script in a `CatalogLayer`
|
|
3414
|
+
*/
|
|
3415
|
+
add(script: Script, layer: number): void;
|
|
3416
|
+
constructor();
|
|
3417
|
+
}
|
|
3418
|
+
/**
|
|
3419
|
+
* An editor session (`dashql_script_session_*`). Shared, so that session lists can refer to it.
|
|
3420
|
+
*/
|
|
3421
|
+
export class ScriptSession {
|
|
3422
|
+
free(): void;
|
|
3423
|
+
/**
|
|
3424
|
+
* Format the script into a new script of another catalog
|
|
3425
|
+
*/
|
|
3426
|
+
formatInto(dialect: number, mode: number, max_width: number, indentation_width: number, debug_mode: boolean, keyword_case: number, parse_if_outdated: boolean, catalog: Catalog): Script;
|
|
3427
|
+
/**
|
|
3428
|
+
* The packed `ScriptDiff` from the session script to a target script
|
|
3429
|
+
*/
|
|
3430
|
+
computeDiff(target: Script): Uint8Array;
|
|
3431
|
+
/**
|
|
3432
|
+
* Replace the text, returns the packed `EditorUpdate`
|
|
3433
|
+
*/
|
|
3434
|
+
replaceText(expected_text_version: bigint, text: string): Uint8Array;
|
|
3435
|
+
textVersion(): bigint;
|
|
3436
|
+
/**
|
|
3437
|
+
* Compile the script, returns the packed `ScriptCompilationResult`
|
|
3438
|
+
*/
|
|
3439
|
+
compileQuery(dialect: number, mode: number, max_width: number, indentation_width: number, allow_extensions: boolean, parse_if_outdated: boolean): Uint8Array;
|
|
3440
|
+
/**
|
|
3441
|
+
* A session whose script takes an entry id that the catalogs of the module allocated before
|
|
3442
|
+
*/
|
|
3443
|
+
static withEntryId(catalog: Catalog, offset_unit: number, entry_id: number): ScriptSession;
|
|
3444
|
+
stateRevision(): bigint;
|
|
3445
|
+
/**
|
|
3446
|
+
* The annotation of a statement as JSON, like `Script.readAnnotation`
|
|
3447
|
+
*/
|
|
3448
|
+
readAnnotation(statement_id: number, parse_if_outdated: boolean): string;
|
|
3449
|
+
/**
|
|
3450
|
+
* Remove the `@flow` tag of the script. Returns the new text.
|
|
3451
|
+
*/
|
|
3452
|
+
removeVisFlow(parse_if_outdated: boolean): string;
|
|
3453
|
+
catalogEntryId(): number;
|
|
3454
|
+
catalogRevision(): bigint;
|
|
3455
|
+
/**
|
|
3456
|
+
* Remove the `@param` tags of an input of the script. Returns the new text.
|
|
3457
|
+
*/
|
|
3458
|
+
removeParamTag(name: string, parse_if_outdated: boolean): string;
|
|
3459
|
+
/**
|
|
3460
|
+
* Set the `@flow` tag of the script, its placement on the dataflow canvas: the position if both coordinates are
|
|
3461
|
+
* given, the width of the box and the height of its chart if given. Returns the new text.
|
|
3462
|
+
*/
|
|
3463
|
+
rewriteVisFlow(x: number | null | undefined, y: number | null | undefined, width: number | null | undefined, height: number | null | undefined, parse_if_outdated: boolean): string;
|
|
3464
|
+
dropFromCatalog(): void;
|
|
3465
|
+
/**
|
|
3466
|
+
* Publish the analysis into the session layer of the catalog
|
|
3467
|
+
*/
|
|
3468
|
+
loadIntoCatalog(): void;
|
|
3469
|
+
/**
|
|
3470
|
+
* Set the `@param` tag of an input of the script, its value. Returns the new text.
|
|
3471
|
+
*/
|
|
3472
|
+
rewriteParamTag(name: string, value: string, parse_if_outdated: boolean): string;
|
|
3473
|
+
/**
|
|
3474
|
+
* Set the `@board` tag of a query, negative rows and columns are absent. Returns the new text.
|
|
3475
|
+
*/
|
|
3476
|
+
rewriteVisBoard(statement_id: number, row: number, column: number, width: number, height: number, parse_if_outdated: boolean): string;
|
|
3477
|
+
/**
|
|
3478
|
+
* Complete at the primary cursor, returns the packed `Completion`
|
|
3479
|
+
*/
|
|
3480
|
+
completeAtCursor(limit: number, keyword_case: number): Uint8Array;
|
|
3481
|
+
/**
|
|
3482
|
+
* Replace the annotation of a statement, given as JSON. Returns the new text.
|
|
3483
|
+
*/
|
|
3484
|
+
rewriteAnnotation(statement_id: number, annotation: string, parse_if_outdated: boolean): string;
|
|
3485
|
+
/**
|
|
3486
|
+
* Move the primary cursor, returns the packed `EditorUpdate`
|
|
3487
|
+
*/
|
|
3488
|
+
setPrimaryCursor(expected_text_version: bigint, offset: bigint): Uint8Array;
|
|
3489
|
+
/**
|
|
3490
|
+
* Can formatting represent every node?
|
|
3491
|
+
*/
|
|
3492
|
+
isFullyFormattable(dialect: number, mode: number, max_width: number, indentation_width: number, debug_mode: boolean, parse_if_outdated: boolean): boolean;
|
|
3493
|
+
/**
|
|
3494
|
+
* Set the renderer tag of a query (`vegalite` with a JSON object, `markdown` with a template or
|
|
3495
|
+
* `table`), an empty kind removes it. Returns the new text.
|
|
3496
|
+
*/
|
|
3497
|
+
rewriteVisRenderer(statement_id: number, kind: string, body: string, parse_if_outdated: boolean): string;
|
|
3498
|
+
/**
|
|
3499
|
+
* The named table parameters of the analysis that reference scripts, with the script that each finds among
|
|
3500
|
+
* `names`: triples of the offset, the length and the script index (u32::MAX if none), in the offset unit
|
|
3501
|
+
*/
|
|
3502
|
+
findScriptReferences(names: string[]): Uint32Array;
|
|
3503
|
+
constructor(catalog: Catalog, offset_unit: number);
|
|
3504
|
+
text(): string;
|
|
3505
|
+
/**
|
|
3506
|
+
* Apply a packed `EditorEvent`, returns the packed `EditorUpdate`
|
|
3507
|
+
*/
|
|
3508
|
+
apply(event: Uint8Array): Uint8Array;
|
|
3509
|
+
/**
|
|
3510
|
+
* Format the script into a new script of the session catalog
|
|
3511
|
+
*/
|
|
3512
|
+
format(dialect: number, mode: number, max_width: number, indentation_width: number, debug_mode: boolean, keyword_case: number, parse_if_outdated: boolean): Script;
|
|
3513
|
+
/**
|
|
3514
|
+
* Analyze, returns the packed `EditorUpdate`
|
|
3515
|
+
*/
|
|
3516
|
+
analyze(): Uint8Array;
|
|
3517
|
+
}
|
|
3518
|
+
/**
|
|
3519
|
+
* A request to plan the scripts of a session across connections (`planner::SessionPlanRequest`)
|
|
3520
|
+
*/
|
|
3521
|
+
export class SessionPlanRequest {
|
|
3522
|
+
free(): void;
|
|
3523
|
+
/**
|
|
3524
|
+
* Add a script in session order, returns its index. A materialized result of the script is written to
|
|
3525
|
+
* `materialization_file` below the mount prefix, `s<index>.parquet` if absent.
|
|
3526
|
+
*/
|
|
3527
|
+
addScript(name: string, connection: number, session: ScriptSession, materialization_file?: string | null): number;
|
|
3528
|
+
/**
|
|
3529
|
+
* Plan the target scripts and what they need instead of the whole session
|
|
3530
|
+
*/
|
|
3531
|
+
setTargets(targets: Uint32Array): void;
|
|
3532
|
+
/**
|
|
3533
|
+
* Add an attachment, a Parquet file of the session that the table parameter `:name` reads, returns its index. The
|
|
3534
|
+
* stamp changes when the file changes, e.g. its size and modification time. The columns are absent if the host
|
|
3535
|
+
* didn't read them yet.
|
|
3536
|
+
*/
|
|
3537
|
+
addAttachment(name: string, file: string, stamp: string, columns?: string[] | null): number;
|
|
3538
|
+
/**
|
|
3539
|
+
* Add a connection, returns its index
|
|
3540
|
+
*/
|
|
3541
|
+
addConnection(id: string, local: boolean, catalog: Catalog, dialect: number, default_database: string, default_schema: string): number;
|
|
3542
|
+
/**
|
|
3543
|
+
* The scripts whose materialized results the host provides
|
|
3544
|
+
*/
|
|
3545
|
+
setMaterialized(materialized: Uint32Array): void;
|
|
3546
|
+
/**
|
|
3547
|
+
* The directory the host mounts materialized results in
|
|
3548
|
+
*/
|
|
3549
|
+
setMountPrefix(prefix: string): void;
|
|
3550
|
+
/**
|
|
3551
|
+
* The directory the host mounts the attachments in
|
|
3552
|
+
*/
|
|
3553
|
+
setAttachmentPrefix(prefix: string): void;
|
|
3554
|
+
constructor();
|
|
3555
|
+
}
|
|
3556
|
+
/**
|
|
3557
|
+
* A shell session on a catalog
|
|
3558
|
+
*/
|
|
3559
|
+
export class Shell {
|
|
3560
|
+
free(): void;
|
|
3561
|
+
setPrompt(text: string): ShellPromptResult;
|
|
3562
|
+
startQuery(query: string): ShellOperation;
|
|
3563
|
+
/**
|
|
3564
|
+
* Register dot commands, one name per line, returns the status
|
|
3565
|
+
*/
|
|
3566
|
+
setCommands(commands: string): number;
|
|
3567
|
+
cancelEffect(effect_id: bigint): ShellOperation;
|
|
3568
|
+
insertPrompt(text: string): ShellPromptResult;
|
|
3569
|
+
openTerminal(prompt: string): ShellTerminalResult;
|
|
3570
|
+
submitPrompt(): ShellOperation;
|
|
3571
|
+
/**
|
|
3572
|
+
* The history as length-prefixed (u32 little-endian) UTF-8 entries
|
|
3573
|
+
*/
|
|
3574
|
+
exportHistory(): Uint8Array;
|
|
3575
|
+
/**
|
|
3576
|
+
* Replace the history with exported entries, returns the status
|
|
3577
|
+
*/
|
|
3578
|
+
importHistory(data: Uint8Array): number;
|
|
3579
|
+
/**
|
|
3580
|
+
* Finish an effect with a `DashQLShellEffectCompletionStatus` and its data (for queries a `QueryResultTag` and a
|
|
3581
|
+
* status line or a preview of the result, a flag byte and the output for dot commands, the message for errors)
|
|
3582
|
+
*/
|
|
3583
|
+
completeEffect(effect_id: bigint, completion_status: number, data: Uint8Array): ShellOperation;
|
|
3584
|
+
/**
|
|
3585
|
+
* Complete at the cursor, throws if the completion fails
|
|
3586
|
+
*/
|
|
3587
|
+
completePrompt(limit: number): ShellCompletionCandidate[];
|
|
3588
|
+
applyCompletion(display_text: string, completion_text: string, target_offset: number, target_length: number): ShellPromptResult;
|
|
3589
|
+
movePromptLeft(): ShellPromptResult;
|
|
3590
|
+
/**
|
|
3591
|
+
* The `KeywordCase` of completions (1 is upper case)
|
|
3592
|
+
*/
|
|
3593
|
+
setKeywordCase(keyword_case: number): void;
|
|
3594
|
+
movePromptRight(): ShellPromptResult;
|
|
3595
|
+
/**
|
|
3596
|
+
* Consume a `DashQLShellPromptInput` with its text
|
|
3597
|
+
*/
|
|
3598
|
+
consumePromptInput(key: number, text: string): ShellPromptResult;
|
|
3599
|
+
deletePromptForward(): ShellPromptResult;
|
|
3600
|
+
finishTerminalQuery(output: string, error: boolean): ShellTerminalResult;
|
|
3601
|
+
/**
|
|
3602
|
+
* Consume a `DashQLShellPromptInput` with its text
|
|
3603
|
+
*/
|
|
3604
|
+
consumeTerminalInput(key: number, text: string): ShellTerminalResult;
|
|
3605
|
+
deletePromptBackward(): ShellPromptResult;
|
|
3606
|
+
renderTerminalStatus(message: string): ShellTerminalResult;
|
|
3607
|
+
/**
|
|
3608
|
+
* The completion list that the host shows over the terminal, undefined if there is none
|
|
3609
|
+
*/
|
|
3610
|
+
terminalCompletionList(): ShellCompletionList | undefined;
|
|
3611
|
+
/**
|
|
3612
|
+
* The color of the terminal prompt as 0xRRGGBB, bold in the default foreground color if undefined
|
|
3613
|
+
*/
|
|
3614
|
+
setTerminalPromptColor(rgb?: number | null): void;
|
|
3615
|
+
/**
|
|
3616
|
+
* The packed `Completion` of the completion list, undefined if there is none
|
|
3617
|
+
*/
|
|
3618
|
+
terminalCompletionBuffer(): Uint8Array | undefined;
|
|
3619
|
+
clearTerminalQueryProgress(): ShellTerminalResult;
|
|
3620
|
+
renderTerminalQueryProgress(message: string, advance_frame: boolean): ShellTerminalResult;
|
|
3621
|
+
/**
|
|
3622
|
+
* Create a shell on a catalog for a terminal width
|
|
3623
|
+
*/
|
|
3624
|
+
constructor(catalog: Catalog, terminal_columns: number, auto_qualify_non_default_database_tables: boolean);
|
|
3625
|
+
resize(terminal_columns: number): void;
|
|
3626
|
+
}
|
|
3627
|
+
/**
|
|
3628
|
+
* A completion candidate
|
|
3629
|
+
*/
|
|
3630
|
+
export class ShellCompletionCandidate {
|
|
3631
|
+
private constructor();
|
|
3632
|
+
free(): void;
|
|
3633
|
+
readonly displayText: string;
|
|
3634
|
+
/**
|
|
3635
|
+
* The UTF-8 byte length of the replaced text
|
|
3636
|
+
*/
|
|
3637
|
+
readonly targetLength: number;
|
|
3638
|
+
/**
|
|
3639
|
+
* The UTF-8 byte offset of the replaced text
|
|
3640
|
+
*/
|
|
3641
|
+
readonly targetOffset: number;
|
|
3642
|
+
readonly completionText: string;
|
|
3643
|
+
}
|
|
3644
|
+
/**
|
|
3645
|
+
* The completion list that the host shows over the terminal
|
|
3646
|
+
*/
|
|
3647
|
+
export class ShellCompletionList {
|
|
3648
|
+
private constructor();
|
|
3649
|
+
free(): void;
|
|
3650
|
+
/**
|
|
3651
|
+
* The terminal column of the start of the replaced text
|
|
3652
|
+
*/
|
|
3653
|
+
readonly anchorColumn: number;
|
|
3654
|
+
/**
|
|
3655
|
+
* The index of the selected catalog object of the selected candidate
|
|
3656
|
+
*/
|
|
3657
|
+
readonly variant: number;
|
|
3658
|
+
/**
|
|
3659
|
+
* Changes when the candidates change, `terminalCompletionBuffer` only has to be read then
|
|
3660
|
+
*/
|
|
3661
|
+
readonly revision: bigint;
|
|
3662
|
+
/**
|
|
3663
|
+
* The index of the selected candidate
|
|
3664
|
+
*/
|
|
3665
|
+
readonly selection: number;
|
|
3666
|
+
}
|
|
3667
|
+
/**
|
|
3668
|
+
* The result of an operation: rendered output, an effect or an error
|
|
3669
|
+
*/
|
|
3670
|
+
export class ShellOperation {
|
|
3671
|
+
private constructor();
|
|
3672
|
+
free(): void;
|
|
3673
|
+
/**
|
|
3674
|
+
* The effect type of a pending operation (`DashQLShellEffectType`)
|
|
3675
|
+
*/
|
|
3676
|
+
readonly effectType: number | undefined;
|
|
3677
|
+
/**
|
|
3678
|
+
* The effect payload of a pending operation: the query or the dot command
|
|
3679
|
+
*/
|
|
3680
|
+
readonly effectPayload: string | undefined;
|
|
3681
|
+
/**
|
|
3682
|
+
* The data as text (output or error message)
|
|
3683
|
+
*/
|
|
3684
|
+
readonly text: string;
|
|
3685
|
+
/**
|
|
3686
|
+
* The `DashQLShellStatus`, `PENDING` if the operation waits for an effect
|
|
3687
|
+
*/
|
|
3688
|
+
readonly status: number;
|
|
3689
|
+
/**
|
|
3690
|
+
* The effect id of a pending operation
|
|
3691
|
+
*/
|
|
3692
|
+
readonly effectId: bigint | undefined;
|
|
3693
|
+
}
|
|
3694
|
+
/**
|
|
3695
|
+
* A prompt after an input
|
|
3696
|
+
*/
|
|
3697
|
+
export class ShellPromptResult {
|
|
3698
|
+
private constructor();
|
|
3699
|
+
free(): void;
|
|
3700
|
+
/**
|
|
3701
|
+
* The UTF-8 byte offset of the cursor
|
|
3702
|
+
*/
|
|
3703
|
+
readonly cursorByteOffset: number;
|
|
3704
|
+
readonly text: string;
|
|
3705
|
+
/**
|
|
3706
|
+
* The `DashQLShellPromptAction`
|
|
3707
|
+
*/
|
|
3708
|
+
readonly action: number;
|
|
3709
|
+
/**
|
|
3710
|
+
* The `DashQLShellStatus`
|
|
3711
|
+
*/
|
|
3712
|
+
readonly status: number;
|
|
3713
|
+
/**
|
|
3714
|
+
* The error message if the status is not OK
|
|
3715
|
+
*/
|
|
3716
|
+
readonly message: string;
|
|
3717
|
+
/**
|
|
3718
|
+
* The prompt revision, bumped by every edit
|
|
3719
|
+
*/
|
|
3720
|
+
readonly revision: bigint;
|
|
3721
|
+
}
|
|
3722
|
+
/**
|
|
3723
|
+
* Terminal output
|
|
3724
|
+
*/
|
|
3725
|
+
export class ShellTerminalResult {
|
|
3726
|
+
private constructor();
|
|
3727
|
+
free(): void;
|
|
3728
|
+
/**
|
|
3729
|
+
* The VT100 output, or the error message if the status is not OK
|
|
3730
|
+
*/
|
|
3731
|
+
readonly data: string;
|
|
3732
|
+
/**
|
|
3733
|
+
* The `DashQLShellPromptAction`
|
|
3734
|
+
*/
|
|
3735
|
+
readonly action: number;
|
|
3736
|
+
/**
|
|
3737
|
+
* The `DashQLShellStatus`
|
|
3738
|
+
*/
|
|
3739
|
+
readonly status: number;
|
|
3740
|
+
}
|
|
3741
|
+
/**
|
|
3742
|
+
* The table parameters of a session (`table_parameters::TableParameters`)
|
|
3743
|
+
*/
|
|
3744
|
+
export class TableParameters {
|
|
3745
|
+
free(): void;
|
|
3746
|
+
constructor();
|
|
3747
|
+
/**
|
|
3748
|
+
* Give the published table parameters to a session that is no script of the session, e.g. a draft
|
|
3749
|
+
*/
|
|
3750
|
+
attach(session: ScriptSession): boolean;
|
|
3751
|
+
/**
|
|
3752
|
+
* Derive the table parameters from the analyses of the scripts and the attachments of a request and give them to
|
|
3753
|
+
* the sessions of the scripts. Returns the indexes of the scripts whose analysis is outdated by them, every script
|
|
3754
|
+
* if they changed. A script whose analysis lags behind its text keeps its previous result.
|
|
3755
|
+
*/
|
|
3756
|
+
publish(request: SessionPlanRequest): Uint32Array;
|
|
3757
|
+
}
|
|
3758
|
+
/**
|
|
3759
|
+
* The session of a script of a workbook of a runtime, shared with the workbook. It reads the script and computes texts
|
|
3760
|
+
* from it, it never changes the text, the analysis or the cursor of the session: the editors change it through the
|
|
3761
|
+
* runtime (`Runtime.applyEditorEvent`), which writes and publishes what changed. A session that the runtime holds
|
|
3762
|
+
* borrowed fails the call instead of panicking.
|
|
3763
|
+
*/
|
|
3764
|
+
export class WorkbookScriptSession {
|
|
3765
|
+
private constructor();
|
|
3766
|
+
free(): void;
|
|
3767
|
+
/**
|
|
3768
|
+
* Format the script into a new script of another catalog
|
|
3769
|
+
*/
|
|
3770
|
+
formatInto(dialect: number, mode: number, max_width: number, indentation_width: number, debug_mode: boolean, keyword_case: number, parse_if_outdated: boolean, catalog: Catalog): Script;
|
|
3771
|
+
/**
|
|
3772
|
+
* The packed `ScriptDiff` from the session script to a target script
|
|
3773
|
+
*/
|
|
3774
|
+
computeDiff(target: Script): Uint8Array;
|
|
3775
|
+
textVersion(): bigint;
|
|
3776
|
+
/**
|
|
3777
|
+
* Compile the script, returns the packed `ScriptCompilationResult`
|
|
3778
|
+
*/
|
|
3779
|
+
compileQuery(dialect: number, mode: number, max_width: number, indentation_width: number, allow_extensions: boolean, parse_if_outdated: boolean): Uint8Array;
|
|
3780
|
+
stateRevision(): bigint;
|
|
3781
|
+
/**
|
|
3782
|
+
* The annotation of a statement as JSON, like `Script.readAnnotation`
|
|
3783
|
+
*/
|
|
3784
|
+
readAnnotation(statement_id: number, parse_if_outdated: boolean): string;
|
|
3785
|
+
/**
|
|
3786
|
+
* Remove the `@flow` tag of the script. Returns the new text, the session stays.
|
|
3787
|
+
*/
|
|
3788
|
+
removeVisFlow(parse_if_outdated: boolean): string;
|
|
3789
|
+
catalogEntryId(): number;
|
|
3790
|
+
catalogRevision(): bigint;
|
|
3791
|
+
/**
|
|
3792
|
+
* Remove the `@param` tags of an input of the script. Returns the new text, the session stays.
|
|
3793
|
+
*/
|
|
3794
|
+
removeParamTag(name: string, parse_if_outdated: boolean): string;
|
|
3795
|
+
/**
|
|
3796
|
+
* Set the `@flow` tag of the script. Returns the new text, the session stays.
|
|
3797
|
+
*/
|
|
3798
|
+
rewriteVisFlow(x: number | null | undefined, y: number | null | undefined, width: number | null | undefined, height: number | null | undefined, parse_if_outdated: boolean): string;
|
|
3799
|
+
/**
|
|
3800
|
+
* Set the `@param` tag of an input of the script. Returns the new text, the session stays.
|
|
3801
|
+
*/
|
|
3802
|
+
rewriteParamTag(name: string, value: string, parse_if_outdated: boolean): string;
|
|
3803
|
+
/**
|
|
3804
|
+
* Set the `@board` tag of a query, negative rows and columns are absent. Returns the new text, the session stays.
|
|
3805
|
+
*/
|
|
3806
|
+
rewriteVisBoard(statement_id: number, row: number, column: number, width: number, height: number, parse_if_outdated: boolean): string;
|
|
3807
|
+
/**
|
|
3808
|
+
* Complete at the primary cursor, returns the packed `Completion`
|
|
3809
|
+
*/
|
|
3810
|
+
completeAtCursor(limit: number, keyword_case: number): Uint8Array;
|
|
3811
|
+
/**
|
|
3812
|
+
* Replace the annotation of a statement, given as JSON. Returns the new text, the session stays.
|
|
3813
|
+
*/
|
|
3814
|
+
rewriteAnnotation(statement_id: number, annotation: string, parse_if_outdated: boolean): string;
|
|
3815
|
+
/**
|
|
3816
|
+
* Can formatting represent every node?
|
|
3817
|
+
*/
|
|
3818
|
+
isFullyFormattable(dialect: number, mode: number, max_width: number, indentation_width: number, debug_mode: boolean, parse_if_outdated: boolean): boolean;
|
|
3819
|
+
/**
|
|
3820
|
+
* Set the renderer tag of a query, an empty kind removes it. Returns the new text, the session stays.
|
|
3821
|
+
*/
|
|
3822
|
+
rewriteVisRenderer(statement_id: number, kind: string, body: string, parse_if_outdated: boolean): string;
|
|
3823
|
+
/**
|
|
3824
|
+
* See `ScriptSession.findScriptReferences`
|
|
3825
|
+
*/
|
|
3826
|
+
findScriptReferences(names: string[]): Uint32Array;
|
|
3827
|
+
text(): string;
|
|
3828
|
+
/**
|
|
3829
|
+
* Format the script into a new script of the session catalog
|
|
3830
|
+
*/
|
|
3831
|
+
format(dialect: number, mode: number, max_width: number, indentation_width: number, debug_mode: boolean, keyword_case: number, parse_if_outdated: boolean): Script;
|
|
3832
|
+
}
|
|
3833
|
+
|
|
3834
|
+
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
3835
|
+
|
|
3836
|
+
export interface InitOutput {
|
|
3837
|
+
readonly memory: WebAssembly.Memory;
|
|
3838
|
+
readonly __wbg_runtime_free: (a: number, b: number) => void;
|
|
3839
|
+
readonly runtime_allocateId: (a: number) => [number, number, number];
|
|
3840
|
+
readonly runtime_analyzeTable: (a: number, b: number, c: number, d: any) => [number, number, number];
|
|
3841
|
+
readonly runtime_answerExternalChange: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
3842
|
+
readonly runtime_applyEditorEvent: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number, number];
|
|
3843
|
+
readonly runtime_attachFiles: (a: number, b: number, c: number, d: any) => [number, number, number];
|
|
3844
|
+
readonly runtime_attachTableParameters: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
3845
|
+
readonly runtime_authenticateSalesforce: (a: number, b: number, c: number, d: any, e: number, f: any) => [number, number, number];
|
|
3846
|
+
readonly runtime_cancelQuery: (a: number, b: number) => [number, number, number];
|
|
3847
|
+
readonly runtime_cancelSetup: (a: number, b: number, c: number) => void;
|
|
3848
|
+
readonly runtime_catalog: (a: number, b: number, c: number) => number;
|
|
3849
|
+
readonly runtime_catalogId: (a: number, b: number, c: number) => [number, number];
|
|
3850
|
+
readonly runtime_checkWorkbookFolders: (a: number, b: number, c: number) => void;
|
|
3851
|
+
readonly runtime_closeSession: (a: number, b: number, c: number, d: number) => void;
|
|
3852
|
+
readonly runtime_commitImport: (a: number, b: number, c: any, d: any) => [number, number, number];
|
|
3853
|
+
readonly runtime_connectionParamsLoginHint: (a: any) => [number, number, number, number];
|
|
3854
|
+
readonly runtime_connectionParamsShareEqual: (a: any, b: any) => number;
|
|
3855
|
+
readonly runtime_connectionParamsWithoutDraftRows: (a: any) => [number, number, number];
|
|
3856
|
+
readonly runtime_create: (a: any) => number;
|
|
3857
|
+
readonly runtime_defaultConnectionParams: (a: number) => [number, number, number];
|
|
3858
|
+
readonly runtime_deleteInvalidWorkbook: (a: number, b: number, c: number) => any;
|
|
3859
|
+
readonly runtime_dispatch: (a: number, b: any, c: any) => any;
|
|
3860
|
+
readonly runtime_dropImport: (a: number, b: number) => void;
|
|
3861
|
+
readonly runtime_executeQuery: (a: number, b: number, c: number, d: any, e: any, f: any) => [number, number, number];
|
|
3862
|
+
readonly runtime_exportConnection: (a: number, b: number, c: number, d: any) => [number, number, number];
|
|
3863
|
+
readonly runtime_exportWorkbook: (a: number, b: number, c: number, d: any, e: any) => [number, number, number];
|
|
3864
|
+
readonly runtime_exportedResults: (a: number, b: number, c: number) => any;
|
|
3865
|
+
readonly runtime_flushCacheWrites: (a: number) => any;
|
|
3866
|
+
readonly runtime_followQueryProgress: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
3867
|
+
readonly runtime_functionScriptText: (a: number, b: number, c: number) => [number, number, number, number];
|
|
3868
|
+
readonly runtime_hyperCloudDefaultDatabaseName: () => [number, number];
|
|
3869
|
+
readonly runtime_isAnalysisOutdated: (a: number, b: number) => number;
|
|
3870
|
+
readonly runtime_isWorkbookHeld: (a: number, b: number, c: number) => number;
|
|
3871
|
+
readonly runtime_matchesStoredScripts: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
|
|
3872
|
+
readonly runtime_migrateStorage: (a: any, b: any) => any;
|
|
3873
|
+
readonly runtime_migrateWorkbookFolder: (a: number, b: number, c: number) => any;
|
|
3874
|
+
readonly runtime_openSession: (a: number, b: number, c: number) => number;
|
|
3875
|
+
readonly runtime_previewResult: (a: number, b: number, c: number) => [number, number, number];
|
|
3876
|
+
readonly runtime_queryProgressRecording: (a: number, b: number) => [number, number, number, number];
|
|
3877
|
+
readonly runtime_readImport: (a: number, b: any) => any;
|
|
3878
|
+
readonly runtime_refreshAttachments: (a: number, b: number, c: number) => any;
|
|
3879
|
+
readonly runtime_refreshCatalog: (a: number, b: number, c: number, d: number) => void;
|
|
3880
|
+
readonly runtime_renameAttachment: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number];
|
|
3881
|
+
readonly runtime_restore: (a: number, b: any) => [number, number, number];
|
|
3882
|
+
readonly runtime_restoreWorkbook: (a: number, b: number, c: number) => [number, number, number];
|
|
3883
|
+
readonly runtime_resultKeys: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
|
|
3884
|
+
readonly runtime_resync: (a: number, b: number, c: number, d: any) => [number, number];
|
|
3885
|
+
readonly runtime_retrySave: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
3886
|
+
readonly runtime_revealConnectionSecrets: (a: number, b: number, c: number) => [number, number, number];
|
|
3887
|
+
readonly runtime_runCatalogLoader: (a: number, b: number) => void;
|
|
3888
|
+
readonly runtime_runScript: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
|
|
3889
|
+
readonly runtime_runWorkbook: (a: number, b: number, c: number, d: number, e: any) => [number, number, number];
|
|
3890
|
+
readonly runtime_salesforceCatalogDatabase: () => [number, number];
|
|
3891
|
+
readonly runtime_sanitizeConnectionParams: (a: any, b: number) => [number, number, number];
|
|
3892
|
+
readonly runtime_saveConnection: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
3893
|
+
readonly runtime_scriptSession: (a: number, b: number) => number;
|
|
3894
|
+
readonly runtime_setProgressLayout: (a: number, b: number) => [number, number];
|
|
3895
|
+
readonly runtime_setUpOpenedWorkbook: (a: number, b: number, c: number) => void;
|
|
3896
|
+
readonly runtime_settleCatalog: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
3897
|
+
readonly runtime_setupConnection: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
3898
|
+
readonly runtime_shutdown: (a: number) => any;
|
|
3899
|
+
readonly runtime_stopRun: (a: number, b: number, c: number) => void;
|
|
3900
|
+
readonly runtime_storage: (a: number, b: any) => [number, number, number];
|
|
3901
|
+
readonly runtime_storageDiscardWrites: (a: number, b: number, c: number) => void;
|
|
3902
|
+
readonly runtime_storageHold: (a: number, b: any, c: number, d: number) => [number, number];
|
|
3903
|
+
readonly runtime_storageRelease: (a: number, b: any, c: number, d: number) => [number, number];
|
|
3904
|
+
readonly runtime_storageStatistics: (a: number, b: number, c: number) => [number, number, number];
|
|
3905
|
+
readonly runtime_storageVersions: () => [number, number, number];
|
|
3906
|
+
readonly runtime_takeChanges: (a: number) => [number, number, number];
|
|
3907
|
+
readonly runtime_testCatalog: (a: number, b: number, c: number) => number;
|
|
3908
|
+
readonly runtime_testHold: (a: number, b: number, c: number, d: any) => [number, number, number];
|
|
3909
|
+
readonly runtime_views: (a: number, b: number, c: number, d: any, e: any) => [number, number, number];
|
|
3910
|
+
readonly runtime_watchProfile: (a: number, b: number, c: number) => [number, number];
|
|
3911
|
+
readonly runtime_workbookTables: () => [number, number, number];
|
|
3912
|
+
readonly __wbg_queryprogressfollower_free: (a: number, b: number) => void;
|
|
3913
|
+
readonly queryprogressfollower_new: (a: number) => [number, number, number];
|
|
3914
|
+
readonly replayQueryProgress: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
3915
|
+
readonly __wbg_catalog_free: (a: number, b: number) => void;
|
|
3916
|
+
readonly __wbg_queryprofile_free: (a: number, b: number) => void;
|
|
3917
|
+
readonly __wbg_script_free: (a: number, b: number) => void;
|
|
3918
|
+
readonly __wbg_scriptbatch_free: (a: number, b: number) => void;
|
|
3919
|
+
readonly __wbg_scriptsession_free: (a: number, b: number) => void;
|
|
3920
|
+
readonly __wbg_sessionplanrequest_free: (a: number, b: number) => void;
|
|
3921
|
+
readonly __wbg_shell_free: (a: number, b: number) => void;
|
|
3922
|
+
readonly __wbg_shellcompletioncandidate_free: (a: number, b: number) => void;
|
|
3923
|
+
readonly __wbg_shellcompletionlist_free: (a: number, b: number) => void;
|
|
3924
|
+
readonly __wbg_shelloperation_free: (a: number, b: number) => void;
|
|
3925
|
+
readonly __wbg_shellpromptresult_free: (a: number, b: number) => void;
|
|
3926
|
+
readonly __wbg_shellterminalresult_free: (a: number, b: number) => void;
|
|
3927
|
+
readonly __wbg_tableparameters_free: (a: number, b: number) => void;
|
|
3928
|
+
readonly __wbg_workbookscriptsession_free: (a: number, b: number) => void;
|
|
3929
|
+
readonly catalog_absentRelations: (a: number) => [number, number];
|
|
3930
|
+
readonly catalog_allocateEntryId: (a: number) => number;
|
|
3931
|
+
readonly catalog_clear: (a: number) => [number, number];
|
|
3932
|
+
readonly catalog_containsEntryId: (a: number, b: number) => number;
|
|
3933
|
+
readonly catalog_describeEntries: (a: number) => [number, number];
|
|
3934
|
+
readonly catalog_describeEntriesOf: (a: number, b: number) => [number, number];
|
|
3935
|
+
readonly catalog_descriptorBytes: (a: number, b: number) => [number, number];
|
|
3936
|
+
readonly catalog_dropClientFunctions: (a: number, b: number, c: number) => [number, number];
|
|
3937
|
+
readonly catalog_dropDescriptor: (a: number, b: number) => [number, number];
|
|
3938
|
+
readonly catalog_dropScript: (a: number, b: number) => [number, number];
|
|
3939
|
+
readonly catalog_flatten: (a: number) => [number, number];
|
|
3940
|
+
readonly catalog_isReadOnly: (a: number) => number;
|
|
3941
|
+
readonly catalog_loadScript: (a: number, b: number, c: number) => [number, number];
|
|
3942
|
+
readonly catalog_loadScripts: (a: number, b: number) => [number, number];
|
|
3943
|
+
readonly catalog_new: () => number;
|
|
3944
|
+
readonly catalog_registerClientFunctions: (a: number, b: number, c: number) => [number, number, number, number];
|
|
3945
|
+
readonly catalog_replaceDescriptor: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
3946
|
+
readonly catalog_replaceTables: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
3947
|
+
readonly catalog_statistics: (a: number) => [number, number];
|
|
3948
|
+
readonly catalog_version: (a: number) => number;
|
|
3949
|
+
readonly checkScriptReferences: (a: number) => [number, number];
|
|
3950
|
+
readonly collectSessionInputs: (a: number) => [number, number];
|
|
3951
|
+
readonly deriveSessionDataflow: (a: number) => [number, number];
|
|
3952
|
+
readonly inputLiteral: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
3953
|
+
readonly installPanicHook: () => void;
|
|
3954
|
+
readonly planSession: (a: number) => [number, number];
|
|
3955
|
+
readonly processBatch: (a: number, b: number) => [number, number, number, number];
|
|
3956
|
+
readonly queryprofile_applyEvents: (a: number, b: number, c: number) => [number, number, number, number];
|
|
3957
|
+
readonly queryprofile_applyTrinoQueryInfo: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
3958
|
+
readonly queryprofile_applyTrinoStatementStats: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
3959
|
+
readonly queryprofile_computeLayout: (a: number) => void;
|
|
3960
|
+
readonly queryprofile_configure: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number) => void;
|
|
3961
|
+
readonly queryprofile_loadHyperPlan: (a: number, b: number, c: number) => [number, number];
|
|
3962
|
+
readonly queryprofile_loadTrinoPlan: (a: number, b: number, c: number) => [number, number];
|
|
3963
|
+
readonly queryprofile_new: () => number;
|
|
3964
|
+
readonly queryprofile_pack: (a: number) => [number, number];
|
|
3965
|
+
readonly queryprofile_reset: (a: number) => void;
|
|
3966
|
+
readonly queryprofile_resetExecution: (a: number) => void;
|
|
3967
|
+
readonly queryprofile_snapshotEvents: (a: number) => [number, number];
|
|
3968
|
+
readonly queryprofile_startQuery: (a: number, b: number) => void;
|
|
3969
|
+
readonly queryprofile_structureVersion: (a: number) => number;
|
|
3970
|
+
readonly quoteColumnName: (a: number, b: number) => [number, number];
|
|
3971
|
+
readonly quoteIdentifier: (a: number, b: number) => [number, number];
|
|
3972
|
+
readonly script_analyze: (a: number, b: number) => [number, number];
|
|
3973
|
+
readonly script_catalogEntryId: (a: number) => number;
|
|
3974
|
+
readonly script_compileQuery: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number];
|
|
3975
|
+
readonly script_completeAtCursor: (a: number, b: number, c: number) => [number, number, number, number];
|
|
3976
|
+
readonly script_computeDiff: (a: number, b: number) => [number, number, number, number];
|
|
3977
|
+
readonly script_eraseTextRange: (a: number, b: number, c: number) => void;
|
|
3978
|
+
readonly script_format: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number, number];
|
|
3979
|
+
readonly script_formatInto: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number, number];
|
|
3980
|
+
readonly script_getAnalyzed: (a: number) => [number, number, number, number];
|
|
3981
|
+
readonly script_getParsed: (a: number) => [number, number, number, number];
|
|
3982
|
+
readonly script_getStatementText: (a: number, b: number) => [number, number, number, number];
|
|
3983
|
+
readonly script_getStatistics: (a: number) => [number, number];
|
|
3984
|
+
readonly script_getUnformattableNodes: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number, number];
|
|
3985
|
+
readonly script_insertTextAt: (a: number, b: number, c: number, d: number) => void;
|
|
3986
|
+
readonly script_isFullyFormattable: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number];
|
|
3987
|
+
readonly script_moveCursor: (a: number, b: number) => [number, number];
|
|
3988
|
+
readonly script_new: (a: number) => number;
|
|
3989
|
+
readonly script_parse: (a: number) => void;
|
|
3990
|
+
readonly script_readAnnotation: (a: number, b: number, c: number) => [number, number, number, number];
|
|
3991
|
+
readonly script_replaceText: (a: number, b: number, c: number) => void;
|
|
3992
|
+
readonly script_rewriteAnnotation: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
|
|
3993
|
+
readonly script_rewriteVegaLite: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
3994
|
+
readonly script_startsClientFunctionCall: (a: number) => number;
|
|
3995
|
+
readonly script_toString: (a: number, b: number, c: number) => [number, number];
|
|
3996
|
+
readonly scriptbatch_add: (a: number, b: number, c: number) => [number, number];
|
|
3997
|
+
readonly scriptbatch_new: () => number;
|
|
3998
|
+
readonly scriptsession_analyze: (a: number) => [number, number];
|
|
3999
|
+
readonly scriptsession_apply: (a: number, b: number, c: number) => [number, number];
|
|
4000
|
+
readonly scriptsession_catalogEntryId: (a: number) => number;
|
|
4001
|
+
readonly scriptsession_catalogRevision: (a: number) => bigint;
|
|
4002
|
+
readonly scriptsession_compileQuery: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number];
|
|
4003
|
+
readonly scriptsession_completeAtCursor: (a: number, b: number, c: number) => [number, number, number, number];
|
|
4004
|
+
readonly scriptsession_computeDiff: (a: number, b: number) => [number, number, number, number];
|
|
4005
|
+
readonly scriptsession_dropFromCatalog: (a: number) => [number, number];
|
|
4006
|
+
readonly scriptsession_findScriptReferences: (a: number, b: number, c: number) => [number, number];
|
|
4007
|
+
readonly scriptsession_format: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number, number];
|
|
4008
|
+
readonly scriptsession_formatInto: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number, number];
|
|
4009
|
+
readonly scriptsession_isFullyFormattable: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number];
|
|
4010
|
+
readonly scriptsession_loadIntoCatalog: (a: number) => [number, number];
|
|
4011
|
+
readonly scriptsession_new: (a: number, b: number) => [number, number, number];
|
|
4012
|
+
readonly scriptsession_readAnnotation: (a: number, b: number, c: number) => [number, number, number, number];
|
|
4013
|
+
readonly scriptsession_removeParamTag: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
4014
|
+
readonly scriptsession_removeVisFlow: (a: number, b: number) => [number, number, number, number];
|
|
4015
|
+
readonly scriptsession_replaceText: (a: number, b: bigint, c: number, d: number) => [number, number];
|
|
4016
|
+
readonly scriptsession_rewriteAnnotation: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
|
|
4017
|
+
readonly scriptsession_rewriteParamTag: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number, number];
|
|
4018
|
+
readonly scriptsession_rewriteVisBoard: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number, number];
|
|
4019
|
+
readonly scriptsession_rewriteVisFlow: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number, number];
|
|
4020
|
+
readonly scriptsession_rewriteVisRenderer: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number, number];
|
|
4021
|
+
readonly scriptsession_setPrimaryCursor: (a: number, b: bigint, c: bigint) => [number, number];
|
|
4022
|
+
readonly scriptsession_stateRevision: (a: number) => bigint;
|
|
4023
|
+
readonly scriptsession_text: (a: number) => [number, number];
|
|
4024
|
+
readonly scriptsession_textVersion: (a: number) => bigint;
|
|
4025
|
+
readonly scriptsession_withEntryId: (a: number, b: number, c: number) => [number, number, number];
|
|
4026
|
+
readonly sessionplanrequest_addAttachment: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => number;
|
|
4027
|
+
readonly sessionplanrequest_addConnection: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => number;
|
|
4028
|
+
readonly sessionplanrequest_addScript: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
|
|
4029
|
+
readonly sessionplanrequest_new: () => number;
|
|
4030
|
+
readonly sessionplanrequest_setAttachmentPrefix: (a: number, b: number, c: number) => void;
|
|
4031
|
+
readonly sessionplanrequest_setMaterialized: (a: number, b: number, c: number) => void;
|
|
4032
|
+
readonly sessionplanrequest_setMountPrefix: (a: number, b: number, c: number) => void;
|
|
4033
|
+
readonly sessionplanrequest_setTargets: (a: number, b: number, c: number) => void;
|
|
4034
|
+
readonly shell_applyCompletion: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
|
|
4035
|
+
readonly shell_cancelEffect: (a: number, b: bigint) => number;
|
|
4036
|
+
readonly shell_clearTerminalQueryProgress: (a: number) => number;
|
|
4037
|
+
readonly shell_completeEffect: (a: number, b: bigint, c: number, d: number, e: number) => number;
|
|
4038
|
+
readonly shell_completePrompt: (a: number, b: number) => [number, number, number, number];
|
|
4039
|
+
readonly shell_consumePromptInput: (a: number, b: number, c: number, d: number) => number;
|
|
4040
|
+
readonly shell_consumeTerminalInput: (a: number, b: number, c: number, d: number) => number;
|
|
4041
|
+
readonly shell_deletePromptBackward: (a: number) => number;
|
|
4042
|
+
readonly shell_deletePromptForward: (a: number) => number;
|
|
4043
|
+
readonly shell_exportHistory: (a: number) => [number, number];
|
|
4044
|
+
readonly shell_finishTerminalQuery: (a: number, b: number, c: number, d: number) => number;
|
|
4045
|
+
readonly shell_importHistory: (a: number, b: number, c: number) => number;
|
|
4046
|
+
readonly shell_insertPrompt: (a: number, b: number, c: number) => number;
|
|
4047
|
+
readonly shell_movePromptLeft: (a: number) => number;
|
|
4048
|
+
readonly shell_movePromptRight: (a: number) => number;
|
|
4049
|
+
readonly shell_new: (a: number, b: number, c: number) => number;
|
|
4050
|
+
readonly shell_openTerminal: (a: number, b: number, c: number) => number;
|
|
4051
|
+
readonly shell_renderTerminalQueryProgress: (a: number, b: number, c: number, d: number) => number;
|
|
4052
|
+
readonly shell_renderTerminalStatus: (a: number, b: number, c: number) => number;
|
|
4053
|
+
readonly shell_resize: (a: number, b: number) => void;
|
|
4054
|
+
readonly shell_setCommands: (a: number, b: number, c: number) => number;
|
|
4055
|
+
readonly shell_setKeywordCase: (a: number, b: number) => void;
|
|
4056
|
+
readonly shell_setPrompt: (a: number, b: number, c: number) => number;
|
|
4057
|
+
readonly shell_setTerminalPromptColor: (a: number, b: number) => void;
|
|
4058
|
+
readonly shell_startQuery: (a: number, b: number, c: number) => number;
|
|
4059
|
+
readonly shell_submitPrompt: (a: number) => number;
|
|
4060
|
+
readonly shell_terminalCompletionBuffer: (a: number) => [number, number];
|
|
4061
|
+
readonly shell_terminalCompletionList: (a: number) => number;
|
|
4062
|
+
readonly shellcompletioncandidate_completionText: (a: number) => [number, number];
|
|
4063
|
+
readonly shellcompletioncandidate_displayText: (a: number) => [number, number];
|
|
4064
|
+
readonly shellcompletioncandidate_targetLength: (a: number) => number;
|
|
4065
|
+
readonly shellcompletioncandidate_targetOffset: (a: number) => number;
|
|
4066
|
+
readonly shellcompletionlist_anchorColumn: (a: number) => number;
|
|
4067
|
+
readonly shellcompletionlist_revision: (a: number) => bigint;
|
|
4068
|
+
readonly shellcompletionlist_selection: (a: number) => number;
|
|
4069
|
+
readonly shellcompletionlist_variant: (a: number) => number;
|
|
4070
|
+
readonly shelloperation_effectId: (a: number) => [number, bigint];
|
|
4071
|
+
readonly shelloperation_effectPayload: (a: number) => [number, number];
|
|
4072
|
+
readonly shelloperation_effectType: (a: number) => number;
|
|
4073
|
+
readonly shelloperation_status: (a: number) => number;
|
|
4074
|
+
readonly shelloperation_text: (a: number) => [number, number];
|
|
4075
|
+
readonly shellpromptresult_action: (a: number) => number;
|
|
4076
|
+
readonly shellpromptresult_message: (a: number) => [number, number];
|
|
4077
|
+
readonly shellpromptresult_status: (a: number) => number;
|
|
4078
|
+
readonly shellpromptresult_text: (a: number) => [number, number];
|
|
4079
|
+
readonly shellterminalresult_action: (a: number) => number;
|
|
4080
|
+
readonly shellterminalresult_data: (a: number) => [number, number];
|
|
4081
|
+
readonly shellterminalresult_status: (a: number) => number;
|
|
4082
|
+
readonly tableparameters_attach: (a: number, b: number) => number;
|
|
4083
|
+
readonly tableparameters_new: () => number;
|
|
4084
|
+
readonly tableparameters_publish: (a: number, b: number) => [number, number];
|
|
4085
|
+
readonly textChange: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
4086
|
+
readonly touchedRelations: (a: number, b: number) => [number, number];
|
|
4087
|
+
readonly workbookscriptsession_catalogEntryId: (a: number) => [number, number, number];
|
|
4088
|
+
readonly workbookscriptsession_catalogRevision: (a: number) => [bigint, number, number];
|
|
4089
|
+
readonly workbookscriptsession_compileQuery: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number, number];
|
|
4090
|
+
readonly workbookscriptsession_completeAtCursor: (a: number, b: number, c: number) => [number, number, number, number];
|
|
4091
|
+
readonly workbookscriptsession_computeDiff: (a: number, b: number) => [number, number, number, number];
|
|
4092
|
+
readonly workbookscriptsession_findScriptReferences: (a: number, b: number, c: number) => [number, number, number, number];
|
|
4093
|
+
readonly workbookscriptsession_format: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number, number];
|
|
4094
|
+
readonly workbookscriptsession_formatInto: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number, number];
|
|
4095
|
+
readonly workbookscriptsession_isFullyFormattable: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number];
|
|
4096
|
+
readonly workbookscriptsession_readAnnotation: (a: number, b: number, c: number) => [number, number, number, number];
|
|
4097
|
+
readonly workbookscriptsession_removeParamTag: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
4098
|
+
readonly workbookscriptsession_removeVisFlow: (a: number, b: number) => [number, number, number, number];
|
|
4099
|
+
readonly workbookscriptsession_rewriteAnnotation: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
|
|
4100
|
+
readonly workbookscriptsession_rewriteParamTag: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number, number];
|
|
4101
|
+
readonly workbookscriptsession_rewriteVisBoard: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number, number];
|
|
4102
|
+
readonly workbookscriptsession_rewriteVisFlow: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number, number];
|
|
4103
|
+
readonly workbookscriptsession_rewriteVisRenderer: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number, number];
|
|
4104
|
+
readonly workbookscriptsession_stateRevision: (a: number) => [bigint, number, number];
|
|
4105
|
+
readonly workbookscriptsession_text: (a: number) => [number, number, number, number];
|
|
4106
|
+
readonly workbookscriptsession_textVersion: (a: number) => [bigint, number, number];
|
|
4107
|
+
readonly shellpromptresult_cursorByteOffset: (a: number) => number;
|
|
4108
|
+
readonly shellpromptresult_revision: (a: number) => bigint;
|
|
4109
|
+
readonly wasm_bindgen__convert__closures_____invoke__ha7a2b373f2a9ce09: (a: number, b: number, c: any) => any;
|
|
4110
|
+
readonly wasm_bindgen__closure__destroy__h74bdb7d22b702b82: (a: number, b: number) => void;
|
|
4111
|
+
readonly wasm_bindgen__convert__closures_____invoke__hc9cbe033348e018d: (a: number, b: number, c: any) => void;
|
|
4112
|
+
readonly wasm_bindgen__closure__destroy__he52a6c160ad8bcc6: (a: number, b: number) => void;
|
|
4113
|
+
readonly wasm_bindgen__convert__closures_____invoke__h3cb6850919769fd7: (a: number, b: number, c: any, d: any) => void;
|
|
4114
|
+
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
4115
|
+
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
4116
|
+
readonly __wbindgen_exn_store: (a: number) => void;
|
|
4117
|
+
readonly __externref_table_alloc: () => number;
|
|
4118
|
+
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
4119
|
+
readonly __externref_table_dealloc: (a: number) => void;
|
|
4120
|
+
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
4121
|
+
readonly __externref_drop_slice: (a: number, b: number) => void;
|
|
4122
|
+
readonly __wbindgen_start: () => void;
|
|
4123
|
+
}
|
|
4124
|
+
|
|
4125
|
+
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
4126
|
+
/**
|
|
4127
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
4128
|
+
* a precompiled `WebAssembly.Module`.
|
|
4129
|
+
*
|
|
4130
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
4131
|
+
*
|
|
4132
|
+
* @returns {InitOutput}
|
|
4133
|
+
*/
|
|
4134
|
+
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
4135
|
+
|
|
4136
|
+
/**
|
|
4137
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
4138
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
4139
|
+
*
|
|
4140
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
4141
|
+
*
|
|
4142
|
+
* @returns {Promise<InitOutput>}
|
|
4143
|
+
*/
|
|
4144
|
+
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|
|
4145
|
+
|
|
4146
|
+
/** The URL of the module next to this glue */
|
|
4147
|
+
export declare const wasmUrl: URL;
|