introduce TxResult

Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
Andrey Platov
2021-10-13 18:46:48 +02:00
parent e080f6e724
commit d75d17bfec
19 changed files with 127 additions and 92 deletions
+5 -3
View File
@@ -15,7 +15,7 @@
//
import { DOMAIN_TX } from '@anticrm/core'
import type { Ref, Doc } from '@anticrm/core'
import type { Ref, Doc, TxResult } from '@anticrm/core'
import { start as startJsonRpc } from '@anticrm/server-ws'
import { createInMemoryAdapter, createInMemoryTxAdapter } from '@anticrm/dev-storage'
import { createServerStorage, FullTextAdapter, IndexedDoc } from '@anticrm/server-core'
@@ -25,11 +25,13 @@ import { addLocation } from '@anticrm/platform'
import { serverChunterId } from '@anticrm/server-chunter'
class NullFullTextAdapter implements FullTextAdapter {
async index (doc: IndexedDoc): Promise<void> {
async index (doc: IndexedDoc): Promise<TxResult> {
console.log('noop full text indexer: ', doc)
return {}
}
async update (id: Ref<Doc>, update: Record<string, any>): Promise<void> {
async update (id: Ref<Doc>, update: Record<string, any>): Promise<TxResult> {
return {}
}
async search (query: any): Promise<IndexedDoc[]> {