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
+3 -2
View File
@@ -14,7 +14,7 @@
// limitations under the License.
//
import type { ServerStorage, Domain, Tx, TxCUD, Doc, Ref, Class, DocumentQuery, FindResult, FindOptions, Storage, TxBulkWrite } from '@anticrm/core'
import type { ServerStorage, Domain, Tx, TxCUD, Doc, Ref, Class, DocumentQuery, FindResult, FindOptions, Storage, TxBulkWrite, TxResult } from '@anticrm/core'
import core, { Hierarchy, DOMAIN_TX, ModelDb } from '@anticrm/core'
import type { FullTextAdapterFactory, FullTextAdapter } from './types'
import { FullTextIndex } from './fulltext'
@@ -88,7 +88,7 @@ class TServerStorage implements ServerStorage {
return adapter
}
private async routeTx (tx: Tx): Promise<void> {
private async routeTx (tx: Tx): Promise<TxResult> {
if (this.hierarchy.isDerived(tx._class, core.class.TxCUD)) {
const txCUD = tx as TxCUD<Doc>
const domain = this.hierarchy.getDomain(txCUD.objectClass)
@@ -102,6 +102,7 @@ class TServerStorage implements ServerStorage {
} else {
throw new Error('not implemented (routeTx)')
}
return {}
}
}