new form page row2 from id
This commit is contained in:
@@ -104,12 +104,15 @@ service TablesData {
|
||||
// - If the physical table is missing but the definition exists, returns INTERNAL
|
||||
rpc GetTableDataCount(GetTableDataCountRequest) returns (komp_ac.common.CountResponse);
|
||||
|
||||
// Fetch the last non-deleted row by id together with the exact row count.
|
||||
// This is the efficient form-opening path: unlike GetTableDataByPosition at
|
||||
// the final position, it does not walk the table through a large OFFSET, and
|
||||
// it avoids a separate client/server round trip for the count.
|
||||
// Fetch the last non-deleted row by id. This is the efficient form-opening
|
||||
// path and does not scan the table through OFFSET or COUNT(*).
|
||||
rpc GetLastTableData(GetLastTableDataRequest) returns (GetLastTableDataResponse);
|
||||
|
||||
// Fetch the nearest visible row before or after an existing row id. This is
|
||||
// the ordinary form-navigation path and skips deleted/id-gap rows.
|
||||
rpc GetAdjacentTableData(GetAdjacentTableDataRequest)
|
||||
returns (GetAdjacentTableDataResponse);
|
||||
|
||||
// Fetch the N-th non-deleted row by id order (1-based), then return its full data.
|
||||
//
|
||||
// Behavior:
|
||||
@@ -426,18 +429,36 @@ message GetTableDataCountRequest {
|
||||
string table_name = 2;
|
||||
}
|
||||
|
||||
// Fetch the last visible row and the exact number of visible rows.
|
||||
// Fetch the last visible row by stable row id.
|
||||
message GetLastTableDataRequest {
|
||||
string profile_name = 1;
|
||||
string table_name = 2;
|
||||
}
|
||||
|
||||
message GetLastTableDataResponse {
|
||||
int64 total_count = 1;
|
||||
// Absent when total_count is zero.
|
||||
// Zero when the table has no visible rows.
|
||||
int64 last_id = 1;
|
||||
// Absent when last_id is zero.
|
||||
GetTableDataResponse row = 2;
|
||||
}
|
||||
|
||||
enum RowIdDirection {
|
||||
ROW_ID_DIRECTION_NEXT = 0;
|
||||
ROW_ID_DIRECTION_PREVIOUS = 1;
|
||||
}
|
||||
|
||||
message GetAdjacentTableDataRequest {
|
||||
string profile_name = 1;
|
||||
string table_name = 2;
|
||||
int64 anchor_id = 3;
|
||||
RowIdDirection direction = 4;
|
||||
}
|
||||
|
||||
message GetAdjacentTableDataResponse {
|
||||
// Absent when no visible row exists in the requested direction.
|
||||
GetTableDataResponse row = 1;
|
||||
}
|
||||
|
||||
// Fetch by ordinal position among non-deleted rows (1-based).
|
||||
message GetTableDataByPositionRequest {
|
||||
// Required. Profile (schema) name.
|
||||
|
||||
Reference in New Issue
Block a user