perf(db): page results without re-reading the skipped rows and cap the size of a cell (#5260)

Every page re-ran the query and read and dropped all rows before it, and nothing capped a cell, so a page of wide values moved hundreds of MB to the UI. Paging forward now continues the statement's stream on its connection (SQLite, PostgreSQL, MySQL/MariaDB), bounded to one cursor per source and closed when its result tab closes, the source disconnects or a data-changing statement runs (also while a page is being read). Read-only queries cut cells to 8,192 UTF-16 units, marked truncated, and read the whole value when it is expanded, copied, edited or exported; a re-read is accepted only when the row count, uncut cells and each cut cell's length, prefix and hash still match.

Co-authored-by: Mr0Bread <[email protected]>
Цей коміт міститься в:
Mr0Bread authored and GitHub committed 2026-11-24 21:41:48 +08:00
1 джерело 40c616e46d
коміт 644a2d5784
30 files changed
+1851 -256

No files matched your search

+17
Переглянути файл
@@ -108,6 +108,23 @@
color: var(--fg-muted);
font-style: italic;
}
/* A value the page carries only the start of: tagged before its text, which a column clips on the right. */
.cellCutMark {
flex: none;
margin-right: var(--space-1-5);
padding: 0 var(--space-1);
border: 1px solid var(--border);
border-radius: var(--radius-small);
color: var(--fg-muted);
font-size: 0.85em;
}
.cutNotice {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: var(--space-1-5);
color: var(--fg-muted);
}
.lineBreak {
color: var(--fg-muted);
}