aboutsummaryrefslogtreecommitdiff
path: root/src/server/IDatabase.ts
diff options
context:
space:
mode:
authoreleanor-park <eleanor_park@brown.edu>2024-08-27 16:44:12 -0400
committereleanor-park <eleanor_park@brown.edu>2024-08-27 16:44:12 -0400
commit39d2bba7bf4b0cc3759931691640083a48cce662 (patch)
tree8bf110760aa926237b6294aec545f48cfc92747d /src/server/IDatabase.ts
parent6f73686ec4dc3e01ae3eacc0150aa59eafea0325 (diff)
parentb8a04a0fedf8ef3612395764a0ecd01f6824ebd1 (diff)
Merge branch 'master' into eleanor-gptdraw
Diffstat (limited to 'src/server/IDatabase.ts')
-rw-r--r--src/server/IDatabase.ts8
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>;