Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
e0568976
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
e0568976
编写于
7月 07, 2022
作者:
Y
yanglifeng1217
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
<yanglifeng5@huawei.com>
Signed-off-by:
N
yanglifeng1217
<
yanglifeng5@huawei.com
>
上级
78ff0d0e
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
120 addition
and
116 deletion
+120
-116
distributeddatamgr/BUILD.gn
distributeddatamgr/BUILD.gn
+1
-0
distributeddatamgr/windowStage/dataShareRdbtest/entry/src/main/ets/Test/DataShareCombinationRdb.ets
...btest/entry/src/main/ets/Test/DataShareCombinationRdb.ets
+15
-16
distributeddatamgr/windowStage/dataShareRdbtest/entry/src/main/ets/Test/DataSharePredicatesRdb.ets
...dbtest/entry/src/main/ets/Test/DataSharePredicatesRdb.ets
+17
-17
distributeddatamgr/windowStage/dataShareRdbtest/entry/src/main/ets/Test/DataSharePublicfunction_Callback.ets
...ry/src/main/ets/Test/DataSharePublicfunction_Callback.ets
+24
-24
distributeddatamgr/windowStage/dataShareRdbtest/entry/src/main/ets/Test/DataSharePublicfunction_Promise.ets
...try/src/main/ets/Test/DataSharePublicfunction_Promise.ets
+25
-23
distributeddatamgr/windowStage/dataShareRdbtest/entry/src/main/ets/Test/DataShareSingleRdb_Callback.ets
...t/entry/src/main/ets/Test/DataShareSingleRdb_Callback.ets
+15
-14
distributeddatamgr/windowStage/dataShareRdbtest/entry/src/main/ets/Test/DataShareSingleRdb_Promise.ets
...st/entry/src/main/ets/Test/DataShareSingleRdb_Promise.ets
+17
-16
distributeddatamgr/windowStage/server/rdbService/BUILD.gn
distributeddatamgr/windowStage/server/rdbService/BUILD.gn
+6
-6
未找到文件。
distributeddatamgr/BUILD.gn
浏览文件 @
e0568976
...
...
@@ -19,6 +19,7 @@ group("distributeddatamgr") {
"appdatamgrjstest/hap:appdatamgr_js_test",
"distributeddataObjectjstest/hap:distributeddataObject_js_test",
"distributeddatamgrjstest/hap:distributeddatamgr_js_test",
"windowStage:windowStage",
]
} else {
deps = [
...
...
distributeddatamgr/windowStage/dataShareRdbtest/entry/src/main/ets/Test/DataShareCombinationRdb.ets
浏览文件 @
e0568976
/*
* Copyright (C
) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
* Copyright (c
) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'hypium/index'
import dataShare from '@ohos.data.dataShare'
...
...
@@ -214,8 +214,8 @@ export default function DataShareCombinationRdb() {
expect(err).assertFail();
}
})
/*
/*
* @tc.number : SUB_DDM_DataShare_ETS_DataShareCombinationRdb005
* @tc.name : Use getEntries get the value by mixing the string key
* @tc.desc : Off off
...
...
@@ -237,7 +237,6 @@ export default function DataShareCombinationRdb() {
}
})
/*
* @tc.number : SUB_DDM_DataShare_ETS_DataShareCombinationRdb0106
* @tc.name : Use getEntries get the value by mixing the string key
...
...
distributeddatamgr/windowStage/dataShareRdbtest/entry/src/main/ets/Test/DataSharePredicatesRdb.ets
浏览文件 @
e0568976
/*
* Copyright (C
) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
* Copyright (c
) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'hypium/index'
import dataShare from '@ohos.data.dataShare'
...
...
@@ -79,7 +79,7 @@ Between.between("age", 18, 19)
let NotBetween = new dataSharePredicates.DataSharePredicates();
NotBetween.notBetween("age", 19, 20);
let Distinct = new dataSharePredicates.DataSharePredicates();
Distinct.equalTo("age", 18).distinct(
"age"
);
Distinct.equalTo("age", 18).distinct();
let GroupBy = new dataSharePredicates.DataSharePredicates();
GroupBy.groupBy(["name"]);
let IndexedBy = new dataSharePredicates.DataSharePredicates();
...
...
@@ -1035,8 +1035,8 @@ export default function DataSharePredicatesRdb() {
done();
}
})
/*
/*
* @tc.number : SUB_DDM_DataShare_ETS_DataSharePredicatesRdb0124
* @tc.name : Use getEntries get the value by mixing the string key
* @tc.desc : DataShare Supports Predicates
...
...
@@ -1079,7 +1079,7 @@ export default function DataSharePredicatesRdb() {
try {
await pubfun.publicinsert(globalThis.helper, uri, Insert).then((data) => {
console.info("TestDataShare going batchInsert = " + data);
IndexedBy.indexedBy(data);
IndexedBy.indexedBy(
globalThis.insert
data);
})
await pubfun.publicquery(globalThis.helper, uri, IndexedBy, ["*"]).then((data) => {
console.info("TestDataShare going query = " + data);
...
...
distributeddatamgr/windowStage/dataShareRdbtest/entry/src/main/ets/Test/DataSharePublicfunction_Callback.ets
浏览文件 @
e0568976
/*
* Copyright (C) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
file
from
'@system.file'
;
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
file
from
'@system.file'
;
import
{
describe
,
it
,
expect
}
from
'hypium/index'
import
dataShare
from
'@ohos.data.dataShare'
import
dataSharePredicates
from
'@ohos.data.dataSharePredicates'
...
...
@@ -24,7 +23,8 @@ import DataShareResultSet from '@ohos.data.DataShareResultSet'
function
publicinsert
(
helper
,
uri
,
DataShareValuesBucket
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
helper
.
insert
(
uri
,
DataShareValuesBucket
,
(
err
,
data
)
=>
{
console
.
info
(
"TestDataShare publicinsert Callback="
+
JSON
.
stringify
(
data
));
console
.
info
(
"[ttt] [TestDataShare] publicinsert Callback="
+
JSON
.
stringify
(
data
));
globalThis
.
insertdata
=
data
;
if
(
err
)
{
console
.
info
(
"test insert err information: "
+
JSON
.
stringify
(
err
));
reject
(
err
);
...
...
@@ -55,7 +55,7 @@ async function publicdelete(helper, uri, DataSharePredicates) {
function
publicquery
(
helper
,
uri
,
DataSharePredicates
,
columns
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
helper
.
query
(
uri
,
DataSharePredicates
,
columns
,
(
err
,
data
)
=>
{
console
.
info
(
"
TestDataShare
publicquery Callback="
+
JSON
.
stringify
(
data
));
console
.
info
(
"
[ttt] [TestDataShare]
publicquery Callback="
+
JSON
.
stringify
(
data
));
globalThis
.
ResultSet
=
data
;
if
(
err
)
{
console
.
info
(
"test query err information: "
+
JSON
.
stringify
(
err
));
...
...
@@ -71,7 +71,7 @@ function publicquery(helper, uri, DataSharePredicates, columns) {
function
publicupdate
(
helper
,
uri
,
DataSharePredicates
,
DataShareValuesBucket
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
helper
.
update
(
uri
,
DataSharePredicates
,
DataShareValuesBucket
,
(
err
,
data
)
=>
{
console
.
info
(
"
TestDataShare
publicupdate Callback="
+
JSON
.
stringify
(
data
));
console
.
info
(
"
[ttt] [TestDataShare]
publicupdate Callback="
+
JSON
.
stringify
(
data
));
if
(
err
)
{
console
.
info
(
"test update err information: "
+
JSON
.
stringify
(
err
));
reject
(
err
);
...
...
@@ -86,7 +86,7 @@ function publicupdate(helper, uri, DataSharePredicates, DataShareValuesBucket) {
function
publicbatchInsert
(
helper
,
uri
,
DataShareValuesBucket
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
helper
.
batchInsert
(
uri
,
DataShareValuesBucket
,
(
err
,
data
)
=>
{
console
.
info
(
"
TestDataShare
publicbatchInsert Callback="
+
JSON
.
stringify
(
data
));
console
.
info
(
"
[ttt] [TestDataShare]
publicbatchInsert Callback="
+
JSON
.
stringify
(
data
));
if
(
err
)
{
console
.
info
(
"test batchInsert err information: "
+
JSON
.
stringify
(
err
));
reject
(
err
);
...
...
@@ -101,7 +101,7 @@ function publicbatchInsert(helper, uri, DataShareValuesBucket) {
function
publicgetType
(
helper
,
uri
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
helper
.
getType
(
uri
,
(
err
,
data
)
=>
{
console
.
info
(
"
TestDataShare
publicgetType Callback="
+
JSON
.
stringify
(
data
));
console
.
info
(
"
[ttt] [TestDataShare]
publicgetType Callback="
+
JSON
.
stringify
(
data
));
if
(
err
)
{
console
.
info
(
"test getType err information: "
+
JSON
.
stringify
(
err
));
reject
(
err
);
...
...
@@ -116,7 +116,7 @@ function publicgetType(helper, uri) {
function
publicgetFileTypes
(
helper
,
uri
,
mimeTypeFilter
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
helper
.
getFileTypes
(
uri
,
mimeTypeFilter
,
(
err
,
data
)
=>
{
console
.
info
(
"
TestDataShare
publicgetFileTypes Callback="
+
JSON
.
stringify
(
data
));
console
.
info
(
"
[ttt] [TestDataShare]
publicgetFileTypes Callback="
+
JSON
.
stringify
(
data
));
if
(
err
)
{
console
.
info
(
"test getFileTypes err information: "
+
JSON
.
stringify
(
err
));
reject
(
err
);
...
...
@@ -131,7 +131,7 @@ function publicgetFileTypes(helper, uri, mimeTypeFilter) {
function
publicnormalizeUri
(
helper
,
uri
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
helper
.
normalizeUri
(
uri
,
(
err
,
data
)
=>
{
console
.
info
(
"
TestDataShare
publicnormalizeUri Callback="
+
JSON
.
stringify
(
data
));
console
.
info
(
"
[ttt] [TestDataShare]
publicnormalizeUri Callback="
+
JSON
.
stringify
(
data
));
if
(
err
)
{
console
.
info
(
"test normalizeUri err information: "
+
JSON
.
stringify
(
err
));
reject
(
err
);
...
...
@@ -146,7 +146,7 @@ function publicnormalizeUri(helper, uri) {
function
publicdenormalizeUri
(
helper
,
uri
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
helper
.
denormalizeUri
(
uri
,
(
err
,
data
)
=>
{
console
.
info
(
"
TestDataShare
publicdenormalizeUri Callback="
+
JSON
.
stringify
(
data
));
console
.
info
(
"
[ttt] [TestDataShare]
publicdenormalizeUri Callback="
+
JSON
.
stringify
(
data
));
if
(
err
)
{
console
.
info
(
"test denormalizeUri err information: "
+
JSON
.
stringify
(
err
));
reject
(
err
);
...
...
@@ -161,7 +161,7 @@ function publicdenormalizeUri(helper, uri) {
function
publicopenFile
(
helper
,
uri
,
mode
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
helper
.
denormalizeUri
(
uri
,
mode
,
(
err
,
data
)
=>
{
console
.
info
(
"
TestDataShare
publicopenFile Callback="
+
JSON
.
stringify
(
data
));
console
.
info
(
"
[ttt] [TestDataShare]
publicopenFile Callback="
+
JSON
.
stringify
(
data
));
if
(
err
)
{
console
.
info
(
"test openFile err information: "
+
JSON
.
stringify
(
err
));
reject
(
err
);
...
...
distributeddatamgr/windowStage/dataShareRdbtest/entry/src/main/ets/Test/DataSharePublicfunction_Promise.ets
浏览文件 @
e0568976
/*
* Copyright (C
) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
* Copyright (c
) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import file from '@system.file';
import { describe, it, expect } from 'hypium/index'
import dataShare from '@ohos.data.dataShare'
import dataSharePredicates from '@ohos.data.dataSharePredicates'
...
...
@@ -22,7 +23,8 @@ import DataShareResultSet from '@ohos.data.DataShareResultSet'
function publicinsert(helper, uri, DataShareValuesBucket) {
return new Promise(function (resolve, reject) {
helper.insert(uri, DataShareValuesBucket).then((data) => {
console.info("TestDataShare publicinsert Callback=" + JSON.stringify(data));
console.info("[ttt] [TestDataShare] publicinsert Callback=" + JSON.stringify(data));
globalThis.insertdata = data;
resolve(data);
}).catch((err) => {
console.info("test insert err information: " + JSON.stringify(err));
...
...
@@ -35,7 +37,7 @@ function publicinsert(helper, uri, DataShareValuesBucket) {
function publicdelete(helper, uri, DataSharePredicates) {
return new Promise(function (resolve, reject) {
helper.delete(uri, DataSharePredicates).then((data) => {
console.info("
TestDataShare
publicdelete Callback=" + JSON.stringify(data));
console.info("
[ttt] [TestDataShare]
publicdelete Callback=" + JSON.stringify(data));
resolve(data);
}).catch((err) => {
console.info("test delete err information: " + JSON.stringify(err));
...
...
@@ -48,7 +50,7 @@ function publicdelete(helper, uri, DataSharePredicates) {
function publicquery(helper, uri, columns, DataSharePredicates) {
return new Promise(function (resolve, reject) {
helper.query(uri, columns, DataSharePredicates).then((data) => {
console.info("
TestDataShare
publicquery Callback=" + JSON.stringify(data));
console.info("
[ttt] [TestDataShare]
publicquery Callback=" + JSON.stringify(data));
globalThis.ResultSet = data;
resolve(data);
}).catch((err) => {
...
...
@@ -62,7 +64,7 @@ function publicquery(helper, uri, columns, DataSharePredicates) {
function publicupdate(helper, uri, DataShareValuesBucket, DataSharePredicates) {
return new Promise(function (resolve, reject) {
helper.update(uri, DataShareValuesBucket, DataSharePredicates).then((data) => {
console.info("
TestDataShare
publicupdate Callback=" + JSON.stringify(data));
console.info("
[ttt] [TestDataShare]
publicupdate Callback=" + JSON.stringify(data));
resolve(data);
}).catch((err) => {
console.info("test update err information: " + JSON.stringify(err));
...
...
@@ -75,7 +77,7 @@ function publicupdate(helper, uri, DataShareValuesBucket, DataSharePredicates) {
function publicbatchInsert(helper, uri, DataShareValuesBucket) {
return new Promise(function (resolve, reject) {
helper.batchInsert(uri, DataShareValuesBucket).then((data) => {
console.info("
TestDataShare
publicbatchInsert Callback=" + JSON.stringify(data));
console.info("
[ttt] [TestDataShare]
publicbatchInsert Callback=" + JSON.stringify(data));
resolve(data);
}).catch((err) => {
console.info("test batchInsert err information: " + JSON.stringify(err));
...
...
@@ -88,7 +90,7 @@ function publicbatchInsert(helper, uri, DataShareValuesBucket) {
function publicgetType(helper, uri) {
return new Promise(function (resolve, reject) {
helper.getType(uri).then((data) => {
console.info("
TestDataShare
publicgetType Callback=" + JSON.stringify(data));
console.info("
[ttt] [TestDataShare]
publicgetType Callback=" + JSON.stringify(data));
resolve(data);
}).catch((err) => {
console.info("test getType err information: " + JSON.stringify(err));
...
...
@@ -101,7 +103,7 @@ function publicgetType(helper, uri) {
function publicgetFileTypes(helper, uri, mimeTypeFilter) {
return new Promise(function (resolve, reject) {
helper.getFileTypes(uri, mimeTypeFilter).then((data) => {
console.info("
TestDataShare
publicgetFileTypes Callback=" + JSON.stringify(data));
console.info("
[ttt] [TestDataShare]
publicgetFileTypes Callback=" + JSON.stringify(data));
resolve(data);
}).catch((err) => {
console.info("test getFileTypes err information: " + JSON.stringify(err));
...
...
@@ -114,7 +116,7 @@ function publicgetFileTypes(helper, uri, mimeTypeFilter) {
function publicnormalizeUri(helper, uri) {
return new Promise(function (resolve, reject) {
helper.normalizeUri(uri).then((data) => {
console.info("
TestDataShare
publicnormalizeUri Callback=" + JSON.stringify(data));
console.info("
[ttt] [TestDataShare]
publicnormalizeUri Callback=" + JSON.stringify(data));
resolve(data);
}).catch((err) => {
console.info("test normalizeUri err information: " + JSON.stringify(err));
...
...
@@ -127,7 +129,7 @@ function publicnormalizeUri(helper, uri) {
function publicdenormalizeUri(helper, uri) {
return new Promise(function (resolve, reject) {
helper.denormalizeUri(uri).then((data) => {
console.info("
TestDataShare
publicdenormalizeUri Callback=" + JSON.stringify(data));
console.info("
[ttt] [TestDataShare]
publicdenormalizeUri Callback=" + JSON.stringify(data));
resolve(data);
}).catch((err) => {
console.info("test denormalizeUri err information: " + JSON.stringify(err));
...
...
@@ -140,7 +142,7 @@ function publicdenormalizeUri(helper, uri) {
function publicopenFile(helper, uri, mode) {
return new Promise(function (resolve, reject) {
helper.openFile(uri, mode).then((data) => {
console.info("
TestDataShare
publicopenFile Callback=" + JSON.stringify(data));
console.info("
[ttt] [TestDataShare]
publicopenFile Callback=" + JSON.stringify(data));
resolve(data);
}).catch((err) => {
console.info("test openFile err information: " + JSON.stringify(err));
...
...
distributeddatamgr/windowStage/dataShareRdbtest/entry/src/main/ets/Test/DataShareSingleRdb_Callback.ets
浏览文件 @
e0568976
/*
* Copyright (C
) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
* Copyright (c
) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'hypium/index'
import dataShare from '@ohos.data.dataShare'
...
...
@@ -39,6 +39,7 @@ let UpdateString = { "name": "suns" };
let UpdateBoolean = { "isStudent": false };
let UpdateUint8Array = { "Binary": new Uint8Array([1, 2, 3, 4]) };
let UpdateNull = { "name": "1" };
globalThis.Uint8 = new Uint8Array([1, 2, 3]);
//Predicates
let PredicatesNumber = new dataSharePredicates.DataSharePredicates();
...
...
@@ -48,7 +49,7 @@ PredicatesString.equalTo("name", "sun");
let PredicatesBoolean = new dataSharePredicates.DataSharePredicates();
PredicatesBoolean.equalTo("isStudent", true);
let PredicatesUint8Array = new dataSharePredicates.DataSharePredicates();
PredicatesUint8Array.equalTo("Binary",
new Uint8Array([1, 2, 3])
);
PredicatesUint8Array.equalTo("Binary",
globalThis.Uint8
);
let PredicatesNull = new dataSharePredicates.DataSharePredicates();
PredicatesNull.equalTo("name", "");
let PredicatesAll = new dataSharePredicates.DataSharePredicates();
...
...
distributeddatamgr/windowStage/dataShareRdbtest/entry/src/main/ets/Test/DataShareSingleRdb_Promise.ets
浏览文件 @
e0568976
/*
* Copyright (C
) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
* Copyright (c
) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'hypium/index'
import dataShare from '@ohos.data.dataShare'
...
...
@@ -39,6 +39,7 @@ let UpdateString = { "name": "suns" };
let UpdateBoolean = { "isStudent": false };
let UpdateUint8Array = { "Binary": new Uint8Array([1, 2, 3, 4]) };
let UpdateNull = { "name": "1" };
globalThis.Uint8 = new Uint8Array([1, 2, 3]);
//Predicates
let PredicatesNumber = new dataSharePredicates.DataSharePredicates();
...
...
@@ -48,7 +49,7 @@ PredicatesString.equalTo("name", "sun");
let PredicatesBoolean = new dataSharePredicates.DataSharePredicates();
PredicatesBoolean.equalTo("isStudent", true);
let PredicatesUint8Array = new dataSharePredicates.DataSharePredicates();
PredicatesUint8Array.equalTo("Binary",
new Uint8Array([1, 2, 3])
);
PredicatesUint8Array.equalTo("Binary",
globalThis.Uint8
);
let PredicatesNull = new dataSharePredicates.DataSharePredicates();
PredicatesNull.equalTo("name", "");
let PredicatesAll = new dataSharePredicates.DataSharePredicates();
...
...
@@ -103,7 +104,7 @@ export default function DataShareSingleRdb_Promise() {
})
/*
* @tc.number : SUB_DDM_DataShare_
J
S_DataShareInsertRdb0101
* @tc.number : SUB_DDM_DataShare_
ET
S_DataShareInsertRdb0101
* @tc.name : Use getEntries get the value by mixing the string key
* @tc.desc : Insert number type data in Rdb
* @tc.size : MediumTest
...
...
@@ -917,7 +918,7 @@ export default function DataShareSingleRdb_Promise() {
})
/*
* @tc.number :
SUB_DDM_DataShare_ETS_
DataShareGetFileTypes0101
* @tc.number : DataShareGetFileTypes0101
* @tc.name : Use getEntries get the value by mixing the string key
* @tc.desc : Support GetFileTypes function
* @tc.size : MediumTest
...
...
distributeddatamgr/windowStage/server/rdbService/BUILD.gn
浏览文件 @
e0568976
...
...
@@ -22,23 +22,23 @@ ohos_hap("ActsRdbServiceHap") {
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
js_build_mode = "debug"
deps = [
":
kv
Service_js_assets",
":
kv
Service_resources",
":
rdb
Service_js_assets",
":
rdb
Service_resources",
]
ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b"
}
ohos_app_scope("dataShare
kv
_app_profile") {
ohos_app_scope("dataShare
rdb
_app_profile") {
app_profile = "AppScope/app.json"
sources = [ "AppScope/resources" ]
}
ohos_js_assets("
kv
Service_js_assets") {
ohos_js_assets("
rdb
Service_js_assets") {
source_dir = "./entry/src/main/ets"
}
ohos_resources("
kv
Service_resources") {
ohos_resources("
rdb
Service_resources") {
sources = [ "./entry/src/main/resources" ]
deps = [ ":dataShare
kv
_app_profile" ]
deps = [ ":dataShare
rdb
_app_profile" ]
hap_profile = "./entry/src/main/module.json"
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录