aboutsummaryrefslogtreecommitdiff
path: root/src/server/IDatabase.ts
diff options
context:
space:
mode:
authorusodhi <61431818+usodhi@users.noreply.github.com>2020-05-15 22:41:58 +0530
committerusodhi <61431818+usodhi@users.noreply.github.com>2020-05-15 22:41:58 +0530
commit0cc83ef72b6b1b254d97bf07a97dd1fe936aa25a (patch)
treebce434d8545a953fd943743f0714609f23529220 /src/server/IDatabase.ts
parent9c0b8ab5820232292e02fbf453e50261137a533c (diff)
parent98c7540fff67c232c1b04f2130ee624f9a70afbd (diff)
resolved conflicts
Diffstat (limited to 'src/server/IDatabase.ts')
-rw-r--r--src/server/IDatabase.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/IDatabase.ts b/src/server/IDatabase.ts
index 6a63df485..dd4968579 100644
--- a/src/server/IDatabase.ts
+++ b/src/server/IDatabase.ts
@@ -2,7 +2,6 @@ import * as mongodb from 'mongodb';
import { Transferable } from './Message';
export const DocumentsCollection = 'documents';
-export const NewDocumentsCollection = 'newDocuments';
export interface IDatabase {
update(id: string, value: any, callback: (err: mongodb.MongoError, res: mongodb.UpdateWriteOpResult) => void, upsert?: boolean, collectionName?: string): Promise<void>;
updateMany(query: any, update: any, collectionName?: string): Promise<mongodb.WriteOpResult>;
@@ -12,12 +11,13 @@ export interface IDatabase {
delete(query: any, collectionName?: string): Promise<mongodb.DeleteWriteOpResultObject>;
delete(id: string, collectionName?: string): Promise<mongodb.DeleteWriteOpResultObject>;
- deleteAll(collectionName?: string, persist?: boolean): Promise<any>;
+ dropSchema(...schemaNames: string[]): Promise<any>;
insert(value: any, collectionName?: string): Promise<void>;
getDocument(id: string, fn: (result?: Transferable) => void, collectionName?: string): void;
getDocuments(ids: string[], fn: (result: Transferable[]) => void, collectionName?: string): void;
+ getCollectionNames(): Promise<string[]>;
visit(ids: string[], fn: (result: any) => string[] | Promise<string[]>, collectionName?: string): Promise<void>;
query(query: { [key: string]: any }, projection?: { [key: string]: 0 | 1 }, collectionName?: string): Promise<mongodb.Cursor>;