feat(neo4j): expand node query properties into result columns
This commit is contained in:
1 parent
38a00c7cb7
commit
660071870b
12 files changed
+433
-29
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import { createQueryRequestTiming } from "@/lib/queryRequestTiming";
|
||||
import { appendNeo4jNodeCells, extractNeo4jNodeCells } from "@/lib/neo4j/neo4jNodeResult";
|
||||
import { UPDATE_RESTORE_KEY, assertUpdateAllowsInteraction } from "@/lib/app/updatePreparation";
|
||||
import { defineStore } from "pinia";
|
||||
import { isRedisMonitorCommand, startRedisMonitor } from "@/lib/redis/redisMonitor";
|
||||
@@ -305,7 +306,9 @@ function droppedTableObjectSchemaCandidates(target: DroppedTableObjectTarget): S
|
||||
}
|
||||
|
||||
function markQueryResultRowsRaw(result: QueryResult): QueryResult {
|
||||
extractNeo4jNodeCells(result);
|
||||
markRaw(result.rows);
|
||||
if (result.neo4j_node_cells) markRaw(result.neo4j_node_cells);
|
||||
if (result.large_value_cells) markRaw(result.large_value_cells);
|
||||
if (result.mongo_documents) markRaw(result.mongo_documents);
|
||||
if (result.mongo_copy_documents) markRaw(result.mongo_copy_documents);
|
||||
@@ -333,6 +336,8 @@ export function appendQueryResultSegment(previous: QueryResult, segment: QueryRe
|
||||
throw new Error("Result columns changed while loading the next segment");
|
||||
}
|
||||
const remainingRows = Math.max(0, maxRows - previous.rows.length);
|
||||
markQueryResultRowsRaw(previous);
|
||||
markQueryResultRowsRaw(segment);
|
||||
const appendedRowCount = Math.min(remainingRows, segment.rows.length);
|
||||
const appendParallelValues = <T>(existing: T[] | undefined, next: T[] | undefined): T[] | undefined => {
|
||||
if (!existing || !next) return undefined;
|
||||
@@ -356,6 +361,7 @@ export function appendQueryResultSegment(previous: QueryResult, segment: QueryRe
|
||||
...segment,
|
||||
appended_from_row_count: previous.rows.length,
|
||||
rows: [...previous.rows, ...segment.rows.slice(0, appendedRowCount)],
|
||||
neo4j_node_cells: appendNeo4jNodeCells(previous, segment, appendedRowCount),
|
||||
spatial_columns: spatial_columns.length > 0 ? spatial_columns : undefined,
|
||||
spatial_values: appendParallelValues(previous.spatial_values, segment.spatial_values),
|
||||
large_value_cells: appendLargeValueCells(previous.large_value_cells, segment.large_value_cells, previous.rows.length, appendedRowCount),
|
||||
@@ -399,6 +405,7 @@ function releaseResultObjectPayload(result: QueryResult): void {
|
||||
result.local_column_filters = undefined;
|
||||
result.local_hidden_column_keys = undefined;
|
||||
result.mongo_documents = undefined;
|
||||
result.neo4j_node_cells = undefined;
|
||||
result.mongo_copy_documents = undefined;
|
||||
result.large_value_cells = undefined;
|
||||
result.elasticsearch_raw_body = undefined;
|
||||
|
||||
Reference in new issue
Block a user