diff options
Diffstat (limited to 'src/server/IDatabase.ts')
-rw-r--r-- | src/server/IDatabase.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/IDatabase.ts b/src/server/IDatabase.ts index 2274792b3..481b64d4a 100644 --- a/src/server/IDatabase.ts +++ b/src/server/IDatabase.ts @@ -1,5 +1,5 @@ import * as mongodb from 'mongodb'; -import { Transferable } from './Message'; +import { serializedDoctype } from '../fields/ObjectField'; export const DocumentsCollection = 'documents'; export interface IDatabase { @@ -13,10 +13,10 @@ export interface IDatabase { dropSchema(...schemaNames: string[]): Promise<any>; - insert(value: any, collectionName?: string): Promise<void>; + insert(value: { _id: string }, collectionName?: string): Promise<void>; - getDocument(id: string, fn: (result?: Transferable) => void, collectionName?: string): void; - getDocuments(ids: string[], fn: (result: Transferable[]) => void, collectionName?: string): void; + getDocument(id: string, fn: (result?: serializedDoctype) => void, collectionName?: string): void; + getDocuments(ids: string[], fn: (result: serializedDoctype[]) => void, collectionName?: string): void; getCollectionNames(): Promise<string[]>; visit(ids: string[], fn: (result: any) => string[] | Promise<string[]>, collectionName?: string): Promise<void>; |