Allow nullable bookmarks
This commit is contained in:
parent
8519cfc495
commit
3250ad4947
|
@ -24,6 +24,7 @@ import {
|
||||||
JsonFieldSubType,
|
JsonFieldSubType,
|
||||||
LogicalOperator,
|
LogicalOperator,
|
||||||
RelationshipType,
|
RelationshipType,
|
||||||
|
RequiredKeys,
|
||||||
Row,
|
Row,
|
||||||
RowSearchParams,
|
RowSearchParams,
|
||||||
SearchFilters,
|
SearchFilters,
|
||||||
|
@ -206,9 +207,23 @@ datasourceDescribe(
|
||||||
|
|
||||||
private async performSearch(): Promise<SearchResponse<Row>> {
|
private async performSearch(): Promise<SearchResponse<Row>> {
|
||||||
if (isInMemory) {
|
if (isInMemory) {
|
||||||
return dataFilters.search(_.cloneDeep(rows), {
|
const query: RequiredKeys<Omit<RowSearchParams, "tableId">> = {
|
||||||
...this.query,
|
sort: this.query.sort,
|
||||||
})
|
query: this.query.query || {},
|
||||||
|
paginate: this.query.paginate,
|
||||||
|
bookmark: this.query.bookmark,
|
||||||
|
limit: this.query.limit,
|
||||||
|
sortOrder: this.query.sortOrder,
|
||||||
|
sortType: this.query.sortType,
|
||||||
|
version: this.query.version,
|
||||||
|
disableEscaping: this.query.disableEscaping,
|
||||||
|
countRows: this.query.countRows,
|
||||||
|
viewId: undefined,
|
||||||
|
fields: undefined,
|
||||||
|
indexer: undefined,
|
||||||
|
rows: undefined,
|
||||||
|
}
|
||||||
|
return dataFilters.search(_.cloneDeep(rows), query)
|
||||||
} else {
|
} else {
|
||||||
return config.api.row.search(tableOrViewId, this.query)
|
return config.api.row.search(tableOrViewId, this.query)
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@ const searchRowRequest = z.object({
|
||||||
})
|
})
|
||||||
.optional(),
|
.optional(),
|
||||||
paginate: z.boolean().optional(),
|
paginate: z.boolean().optional(),
|
||||||
bookmark: z.union([z.string(), z.number()]).optional(),
|
bookmark: z.union([z.string(), z.number()]).nullable().optional(),
|
||||||
limit: z.number().optional(),
|
limit: z.number().optional(),
|
||||||
sort: z.string().optional(),
|
sort: z.string().optional(),
|
||||||
sortOrder: z.nativeEnum(SortOrder).optional(),
|
sortOrder: z.nativeEnum(SortOrder).optional(),
|
||||||
|
|
Loading…
Reference in New Issue