mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-27 08:03:37 +00:00
feat(database): search and pagination on result query (#1432)
Adds a search bar to query result grids (match case / words / regex, previous/next occurrence, Filter rows) and a pager for console results (first/previous/next/last, page size). Later pages re-run the read-only query with a skip, which every driver reads past without decoding, so only one page crosses IPC; Last counts rows with the statement wrapped so a trailing line comment can't swallow the closing parenthesis. Closes #1431 Co-authored-by: kidp2h <40386174+kidp2h@users.noreply.github.com>
This commit is contained in:
@@ -560,21 +560,6 @@
|
||||
.gridHost {
|
||||
position: relative;
|
||||
}
|
||||
/* IDEA's floating row count at the bottom of a result. */
|
||||
.rowPill {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
bottom: 12px;
|
||||
transform: translateX(-50%);
|
||||
padding: 3px 10px;
|
||||
border: 1px solid var(--border-popup, var(--border));
|
||||
border-radius: var(--radius-small);
|
||||
background: var(--bg-popup, var(--bg-elev));
|
||||
color: var(--fg-secondary);
|
||||
font-size: var(--fs-small);
|
||||
box-shadow: var(--shadow-popup, none);
|
||||
pointer-events: none;
|
||||
}
|
||||
.resultSource {
|
||||
color: var(--fg-muted);
|
||||
font-size: var(--fs-small);
|
||||
@@ -1260,3 +1245,77 @@
|
||||
overflow-wrap: anywhere;
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
/* The grid beside the Record / Value / Aggregates panel, under its search bar. */
|
||||
.dataMain {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
/* IDEA's search bar above a result grid. */
|
||||
.gridSearch {
|
||||
flex: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
padding: 4px 8px;
|
||||
background: var(--bg-elev);
|
||||
border-bottom: 1px solid var(--border);
|
||||
font-size: var(--fs-ui);
|
||||
}
|
||||
.gridSearchField {
|
||||
flex: 0 1 360px;
|
||||
min-width: 160px;
|
||||
}
|
||||
.gridSearchCount {
|
||||
font-family: var(--font-mono);
|
||||
font-size: var(--fs-small);
|
||||
color: var(--fg-subtle);
|
||||
padding: 0 6px;
|
||||
white-space: nowrap;
|
||||
min-width: 56px;
|
||||
}
|
||||
.gridSearchNone {
|
||||
color: var(--danger);
|
||||
}
|
||||
.cellMatch {
|
||||
background: var(--bg-text-search-result);
|
||||
}
|
||||
.cellMatchCurrent {
|
||||
background: var(--bg-text-search-result-current);
|
||||
}
|
||||
|
||||
/* IDEA's floating pager at the bottom of a result: |< < 1-500 of 501+ > >| and the page size. */
|
||||
.resultPager {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
bottom: 12px;
|
||||
transform: translateX(-50%);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
padding: 2px 4px;
|
||||
border: 1px solid var(--border-popup, var(--border));
|
||||
border-radius: var(--radius-small);
|
||||
background: var(--bg-popup, var(--bg-elev));
|
||||
color: var(--fg-secondary);
|
||||
font-size: var(--fs-small);
|
||||
box-shadow: var(--shadow-popup, none);
|
||||
white-space: nowrap;
|
||||
}
|
||||
.resultPagerRange {
|
||||
padding: 0 6px;
|
||||
}
|
||||
.resultPagerCount {
|
||||
padding: 0;
|
||||
border: 0;
|
||||
background: none;
|
||||
color: var(--link);
|
||||
font: inherit;
|
||||
cursor: pointer;
|
||||
}
|
||||
.resultPagerCount:disabled {
|
||||
color: inherit;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user