feat(elasticsearch): add SQL-model execution with mapping-aware completion
- Route SELECT * FROM <index> through /_search for simple browses; aggregates/projections stay on /_sql - Drive completion columns from /_mapping (flattened dotted fields, multi-fields) - Switch editor completion to SQL when the active statement starts with SELECT/WITH on ES - Skip generic SQL semantic diagnostics for ES (hyphenated wildcard indices caused 500s) - Wire ES into server-side pagination plan; derive completion context from line blocks - Fix result-grid pagination exceeding in-memory result sets (allRowsLoaded)
This commit is contained in:
1 parent
465ed195cf
commit
2628fb8374
11 files changed
+749
-26
No files matched your search
@@ -1270,6 +1270,20 @@ export const useQueryStore = defineStore("query", () => {
|
||||
current.resultTotalRowCount = undefined;
|
||||
}
|
||||
current.resultTotalRowCountLoading = current.mode === "query" && !!current.result && !!countSql;
|
||||
// Server-side pagination without a countSql: the backend (currently
|
||||
// the Elasticsearch driver) already reports the true match total via
|
||||
// affected_rows. Use it directly so the result-grid can compute the
|
||||
// page count without issuing a separate COUNT query.
|
||||
if (
|
||||
current.result &&
|
||||
current.mode === "query" &&
|
||||
typeof pageLimit === "number" &&
|
||||
!countSql &&
|
||||
typeof current.result.affected_rows === "number"
|
||||
) {
|
||||
current.resultTotalRowCount = current.result.affected_rows;
|
||||
current.resultTotalRowCountLoading = false;
|
||||
}
|
||||
touchResult(current);
|
||||
if (current.mode === "query" && current.result) {
|
||||
countQueryTotalRowsInBackground({
|
||||
|
||||
Reference in new issue
Block a user