feat(mongodb): improve sidebar index management
This commit is contained in:
1 parent
22055e081f
commit
8e7b74d0ee
56 files changed
+3558
-246
No files matched your search
@@ -99,6 +99,7 @@ import type {
|
||||
DocumentQueryResult,
|
||||
MongoDocumentResult,
|
||||
MongoCollectionStatsResult,
|
||||
MongoDropIndexesResult,
|
||||
MongoGridFsBucketInfo,
|
||||
HistoryEntry,
|
||||
HistorySearchRequest,
|
||||
@@ -3105,7 +3106,7 @@ export async function mongoCreateIndex(connectionId: string, database: string, c
|
||||
});
|
||||
}
|
||||
|
||||
export async function mongoDropIndexes(connectionId: string, database: string, collection: string, indexesJson?: string, single = false): Promise<{ dropped_names: string[]; affected_rows: number }> {
|
||||
export async function mongoDropIndexes(connectionId: string, database: string, collection: string, indexesJson?: string, single = false): Promise<MongoDropIndexesResult> {
|
||||
return post("/api/mongo/drop-indexes", {
|
||||
connectionId,
|
||||
database,
|
||||
|
||||
@@ -2796,6 +2796,17 @@ export interface MongoCollectionStatsResult {
|
||||
nindexes: unknown;
|
||||
}
|
||||
|
||||
export interface MongoDropIndexFailure {
|
||||
name: string;
|
||||
message: string;
|
||||
}
|
||||
|
||||
export interface MongoDropIndexesResult {
|
||||
dropped_names: string[];
|
||||
affected_rows: number;
|
||||
failures?: MongoDropIndexFailure[];
|
||||
}
|
||||
|
||||
export interface MongoGridFsFileInfo {
|
||||
id: string;
|
||||
filename?: string;
|
||||
@@ -3043,7 +3054,7 @@ export async function mongoCreateIndex(connectionId: string, database: string, c
|
||||
});
|
||||
}
|
||||
|
||||
export async function mongoDropIndexes(connectionId: string, database: string, collection: string, indexesJson?: string, single = false): Promise<{ dropped_names: string[]; affected_rows: number }> {
|
||||
export async function mongoDropIndexes(connectionId: string, database: string, collection: string, indexesJson?: string, single = false): Promise<MongoDropIndexesResult> {
|
||||
return invoke("mongo_drop_indexes", {
|
||||
connectionId,
|
||||
database,
|
||||
|
||||
Reference in new issue
Block a user