From bec003c8f487c1d7088c79f8331def5489abea73 Mon Sep 17 00:00:00 2001 From: wangkai Date: Fri, 15 Jul 2022 14:53:31 +0800 Subject: [PATCH] =?UTF-8?q?api=20mock=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangkai --- .../napi/ohos_data_distributedData.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/runtime/main/extend/systemplugin/napi/ohos_data_distributedData.js b/runtime/main/extend/systemplugin/napi/ohos_data_distributedData.js index 1e420cb4..0f3e7711 100644 --- a/runtime/main/extend/systemplugin/napi/ohos_data_distributedData.js +++ b/runtime/main/extend/systemplugin/napi/ohos_data_distributedData.js @@ -229,13 +229,13 @@ export function mockDistributedData() { S4: 6, }, - SyncMode :{ + SyncMode: { PULL_ONLY: 0, PUSH_ONLY: 1, PUSH_PULL: 2, }, - SubscribeType : { + SubscribeType: { SUBSCRIBE_TYPE_LOCAL: 0, SUBSCRIBE_TYPE_REMOTE: 1, SUBSCRIBE_TYPE_ALL: 2, @@ -275,6 +275,17 @@ export function mockDistributedData() { MAX_QUERY_LENGTH: "[PC Preview] unknown MAX_QUERY_LENGTH", MAX_BATCH_SIZE: "[PC Preview] unknown MAX_BATCH_SIZE" }; + const schemaMock = { + root: "[PC Preview] unknown root", + indexes: "[PC Preview] unknown indexes", + mode: "[PC Preview] unknown mode", + skip: "[PC Preview] unknown skip" + }; + const fieldnodeMock = { + default: "[PC Preview] unknown default", + nullable: "[PC Preview] unknown nullable", + type: "[PC Preview] unknown type" + }; const valueTypeMock = { STRING: "[PC Preview] unknown STRING", INTEGER: "[PC Preview] unknown INTEGER", @@ -304,6 +315,7 @@ export function mockDistributedData() { autoSync: "[PC Preview] unknown autoSync", kvStoreType: "[PC Preview] unknown kvStoreType", securityLevel: "[PC Preview] unknown securityLevel", + schema : "[PC Preview] unknown schema" }; const KVStoreClass = class KVStore {