@akohn/dashql 0.0.0-stage → 0.0.2-dev.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +373 -0
- package/NOTICE +66 -0
- package/README.md +154 -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 +21 -0
- package/dist/platform/session/agent_session_client.js +142 -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 +60 -0
- package/dist/platform/session/agent_session_state.js +100 -0
- package/dist/platform/session/workbook_journal.d.ts +77 -0
- package/dist/platform/session/workbook_journal.js +184 -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/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 +150 -0
- package/dist/runtime/runtime.js +429 -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/wasm/dashql_core.d.ts +4184 -0
- package/dist/wasm/dashql_core.js +4519 -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,494 @@
|
|
|
1
|
+
import { prepareHyperArrowInsert } from "./hyperdb_arrow_insert.js";
|
|
2
|
+
import { quoteIdentifier, quoteLiteral } from "../utils/sql_quote.js";
|
|
3
|
+
import * as arrow from "apache-arrow";
|
|
4
|
+
// dist/.stage/src/platform/hyperdb/hyperdb_wasm.ts
|
|
5
|
+
function mountSource(handle) {
|
|
6
|
+
const hostPath = handle.hostPath;
|
|
7
|
+
return typeof hostPath === "string" ? hostPath : handle;
|
|
8
|
+
}
|
|
9
|
+
var EMPTY_RESULT_IPC = arrow.tableToIPC(arrow.tableFromArrays({}), "stream");
|
|
10
|
+
var MOUNT_FILE = async (engine, file, path) => await engine.mount(file, { path });
|
|
11
|
+
function readAffectedRowCount(info) {
|
|
12
|
+
switch (info?.statementKind) {
|
|
13
|
+
case "COPY":
|
|
14
|
+
case "DELETE":
|
|
15
|
+
case "FETCH":
|
|
16
|
+
case "INSERT":
|
|
17
|
+
case "MERGE":
|
|
18
|
+
case "UPDATE": return info.rowCount;
|
|
19
|
+
default: return null;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
async function* prependChunk(first, rest) {
|
|
23
|
+
yield first;
|
|
24
|
+
yield* rest;
|
|
25
|
+
}
|
|
26
|
+
async function* singleChunk(chunk) {
|
|
27
|
+
yield chunk;
|
|
28
|
+
}
|
|
29
|
+
function yieldToEventLoop() {
|
|
30
|
+
return new Promise((resolve) => setTimeout(resolve, 0));
|
|
31
|
+
}
|
|
32
|
+
var MAX_IDLE_SESSIONS = 4;
|
|
33
|
+
function poolKey(alias, attached, clientContext) {
|
|
34
|
+
const databases = [alias ?? "", ...attached.map((database) => `${database.alias}=${database.path}`)].join(",");
|
|
35
|
+
return clientContext == null ? databases : `${databases}:${clientContext}`;
|
|
36
|
+
}
|
|
37
|
+
var HyperDB = class HyperDB {
|
|
38
|
+
engine;
|
|
39
|
+
sessions = /* @__PURE__ */ new Set();
|
|
40
|
+
idleSessions = /* @__PURE__ */ new Map();
|
|
41
|
+
openingSessions = /* @__PURE__ */ new Set();
|
|
42
|
+
initialization = null;
|
|
43
|
+
termination = null;
|
|
44
|
+
terminated = false;
|
|
45
|
+
databaseOperation = Promise.resolve();
|
|
46
|
+
terminateEngine;
|
|
47
|
+
computeDatabasePath;
|
|
48
|
+
defaultDatabasePath;
|
|
49
|
+
snippetsDatabasePath;
|
|
50
|
+
mountFileIn;
|
|
51
|
+
attachedDatabaseCreations = /* @__PURE__ */ new Map();
|
|
52
|
+
externalFiles = /* @__PURE__ */ new Map();
|
|
53
|
+
externalDirectories = /* @__PURE__ */ new Map();
|
|
54
|
+
constructor(engine, options = {}) {
|
|
55
|
+
this.engine = engine;
|
|
56
|
+
this.computeDatabasePath = options.computeDatabasePath ?? null;
|
|
57
|
+
this.defaultDatabasePath = options.defaultDatabasePath ?? null;
|
|
58
|
+
this.snippetsDatabasePath = options.snippetsDatabasePath ?? null;
|
|
59
|
+
this.terminateEngine = options.terminateEngine ?? true;
|
|
60
|
+
this.mountFileIn = options.mountFile ?? MOUNT_FILE;
|
|
61
|
+
}
|
|
62
|
+
static async create(engine, options) {
|
|
63
|
+
const database = new HyperDB(engine, options);
|
|
64
|
+
await database.initialize();
|
|
65
|
+
return database;
|
|
66
|
+
}
|
|
67
|
+
async connect(options = {}) {
|
|
68
|
+
await this.initialize();
|
|
69
|
+
if (this.termination || this.terminated) throw new Error("database is terminated");
|
|
70
|
+
const alias = options.defaultDatabase === null ? null : options.defaultDatabase ?? "__dashql_compute";
|
|
71
|
+
const clientContext = options.clientContext == null ? null : JSON.stringify(options.clientContext);
|
|
72
|
+
const attached = options.attachedDatabases ?? [];
|
|
73
|
+
let pool = null;
|
|
74
|
+
if (options.pooled) {
|
|
75
|
+
const key = poolKey(alias, attached, clientContext);
|
|
76
|
+
pool = this.idleSessions.get(key) ?? [];
|
|
77
|
+
this.idleSessions.set(key, pool);
|
|
78
|
+
}
|
|
79
|
+
const release = (session) => this.releaseSession(session, pool);
|
|
80
|
+
const idle = pool?.pop();
|
|
81
|
+
if (idle != null) return new HyperDBConnection(idle, release);
|
|
82
|
+
for (const database of attached) await this.createAttachedDatabase(database.path);
|
|
83
|
+
const opening = this.openSession(alias == null ? null : this.databasePath(alias), alias ?? "", attached, clientContext);
|
|
84
|
+
this.openingSessions.add(opening);
|
|
85
|
+
try {
|
|
86
|
+
return new HyperDBConnection(await opening, release);
|
|
87
|
+
} finally {
|
|
88
|
+
this.openingSessions.delete(opening);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
databasePath(alias) {
|
|
92
|
+
switch (alias) {
|
|
93
|
+
case "__dashql_compute": return this.computeDatabasePath;
|
|
94
|
+
case "hyper": return this.defaultDatabasePath;
|
|
95
|
+
case "__dashql_snippets": return this.snippetsDatabasePath;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
async createAttachedDatabase(path) {
|
|
99
|
+
let creation = this.attachedDatabaseCreations.get(path);
|
|
100
|
+
if (creation == null) {
|
|
101
|
+
creation = this.runDatabaseOperation(async () => {
|
|
102
|
+
await this.executeDatabaseStatement(`CREATE DATABASE IF NOT EXISTS ${quoteIdentifier(path)}`);
|
|
103
|
+
});
|
|
104
|
+
this.attachedDatabaseCreations.set(path, creation);
|
|
105
|
+
creation.catch(() => this.attachedDatabaseCreations.delete(path));
|
|
106
|
+
}
|
|
107
|
+
await creation;
|
|
108
|
+
}
|
|
109
|
+
async dropAttachedDatabase(path) {
|
|
110
|
+
await this.attachedDatabaseCreations.get(path)?.catch(() => {});
|
|
111
|
+
await this.runDatabaseOperation(async () => {
|
|
112
|
+
await this.executeDatabaseStatement(`DROP DATABASE IF EXISTS ${quoteIdentifier(path)}`);
|
|
113
|
+
this.attachedDatabaseCreations.delete(path);
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
databasePaths() {
|
|
117
|
+
return [
|
|
118
|
+
this.computeDatabasePath,
|
|
119
|
+
this.defaultDatabasePath,
|
|
120
|
+
this.snippetsDatabasePath
|
|
121
|
+
].filter((path) => path != null);
|
|
122
|
+
}
|
|
123
|
+
async openSession(databasePath, alias, attached, clientContext) {
|
|
124
|
+
const connection = await this.engine.connect(clientContext == null ? void 0 : { settings: { external_client_context: clientContext } });
|
|
125
|
+
if (this.termination || this.terminated) {
|
|
126
|
+
await connection.close();
|
|
127
|
+
throw new Error("database is terminated");
|
|
128
|
+
}
|
|
129
|
+
const session = new HyperDBSession(connection, this.mountFile, () => {
|
|
130
|
+
this.sessions.delete(session);
|
|
131
|
+
}, databasePath == null ? void 0 : alias);
|
|
132
|
+
try {
|
|
133
|
+
if (databasePath != null) await session.execute(`ATTACH DATABASE ${quoteIdentifier(databasePath)} AS ${quoteIdentifier(alias)}`);
|
|
134
|
+
for (const database of attached) await session.execute(`ATTACH DATABASE ${quoteIdentifier(database.path)} AS ${quoteIdentifier(database.alias)}`);
|
|
135
|
+
if (this.termination || this.terminated) throw new Error("database is terminated");
|
|
136
|
+
} catch (error) {
|
|
137
|
+
await session.close();
|
|
138
|
+
throw error;
|
|
139
|
+
}
|
|
140
|
+
this.sessions.add(session);
|
|
141
|
+
return session;
|
|
142
|
+
}
|
|
143
|
+
mountFile = async (file, path) => await this.mountFileIn(this.engine, file, path);
|
|
144
|
+
async releaseSession(session, pool) {
|
|
145
|
+
if (pool != null && session.reusable && !this.termination && !this.terminated && pool.length < MAX_IDLE_SESSIONS) {
|
|
146
|
+
pool.push(session);
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
await session.close();
|
|
150
|
+
}
|
|
151
|
+
async getVersion() {
|
|
152
|
+
const connection = await this.connect();
|
|
153
|
+
try {
|
|
154
|
+
const version = (await connection.query("SELECT version() AS version")).getChild("version")?.get(0);
|
|
155
|
+
if (typeof version !== "string") throw new Error("version query returned an invalid result");
|
|
156
|
+
return version;
|
|
157
|
+
} finally {
|
|
158
|
+
await connection.close();
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
async registerExternalFile(name, blob, path, signal) {
|
|
162
|
+
return await this.runDatabaseOperation(async () => {
|
|
163
|
+
throwIfAborted(signal);
|
|
164
|
+
path ??= externalMountPath(name);
|
|
165
|
+
validateExternalMountPath(path);
|
|
166
|
+
const file = new File([blob], path.slice(path.lastIndexOf("/") + 1), { type: blob.type });
|
|
167
|
+
const resource = await this.mountFile(file, path);
|
|
168
|
+
if (signal?.aborted) {
|
|
169
|
+
try {
|
|
170
|
+
await resource.close();
|
|
171
|
+
} catch {
|
|
172
|
+
this.externalFiles.set(path, resource);
|
|
173
|
+
}
|
|
174
|
+
throw signal.reason ?? new DOMException("The operation was aborted", "AbortError");
|
|
175
|
+
}
|
|
176
|
+
this.externalFiles.set(path, resource);
|
|
177
|
+
return path;
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
async removeExternalFile(path) {
|
|
181
|
+
await this.runDatabaseOperation(async () => {
|
|
182
|
+
const resource = this.externalFiles.get(path);
|
|
183
|
+
if (resource == null) throw new Error(`external file is not registered: ${path}`);
|
|
184
|
+
await resource.close();
|
|
185
|
+
this.externalFiles.delete(path);
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
async registerExternalDirectory(handle, path, mode) {
|
|
189
|
+
return await this.runDatabaseOperation(async () => {
|
|
190
|
+
path ??= externalMountPath(handle.name);
|
|
191
|
+
validateExternalMountPath(path);
|
|
192
|
+
const resource = await this.engine.mount(mountSource(handle), {
|
|
193
|
+
path,
|
|
194
|
+
mode
|
|
195
|
+
});
|
|
196
|
+
this.externalDirectories.set(path, resource);
|
|
197
|
+
return path;
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
async removeExternalDirectory(path) {
|
|
201
|
+
await this.runDatabaseOperation(async () => {
|
|
202
|
+
const resource = this.externalDirectories.get(path);
|
|
203
|
+
if (resource == null) throw new Error(`external directory is not registered: ${path}`);
|
|
204
|
+
await resource.close();
|
|
205
|
+
this.externalDirectories.delete(path);
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
async refreshExternalDirectory(path) {
|
|
209
|
+
await this.runDatabaseOperation(async () => {
|
|
210
|
+
const resource = this.externalDirectories.get(path);
|
|
211
|
+
if (resource == null) throw new Error(`external directory is not registered: ${path}`);
|
|
212
|
+
await resource.refresh();
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
async terminate() {
|
|
216
|
+
if (this.terminated) return;
|
|
217
|
+
if (!this.termination) this.termination = (async () => {
|
|
218
|
+
try {
|
|
219
|
+
await this.databaseOperation;
|
|
220
|
+
await Promise.allSettled([...this.openingSessions]);
|
|
221
|
+
this.idleSessions.clear();
|
|
222
|
+
const failed = (await Promise.allSettled([...this.sessions].map((session) => session.closeForTermination()))).find((close) => close.status === "rejected");
|
|
223
|
+
if (failed) throw failed.reason;
|
|
224
|
+
for (const mounts of [this.externalFiles, this.externalDirectories]) for (const [path, resource] of mounts) {
|
|
225
|
+
await resource.close();
|
|
226
|
+
mounts.delete(path);
|
|
227
|
+
}
|
|
228
|
+
for (const path of this.databasePaths()) await this.executeDatabaseStatement(`DROP DATABASE ${quoteIdentifier(path)}`);
|
|
229
|
+
if (this.terminateEngine) await this.engine.terminate();
|
|
230
|
+
this.terminated = true;
|
|
231
|
+
} catch (error) {
|
|
232
|
+
this.termination = null;
|
|
233
|
+
throw error;
|
|
234
|
+
}
|
|
235
|
+
})();
|
|
236
|
+
await this.termination;
|
|
237
|
+
}
|
|
238
|
+
async initialize() {
|
|
239
|
+
if (this.terminated) throw new Error("database is terminated");
|
|
240
|
+
if (!this.initialization) this.initialization = (async () => {
|
|
241
|
+
await this.engine.ready();
|
|
242
|
+
for (const path of this.databasePaths()) await this.executeDatabaseStatement(`CREATE DATABASE ${quoteIdentifier(path)}`);
|
|
243
|
+
})().catch((error) => {
|
|
244
|
+
this.initialization = null;
|
|
245
|
+
throw error;
|
|
246
|
+
});
|
|
247
|
+
await this.initialization;
|
|
248
|
+
}
|
|
249
|
+
async runDatabaseOperation(operation) {
|
|
250
|
+
const previous = this.databaseOperation;
|
|
251
|
+
let release;
|
|
252
|
+
this.databaseOperation = new Promise((resolve) => {
|
|
253
|
+
release = resolve;
|
|
254
|
+
});
|
|
255
|
+
await previous;
|
|
256
|
+
try {
|
|
257
|
+
if (this.termination || this.terminated) throw new Error("database is terminated");
|
|
258
|
+
return await operation();
|
|
259
|
+
} finally {
|
|
260
|
+
release();
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
async executeDatabaseStatement(statement) {
|
|
264
|
+
const session = new HyperDBSession(await this.engine.connect(), this.mountFile, () => {});
|
|
265
|
+
try {
|
|
266
|
+
await session.execute(statement);
|
|
267
|
+
} finally {
|
|
268
|
+
await session.close();
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
};
|
|
272
|
+
function externalMountPath(name) {
|
|
273
|
+
const component = name.replace(/[^a-zA-Z0-9._-]/g, "_").slice(0, 200);
|
|
274
|
+
return `/mnt/external/${!component || component === "." || component === ".." ? "file" : component}`;
|
|
275
|
+
}
|
|
276
|
+
function validateExternalMountPath(path) {
|
|
277
|
+
const relativePath = path.startsWith("/mnt/external/") ? path.slice(14) : "";
|
|
278
|
+
if (relativePath.length === 0 || new TextEncoder().encode(relativePath).byteLength > 200 || relativePath.split("/").some((component) => !/^[A-Za-z0-9._-]+$/.test(component) || component === "." || component === "..")) throw new Error("external mount path must be below /mnt/external/ with ASCII path components");
|
|
279
|
+
}
|
|
280
|
+
function throwIfAborted(signal) {
|
|
281
|
+
if (signal?.aborted) throw signal.reason ?? new DOMException("The operation was aborted", "AbortError");
|
|
282
|
+
}
|
|
283
|
+
var HyperDBConnection = class {
|
|
284
|
+
session;
|
|
285
|
+
release;
|
|
286
|
+
closed = false;
|
|
287
|
+
constructor(session, release) {
|
|
288
|
+
this.session = session;
|
|
289
|
+
this.release = release;
|
|
290
|
+
}
|
|
291
|
+
async close() {
|
|
292
|
+
if (this.closed) return;
|
|
293
|
+
if (this.session.active) throw new Error("connection has an active operation");
|
|
294
|
+
this.closed = true;
|
|
295
|
+
await this.release(this.session);
|
|
296
|
+
}
|
|
297
|
+
async query(query, abort) {
|
|
298
|
+
this.checkOpen();
|
|
299
|
+
return await this.session.query(query, abort);
|
|
300
|
+
}
|
|
301
|
+
async queryStream(query, abort) {
|
|
302
|
+
this.checkOpen();
|
|
303
|
+
return await this.session.queryStream(query, abort);
|
|
304
|
+
}
|
|
305
|
+
async execute(statement, abort) {
|
|
306
|
+
this.checkOpen();
|
|
307
|
+
return await this.session.execute(statement, abort);
|
|
308
|
+
}
|
|
309
|
+
async insertArrowTable(table, options) {
|
|
310
|
+
this.checkOpen();
|
|
311
|
+
await this.session.insertArrowTable(table, options);
|
|
312
|
+
}
|
|
313
|
+
async createTableAs(name, query, abort) {
|
|
314
|
+
this.checkOpen();
|
|
315
|
+
await this.session.createTableAs(name, query, abort);
|
|
316
|
+
}
|
|
317
|
+
checkOpen() {
|
|
318
|
+
if (this.closed) throw new Error("connection is closed");
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
var HyperDBResultStream = class {
|
|
322
|
+
reader;
|
|
323
|
+
stop;
|
|
324
|
+
constructor(reader, stop) {
|
|
325
|
+
this.reader = reader;
|
|
326
|
+
this.stop = stop;
|
|
327
|
+
}
|
|
328
|
+
get schema() {
|
|
329
|
+
return this.reader.schema;
|
|
330
|
+
}
|
|
331
|
+
async next() {
|
|
332
|
+
try {
|
|
333
|
+
const next = await this.reader.next();
|
|
334
|
+
if (next.done) await this.stop();
|
|
335
|
+
return next;
|
|
336
|
+
} catch (error) {
|
|
337
|
+
await this.stop();
|
|
338
|
+
throw error;
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
async cancel() {
|
|
342
|
+
await this.stop();
|
|
343
|
+
}
|
|
344
|
+
async *[Symbol.asyncIterator]() {
|
|
345
|
+
try {
|
|
346
|
+
for (let next = await this.next(); !next.done; next = await this.next()) yield next.value;
|
|
347
|
+
} finally {
|
|
348
|
+
await this.stop();
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
};
|
|
352
|
+
var HyperDBSession = class {
|
|
353
|
+
connection;
|
|
354
|
+
mountFile;
|
|
355
|
+
onClose;
|
|
356
|
+
databaseAlias;
|
|
357
|
+
closed = false;
|
|
358
|
+
active = false;
|
|
359
|
+
reusable = true;
|
|
360
|
+
closing = null;
|
|
361
|
+
current = null;
|
|
362
|
+
constructor(connection, mountFile, onClose, databaseAlias) {
|
|
363
|
+
this.connection = connection;
|
|
364
|
+
this.mountFile = mountFile;
|
|
365
|
+
this.onClose = onClose;
|
|
366
|
+
this.databaseAlias = databaseAlias;
|
|
367
|
+
}
|
|
368
|
+
async close() {
|
|
369
|
+
if (this.closed) return;
|
|
370
|
+
if (this.active) throw new Error("connection has an active operation");
|
|
371
|
+
await this.closeImpl();
|
|
372
|
+
}
|
|
373
|
+
async query(query, abort) {
|
|
374
|
+
const stream = await this.queryStream(query, abort);
|
|
375
|
+
const batches = [];
|
|
376
|
+
for await (const batch of stream) batches.push(batch);
|
|
377
|
+
return new arrow.Table(stream.schema, batches);
|
|
378
|
+
}
|
|
379
|
+
async queryStream(query, abort) {
|
|
380
|
+
this.begin();
|
|
381
|
+
const chunks = this.startQuery(query, abort);
|
|
382
|
+
const cancellation = this.current.cancellation;
|
|
383
|
+
const stop = async () => {
|
|
384
|
+
cancellation.abort(new DOMException("The result stream was cancelled", "AbortError"));
|
|
385
|
+
await chunks.return(void 0).catch(() => {});
|
|
386
|
+
};
|
|
387
|
+
const first = await chunks.next();
|
|
388
|
+
const source = first.done ? singleChunk(EMPTY_RESULT_IPC) : prependChunk(first.value, chunks);
|
|
389
|
+
try {
|
|
390
|
+
const reader = await arrow.RecordBatchReader.from(source);
|
|
391
|
+
if (!reader.isAsync() || !reader.isStream()) throw new Error("query did not produce an Arrow stream");
|
|
392
|
+
await reader.open();
|
|
393
|
+
return new HyperDBResultStream(reader, stop);
|
|
394
|
+
} catch (error) {
|
|
395
|
+
await stop();
|
|
396
|
+
throw error;
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
async execute(statement, abort) {
|
|
400
|
+
this.begin();
|
|
401
|
+
return await this.drain(this.startQuery(statement, abort));
|
|
402
|
+
}
|
|
403
|
+
async insertArrowTable(table, options) {
|
|
404
|
+
if (!options.name) throw new Error("Arrow insert table name must not be empty");
|
|
405
|
+
const insert = prepareHyperArrowInsert(table);
|
|
406
|
+
this.begin();
|
|
407
|
+
let resource = null;
|
|
408
|
+
try {
|
|
409
|
+
const name = `__dashql_insert_${crypto.randomUUID().replace(/-/g, "_")}.arrows`;
|
|
410
|
+
const path = `/mnt/external/${name}`;
|
|
411
|
+
const bytes = arrow.tableToIPC(insert.table, "stream");
|
|
412
|
+
resource = await this.mountFile(new File([bytes], name), path);
|
|
413
|
+
const target = options.schema == null ? quoteIdentifier(options.name) : `${quoteIdentifier(options.schema)}.${quoteIdentifier(options.name)}`;
|
|
414
|
+
const source = `SELECT * FROM external(${quoteLiteral(path)}, format => 'arrowstream', columns => descriptor(${insert.columns}))`;
|
|
415
|
+
await this.drain(this.startQuery(options.create ?? true ? `CREATE TABLE ${target} AS ${source}` : `INSERT INTO ${target} ${source}`, options.abort));
|
|
416
|
+
} finally {
|
|
417
|
+
this.active = false;
|
|
418
|
+
await resource?.close();
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
async drain(chunks) {
|
|
422
|
+
let next = await chunks.next();
|
|
423
|
+
while (!next.done) next = await chunks.next();
|
|
424
|
+
return readAffectedRowCount(next.value);
|
|
425
|
+
}
|
|
426
|
+
async createTableAs(name, query, abort) {
|
|
427
|
+
await this.execute(`CREATE TABLE ${quoteIdentifier(name)} AS ${query}`, abort);
|
|
428
|
+
}
|
|
429
|
+
async closeForTermination() {
|
|
430
|
+
if (this.closing) {
|
|
431
|
+
await this.closing;
|
|
432
|
+
return;
|
|
433
|
+
}
|
|
434
|
+
const current = this.current;
|
|
435
|
+
if (current != null) {
|
|
436
|
+
current.cancellation.abort(/* @__PURE__ */ new Error("database is terminating"));
|
|
437
|
+
await current.chunks.return(void 0).catch(() => {});
|
|
438
|
+
if (this.current === current) this.finishQuery();
|
|
439
|
+
}
|
|
440
|
+
while (this.active) await yieldToEventLoop();
|
|
441
|
+
await this.closeImpl();
|
|
442
|
+
}
|
|
443
|
+
startQuery(query, abort) {
|
|
444
|
+
const cancellation = new AbortController();
|
|
445
|
+
const signal = abort == null ? cancellation.signal : AbortSignal.any([abort, cancellation.signal]);
|
|
446
|
+
const chunks = this.readChunks(query, signal);
|
|
447
|
+
this.current = {
|
|
448
|
+
chunks,
|
|
449
|
+
cancellation
|
|
450
|
+
};
|
|
451
|
+
return chunks;
|
|
452
|
+
}
|
|
453
|
+
async *readChunks(query, signal) {
|
|
454
|
+
const stream = this.connection.queryStreamIPC(query, { signal });
|
|
455
|
+
const chunks = stream[Symbol.asyncIterator]();
|
|
456
|
+
try {
|
|
457
|
+
for (;;) {
|
|
458
|
+
const next = await chunks.next();
|
|
459
|
+
if (next.done) break;
|
|
460
|
+
yield next.value;
|
|
461
|
+
}
|
|
462
|
+
return await stream.info;
|
|
463
|
+
} finally {
|
|
464
|
+
await chunks.return?.(void 0).catch(() => {});
|
|
465
|
+
if (!signal.aborted && !await stream.info.then(() => true, () => false)) this.reusable = false;
|
|
466
|
+
this.finishQuery();
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
begin() {
|
|
470
|
+
this.checkOpen();
|
|
471
|
+
if (this.active) throw new Error("connection has an active operation");
|
|
472
|
+
this.active = true;
|
|
473
|
+
}
|
|
474
|
+
finishQuery() {
|
|
475
|
+
this.current = null;
|
|
476
|
+
this.active = false;
|
|
477
|
+
}
|
|
478
|
+
async closeImpl() {
|
|
479
|
+
if (!this.closing) this.closing = (async () => {
|
|
480
|
+
if (this.databaseAlias != null) await this.execute(`DETACH DATABASE ${quoteIdentifier(this.databaseAlias)}`);
|
|
481
|
+
await this.connection.close();
|
|
482
|
+
this.closed = true;
|
|
483
|
+
this.onClose();
|
|
484
|
+
})().catch((error) => {
|
|
485
|
+
this.closing = null;
|
|
486
|
+
throw error;
|
|
487
|
+
});
|
|
488
|
+
await this.closing;
|
|
489
|
+
}
|
|
490
|
+
checkOpen() {
|
|
491
|
+
if (this.closed) throw new Error("connection is closed");
|
|
492
|
+
}
|
|
493
|
+
};
|
|
494
|
+
export { HyperDB, HyperDBConnection };
|
|
File without changes
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export declare enum LogLevel {
|
|
2
|
+
Trace = 1,
|
|
3
|
+
Debug = 2,
|
|
4
|
+
Info = 3,
|
|
5
|
+
Warn = 4,
|
|
6
|
+
Error = 5
|
|
7
|
+
}
|
|
8
|
+
export declare function getLogLevelName(level: LogLevel): string;
|
|
9
|
+
export interface TraceInfo {
|
|
10
|
+
traceId: number;
|
|
11
|
+
spanId: number;
|
|
12
|
+
parentSpanId: number | null;
|
|
13
|
+
}
|
|
14
|
+
export type LogValue = string | readonly string[] | null | undefined;
|
|
15
|
+
export type LogKeyValues = Record<string, LogValue>;
|
|
16
|
+
export interface LogRecord {
|
|
17
|
+
timestamp: number;
|
|
18
|
+
level: LogLevel;
|
|
19
|
+
target: string;
|
|
20
|
+
message: string;
|
|
21
|
+
context: string | null;
|
|
22
|
+
tracing: TraceInfo | null;
|
|
23
|
+
keyValues: LogKeyValues;
|
|
24
|
+
}
|
|
25
|
+
declare class FrozenLogChunk {
|
|
26
|
+
readonly entries: LogRecord[];
|
|
27
|
+
readonly minTraceId: number | null;
|
|
28
|
+
readonly maxTraceId: number | null;
|
|
29
|
+
constructor(entries: LogRecord[]);
|
|
30
|
+
}
|
|
31
|
+
type LogObserver = (buffer: LogBuffer) => void;
|
|
32
|
+
type LogRecordObserver = (record: LogRecord) => void;
|
|
33
|
+
export declare class LogBuffer {
|
|
34
|
+
protected version_: number;
|
|
35
|
+
protected lastEntries_: LogRecord[];
|
|
36
|
+
protected frozenChunks_: FrozenLogChunk[];
|
|
37
|
+
protected logObservers: Set<LogObserver>;
|
|
38
|
+
protected traceObservers: Map<number, Set<LogRecordObserver>>;
|
|
39
|
+
protected minLogLevel: LogLevel;
|
|
40
|
+
constructor();
|
|
41
|
+
get version(): number;
|
|
42
|
+
get length(): number;
|
|
43
|
+
get observers(): Set<LogObserver>;
|
|
44
|
+
setMinLogLevel(level: LogLevel): void;
|
|
45
|
+
getMinLogLevel(): LogLevel;
|
|
46
|
+
subscribe(observer: LogObserver, callWhenRegistering?: boolean): void;
|
|
47
|
+
subscribeTrace(traceId: number, observer: LogRecordObserver): void;
|
|
48
|
+
unsubscribeTrace(traceId: number, observer: LogRecordObserver): void;
|
|
49
|
+
push(entry: LogRecord): void;
|
|
50
|
+
at(index: number): LogRecord | null;
|
|
51
|
+
collectTraceLogs(traceId: number): LogRecord[];
|
|
52
|
+
}
|
|
53
|
+
export {};
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
// dist/.stage/src/platform/logger/log_buffer.ts
|
|
2
|
+
var LogLevel = /* @__PURE__ */ function(LogLevel) {
|
|
3
|
+
LogLevel[LogLevel["Trace"] = 1] = "Trace";
|
|
4
|
+
LogLevel[LogLevel["Debug"] = 2] = "Debug";
|
|
5
|
+
LogLevel[LogLevel["Info"] = 3] = "Info";
|
|
6
|
+
LogLevel[LogLevel["Warn"] = 4] = "Warn";
|
|
7
|
+
LogLevel[LogLevel["Error"] = 5] = "Error";
|
|
8
|
+
return LogLevel;
|
|
9
|
+
}({});
|
|
10
|
+
function getLogLevelName(level) {
|
|
11
|
+
switch (level) {
|
|
12
|
+
case LogLevel.Trace: return "trace";
|
|
13
|
+
case LogLevel.Debug: return "debug";
|
|
14
|
+
case LogLevel.Info: return "info";
|
|
15
|
+
case LogLevel.Warn: return "warn";
|
|
16
|
+
case LogLevel.Error: return "error";
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
var TARGET_CHUNK_SIZE = 1024;
|
|
20
|
+
var FrozenLogChunk = class {
|
|
21
|
+
entries;
|
|
22
|
+
minTraceId;
|
|
23
|
+
maxTraceId;
|
|
24
|
+
constructor(entries) {
|
|
25
|
+
this.entries = entries;
|
|
26
|
+
let min = null;
|
|
27
|
+
let max = null;
|
|
28
|
+
for (const entry of entries) if (entry.tracing?.traceId !== void 0) {
|
|
29
|
+
const traceId = entry.tracing.traceId;
|
|
30
|
+
if (min === null || traceId < min) min = traceId;
|
|
31
|
+
if (max === null || traceId > max) max = traceId;
|
|
32
|
+
}
|
|
33
|
+
this.minTraceId = min;
|
|
34
|
+
this.maxTraceId = max;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
var LogBuffer = class {
|
|
38
|
+
version_;
|
|
39
|
+
lastEntries_;
|
|
40
|
+
frozenChunks_;
|
|
41
|
+
logObservers;
|
|
42
|
+
traceObservers;
|
|
43
|
+
minLogLevel;
|
|
44
|
+
constructor() {
|
|
45
|
+
this.version_ = 1;
|
|
46
|
+
this.lastEntries_ = [];
|
|
47
|
+
this.frozenChunks_ = [];
|
|
48
|
+
this.logObservers = /* @__PURE__ */ new Set();
|
|
49
|
+
this.traceObservers = /* @__PURE__ */ new Map();
|
|
50
|
+
this.minLogLevel = LogLevel.Info;
|
|
51
|
+
}
|
|
52
|
+
get version() {
|
|
53
|
+
return this.version_;
|
|
54
|
+
}
|
|
55
|
+
get length() {
|
|
56
|
+
return this.lastEntries_.length + this.frozenChunks_.length * TARGET_CHUNK_SIZE;
|
|
57
|
+
}
|
|
58
|
+
get observers() {
|
|
59
|
+
return this.logObservers;
|
|
60
|
+
}
|
|
61
|
+
setMinLogLevel(level) {
|
|
62
|
+
this.minLogLevel = level;
|
|
63
|
+
}
|
|
64
|
+
getMinLogLevel() {
|
|
65
|
+
return this.minLogLevel;
|
|
66
|
+
}
|
|
67
|
+
subscribe(observer, callWhenRegistering = false) {
|
|
68
|
+
this.logObservers.add(observer);
|
|
69
|
+
if (callWhenRegistering) observer(this);
|
|
70
|
+
}
|
|
71
|
+
subscribeTrace(traceId, observer) {
|
|
72
|
+
let observers = this.traceObservers.get(traceId);
|
|
73
|
+
if (!observers) {
|
|
74
|
+
observers = /* @__PURE__ */ new Set();
|
|
75
|
+
this.traceObservers.set(traceId, observers);
|
|
76
|
+
}
|
|
77
|
+
observers.add(observer);
|
|
78
|
+
}
|
|
79
|
+
unsubscribeTrace(traceId, observer) {
|
|
80
|
+
const observers = this.traceObservers.get(traceId);
|
|
81
|
+
if (observers) {
|
|
82
|
+
observers.delete(observer);
|
|
83
|
+
if (observers.size === 0) this.traceObservers.delete(traceId);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
push(entry) {
|
|
87
|
+
if (entry.level < this.minLogLevel) return;
|
|
88
|
+
this.lastEntries_.push(entry);
|
|
89
|
+
if (this.lastEntries_.length >= TARGET_CHUNK_SIZE) {
|
|
90
|
+
this.frozenChunks_.push(new FrozenLogChunk(this.lastEntries_));
|
|
91
|
+
this.lastEntries_ = [];
|
|
92
|
+
}
|
|
93
|
+
this.version_ += 1;
|
|
94
|
+
for (const observer of this.logObservers) observer(this);
|
|
95
|
+
if (entry.tracing) {
|
|
96
|
+
const observers = this.traceObservers.get(entry.tracing.traceId);
|
|
97
|
+
if (observers) for (const observer of observers) observer(entry);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
at(index) {
|
|
101
|
+
const frozenEntries = this.frozenChunks_.length * TARGET_CHUNK_SIZE;
|
|
102
|
+
if (index < frozenEntries) {
|
|
103
|
+
const chunkIndex = Math.floor(index / TARGET_CHUNK_SIZE);
|
|
104
|
+
const indexInChunk = index - chunkIndex * TARGET_CHUNK_SIZE;
|
|
105
|
+
if (chunkIndex >= this.frozenChunks_.length) return null;
|
|
106
|
+
const chunk = this.frozenChunks_[chunkIndex];
|
|
107
|
+
if (indexInChunk >= chunk.entries.length) return null;
|
|
108
|
+
return chunk.entries[indexInChunk];
|
|
109
|
+
}
|
|
110
|
+
const pendingIndex = index - frozenEntries;
|
|
111
|
+
if (pendingIndex < this.lastEntries_.length) return this.lastEntries_[pendingIndex];
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
collectTraceLogs(traceId) {
|
|
115
|
+
const results = [];
|
|
116
|
+
for (const chunk of this.frozenChunks_) {
|
|
117
|
+
if (chunk.minTraceId !== null && chunk.maxTraceId !== null) {
|
|
118
|
+
if (traceId < chunk.minTraceId || traceId > chunk.maxTraceId) continue;
|
|
119
|
+
}
|
|
120
|
+
for (const entry of chunk.entries) if (entry.tracing?.traceId === traceId) results.push(entry);
|
|
121
|
+
}
|
|
122
|
+
for (const entry of this.lastEntries_) if (entry.tracing?.traceId === traceId) results.push(entry);
|
|
123
|
+
return results;
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
export { LogBuffer, LogLevel, getLogLevelName };
|