mirror of
https://github.com/t8y2/dbx.git
synced 2026-11-01 00:25:38 +00:00
feat(mongo): add filter/sort support and fix table view editing
- Add filter and sort parameters to MongoDB find_documents across the full stack (driver, ops, tauri cmd, web routes, frontend API) - Add find/sort input bar to MongoDocBrowser table view via DataGrid search-bar slot, matching WHERE/ORDER BY positioning - Fix table view editing: allow cell editing when customSave is provided (bypasses primary key requirement for MongoDB) - Fix replace_one WriteError 66 by removing _id from replacement doc - Align action buttons (refresh, add row, commit) to the right in grid
This commit is contained in:
+3
-1
@@ -682,8 +682,10 @@ export async function mongoFindDocuments(
|
||||
collection: string,
|
||||
skip: number,
|
||||
limit: number,
|
||||
filter?: string,
|
||||
sort?: string,
|
||||
): Promise<MongoDocumentResult> {
|
||||
return post("/api/mongo/find-documents", { connectionId, database, collection, skip, limit });
|
||||
return post("/api/mongo/find-documents", { connectionId, database, collection, skip, limit, filter, sort });
|
||||
}
|
||||
|
||||
export async function mongoInsertDocument(
|
||||
|
||||
+3
-1
@@ -516,8 +516,10 @@ export async function mongoFindDocuments(
|
||||
collection: string,
|
||||
skip: number,
|
||||
limit: number,
|
||||
filter?: string,
|
||||
sort?: string,
|
||||
): Promise<MongoDocumentResult> {
|
||||
return invoke("mongo_find_documents", { connectionId, database, collection, skip, limit });
|
||||
return invoke("mongo_find_documents", { connectionId, database, collection, skip, limit, filter, sort });
|
||||
}
|
||||
|
||||
export async function mongoInsertDocument(
|
||||
|
||||
Reference in New Issue
Block a user