| 46 | } |
| 47 | |
| 48 | export interface EntityStore { |
| 49 | applyChanges( |
| 50 | tx: KVStoreTransaction, |
| 51 | buffer: DBChanges, |
| 52 | options: ApplyChangesOptions |
| 53 | ): Promise<DBChanges>; |
| 54 | getEntity( |
| 55 | storage: KVStoreOrTransaction, |
| 56 | collection: string, |
| 57 | id: string |
| 58 | // TODO: make this null |
| 59 | ): Promise<DBEntity | undefined>; |
| 60 | getEntitiesInCollection( |
| 61 | storage: KVStoreOrTransaction, |
| 62 | collection: CollectionName |
| 63 | ): AsyncIterable<DBEntity>; |
| 64 | getCollectionStats( |
| 65 | storage: KVStoreOrTransaction, |
| 66 | knownCollections?: CollectionName[] |
| 67 | ): Promise<Map<string, number>>; |
| 68 | } |
| 69 | |
| 70 | export interface WriteBuffer { |
| 71 | clear(tx: KVStoreTransaction): Promise<void>; |
no outgoing calls
no test coverage detected