feat(mongo): preserve BSON types when cloning and saving documents
This commit is contained in:
12 files changed
+239
-36
No files matched your search
@@ -3584,13 +3584,14 @@ export async function mongoInsertDocument(connectionId: string, database: string
|
||||
return documentInsertDocument(connectionId, database, collection, docJson, routing);
|
||||
}
|
||||
|
||||
export async function documentInsertDocument(connectionId: string, database: string, collection: string, docJson: string, routing?: string): Promise<string> {
|
||||
export async function documentInsertDocument(connectionId: string, database: string, collection: string, docJson: string, routing?: string, preserveBsonTypes?: boolean): Promise<string> {
|
||||
return post("/api/document-store/insert-document", {
|
||||
connectionId,
|
||||
database,
|
||||
collection,
|
||||
docJson,
|
||||
routing,
|
||||
preserveBsonTypes,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -3523,13 +3523,14 @@ export async function mongoInsertDocument(connectionId: string, database: string
|
||||
return documentInsertDocument(connectionId, database, collection, docJson, routing);
|
||||
}
|
||||
|
||||
export async function documentInsertDocument(connectionId: string, database: string, collection: string, docJson: string, routing?: string): Promise<string> {
|
||||
export async function documentInsertDocument(connectionId: string, database: string, collection: string, docJson: string, routing?: string, preserveBsonTypes?: boolean): Promise<string> {
|
||||
return invoke("document_insert_document", {
|
||||
connectionId,
|
||||
database,
|
||||
collection,
|
||||
docJson,
|
||||
routing,
|
||||
preserveBsonTypes,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,10 @@ export interface GridNewRowMeta {
|
||||
token: number;
|
||||
/** Display placement; `null` appends at the end of the result. */
|
||||
placement: GridNewRowPlacement | null;
|
||||
/** Source result row for a cloned pending row, when it has one. */
|
||||
sourceIndex?: number;
|
||||
/** Columns whose values differ from the cloned source row. */
|
||||
editedColumns?: number[];
|
||||
}
|
||||
|
||||
export type GridOrderedRowEntry = { kind: "source"; sourceIndex: number } | { kind: "new"; newIndex: number };
|
||||
|
||||
Reference in new issue
Block a user