feat(mongodb): support generic runCommand execution
This commit is contained in:
1 parent
2d00620fac
commit
9b24d962bb
27 files changed
+580
-18
No files matched your search
@@ -690,6 +690,7 @@ export const mongoDistinct = forward("mongoDistinct");
|
||||
export const mongoCollectionStats = forward("mongoCollectionStats");
|
||||
export const mongoCreateIndex = forward("mongoCreateIndex");
|
||||
export const mongoCreateUser = forward("mongoCreateUser");
|
||||
export const mongoRunCommand = forward("mongoRunCommand");
|
||||
export const mongoDropIndexes = forward("mongoDropIndexes");
|
||||
export const documentInsertDocument = forward("documentInsertDocument");
|
||||
export const mongoInsertDocument = forward("mongoInsertDocument");
|
||||
|
||||
@@ -3583,6 +3583,15 @@ export async function mongoCreateUser(connectionId: string, database: string, us
|
||||
});
|
||||
}
|
||||
|
||||
export async function mongoRunCommand(connectionId: string, database: string, commandJson: string, executionId?: string): Promise<MongoDocumentResult> {
|
||||
return post("/api/mongo/run-command", {
|
||||
connectionId,
|
||||
database,
|
||||
commandJson,
|
||||
executionId,
|
||||
});
|
||||
}
|
||||
|
||||
export async function mongoDropIndexes(connectionId: string, database: string, collection: string, indexesJson?: string, single = false): Promise<MongoDropIndexesResult> {
|
||||
return post("/api/mongo/drop-indexes", {
|
||||
connectionId,
|
||||
|
||||
@@ -3527,6 +3527,15 @@ export async function mongoCreateUser(connectionId: string, database: string, us
|
||||
});
|
||||
}
|
||||
|
||||
export async function mongoRunCommand(connectionId: string, database: string, commandJson: string, executionId?: string): Promise<MongoDocumentResult> {
|
||||
return invoke("mongo_run_command", {
|
||||
connectionId,
|
||||
database,
|
||||
commandJson,
|
||||
executionId,
|
||||
});
|
||||
}
|
||||
|
||||
export async function mongoDropIndexes(connectionId: string, database: string, collection: string, indexesJson?: string, single = false): Promise<MongoDropIndexesResult> {
|
||||
return invoke("mongo_drop_indexes", {
|
||||
connectionId,
|
||||
|
||||
Reference in new issue
Block a user