aboutsummaryrefslogtreecommitdiff
path: root/src/server/IDatabase.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-09-02 09:26:37 -0400
committerbobzel <zzzman@gmail.com>2024-09-02 09:26:37 -0400
commitcda69e48361fce8d71a4dc66edd9dd976a27f52d (patch)
tree82b9a1a5967ae88a9534f89f7eaed3aeb289652f /src/server/IDatabase.ts
parentc01828308714874589d1f60c33ca59df4c656c0c (diff)
parenta958577d4c27b276aa37484e3f895e196138b17c (diff)
Merge branch 'master' into alyssa-starter
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>;