Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
4d5e1cba
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看板
提交
4d5e1cba
编写于
3月 28, 2023
作者:
M
MangTsang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
close resultSet
Signed-off-by:
N
MangTsang
<
mang.tsang@huawei.com
>
上级
6871e8c7
变更
4
展开全部
隐藏空白更改
内联
并排
Showing
4 changed file
with
209 addition
and
202 deletion
+209
-202
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreInsertJsunit.test.js
.../hap/src/main/js/test/RelationalStoreInsertJsunit.test.js
+22
-15
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStorePredicatesJsunit.test.js
.../src/main/js/test/RelationalStorePredicatesJsunit.test.js
+103
-103
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreResultSetJsunit.test.js
...p/src/main/js/test/RelationalStoreResultSetJsunit.test.js
+71
-71
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreUpdateJsunit.test.js
.../hap/src/main/js/test/RelationalStoreUpdateJsunit.test.js
+13
-13
未找到文件。
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreInsertJsunit.test.js
浏览文件 @
4d5e1cba
...
...
@@ -120,7 +120,7 @@ describe('relationalStoreInsertTest', function () {
}
catch
(
e
)
{
console
.
info
(
"
insert1 error
"
+
e
);
}
resultSet
=
null
resultSet
.
close
();
done
()
console
.
info
(
TAG
+
"
************* testRdbStoreInsert0001 end *************
"
);
})
...
...
@@ -263,6 +263,7 @@ describe('relationalStoreInsertTest', function () {
}
catch
(
e
)
{
console
.
info
(
"
BatchInsert1 error
"
+
e
);
}
resultSet
.
close
();
predicates
=
new
data_Rdb
.
RdbPredicates
(
"
test1
"
);
predicates
.
equalTo
(
"
name
"
,
"
lisi
"
)
resultSet
=
await
rdbStore
.
query
(
predicates
)
...
...
@@ -283,7 +284,7 @@ describe('relationalStoreInsertTest', function () {
}
catch
(
e
)
{
console
.
info
(
"
BatchInsert1 error
"
+
e
);
}
resultSet
=
null
resultSet
.
close
();
done
()
console
.
info
(
TAG
+
"
************* testRdbStorebatchInsertPromise0001 end *************
"
);
})
...
...
@@ -332,6 +333,7 @@ describe('relationalStoreInsertTest', function () {
const
age
=
resultSet
.
getLong
(
resultSet
.
getColumnIndex
(
"
age
"
))
const
salary
=
resultSet
.
getDouble
(
resultSet
.
getColumnIndex
(
"
salary
"
))
const
blobType
=
resultSet
.
getBlob
(
resultSet
.
getColumnIndex
(
"
blobType
"
))
resultSet
.
close
();
console
.
info
(
TAG
+
"
id=
"
+
id
+
"
, name=
"
+
name
+
"
, age=
"
+
age
+
"
, salary=
"
+
salary
+
"
, blobType=
"
+
blobType
);
expect
(
2
).
assertEqual
(
id
);
expect
(
"
lisi
"
).
assertEqual
(
name
)
...
...
@@ -343,11 +345,11 @@ describe('relationalStoreInsertTest', function () {
resultSet
=
await
rdbStore
.
query
(
predicates
).
catch
((
err
)
=>
{
expect
(
err
!=
null
).
assertTrue
();
})
resultSet
.
close
();
})
}
catch
(
e
)
{
console
.
info
(
"
BatchInsert2 error
"
+
e
);
}
resultSet
=
null
done
()
console
.
info
(
TAG
+
"
************* testRdbStorebatchInsertPromise0002 end *************
"
);
})
...
...
@@ -397,6 +399,7 @@ describe('relationalStoreInsertTest', function () {
const
age
=
resultSet
.
getLong
(
resultSet
.
getColumnIndex
(
"
age
"
))
const
salary
=
resultSet
.
getDouble
(
resultSet
.
getColumnIndex
(
"
salary
"
))
const
blobType
=
resultSet
.
getBlob
(
resultSet
.
getColumnIndex
(
"
blobType
"
))
resultSet
.
close
();
console
.
info
(
TAG
+
"
id=
"
+
id
+
"
, name=
"
+
name
+
"
, age=
"
+
age
+
"
, salary=
"
+
salary
+
"
, blobType=
"
+
blobType
);
expect
(
1
).
assertEqual
(
id
);
expect
(
"
zhangsan
"
).
assertEqual
(
name
)
...
...
@@ -419,6 +422,7 @@ describe('relationalStoreInsertTest', function () {
const
age
=
resultSet
.
getLong
(
resultSet
.
getColumnIndex
(
"
age
"
))
const
salary
=
resultSet
.
getDouble
(
resultSet
.
getColumnIndex
(
"
salary
"
))
const
blobType
=
resultSet
.
getBlob
(
resultSet
.
getColumnIndex
(
"
blobType
"
))
resultSet
.
close
();
console
.
info
(
TAG
+
"
id=
"
+
id
+
"
, name=
"
+
name
+
"
, age=
"
+
age
+
"
, salary=
"
+
salary
+
"
, blobType=
"
+
blobType
);
expect
(
2
).
assertEqual
(
id
);
expect
(
"
lisi
"
).
assertEqual
(
name
)
...
...
@@ -441,6 +445,7 @@ describe('relationalStoreInsertTest', function () {
const
name
=
resultSet
.
getString
(
resultSet
.
getColumnIndex
(
"
name
"
))
const
age
=
resultSet
.
getLong
(
resultSet
.
getColumnIndex
(
"
age
"
))
const
salary
=
resultSet
.
getDouble
(
resultSet
.
getColumnIndex
(
"
salary
"
))
resultSet
.
close
();
console
.
info
(
TAG
+
"
id=
"
+
id
+
"
, name=
"
+
name
+
"
, age=
"
+
age
+
"
, salary=
"
+
salary
+
"
, blobType=
"
+
blobType
);
expect
(
4
).
assertEqual
(
id
);
expect
(
"
zhangmaowen
"
).
assertEqual
(
name
)
...
...
@@ -452,7 +457,6 @@ describe('relationalStoreInsertTest', function () {
}
catch
(
e
)
{
console
.
info
(
"
BatchInsert1 error
"
+
e
);
}
resultSet
=
null
done
();
console
.
info
(
TAG
+
"
************* testRdbStorebatchInsertPromise0003 end *************
"
);
})
...
...
@@ -494,6 +498,7 @@ describe('relationalStoreInsertTest', function () {
const
age
=
resultSet
.
getLong
(
resultSet
.
getColumnIndex
(
"
age
"
))
const
salary
=
resultSet
.
getDouble
(
resultSet
.
getColumnIndex
(
"
salary
"
))
const
blobType
=
resultSet
.
getBlob
(
resultSet
.
getColumnIndex
(
"
blobType
"
))
resultSet
.
close
();
console
.
info
(
TAG
+
"
id=
"
+
id
+
"
, name=
"
+
name
+
"
, age=
"
+
age
+
"
, salary=
"
+
salary
+
"
, blobType=
"
+
blobType
);
expect
(
56
).
assertEqual
(
id
);
expect
(
"
zhangsan55
"
).
assertEqual
(
name
)
...
...
@@ -505,7 +510,6 @@ describe('relationalStoreInsertTest', function () {
}
catch
(
e
)
{
console
.
info
(
"
BatchInsert1 error
"
+
e
);
}
resultSet
=
null
;
done
()
console
.
info
(
TAG
+
"
************* testRdbStorebatchInsertPromise0004 end *************
"
);
})
...
...
@@ -565,7 +569,7 @@ describe('relationalStoreInsertTest', function () {
}
catch
(
e
)
{
console
.
info
(
"
BatchInsert1 error
"
+
e
);
}
resultSet
=
null
;
resultSet
.
close
()
;
done
();
console
.
info
(
TAG
+
"
************* testRdbStorebatchInsertPromise0005 end *************
"
);
})
...
...
@@ -690,6 +694,7 @@ describe('relationalStoreInsertTest', function () {
}
catch
(
e
)
{
console
.
info
(
"
BatchInsert1 error
"
+
e
);
}
resultSet
.
close
();
predicates
=
new
data_Rdb
.
RdbPredicates
(
"
testcallback1
"
);
predicates
.
equalTo
(
"
name
"
,
"
lisi
"
)
resultSet
=
await
rdbStore
.
query
(
predicates
)
...
...
@@ -710,10 +715,10 @@ describe('relationalStoreInsertTest', function () {
}
catch
(
e
)
{
console
.
info
(
"
BatchInsert1 error
"
+
e
);
}
resultSet
.
close
();
}
done
();
})
resultSet
=
null
})
await
sleep
(
2000
)
done
()
...
...
@@ -764,6 +769,7 @@ describe('relationalStoreInsertTest', function () {
const
age
=
resultSet
.
getLong
(
resultSet
.
getColumnIndex
(
"
age
"
))
const
salary
=
resultSet
.
getDouble
(
resultSet
.
getColumnIndex
(
"
salary
"
))
const
blobType
=
resultSet
.
getBlob
(
resultSet
.
getColumnIndex
(
"
blobType
"
))
resultSet
.
close
();
console
.
info
(
TAG
+
"
id=
"
+
id
+
"
, name=
"
+
name
+
"
, age=
"
+
age
+
"
, salary=
"
+
salary
+
"
, blobType=
"
+
blobType
);
expect
(
2
).
assertEqual
(
id
);
expect
(
"
lisi
"
).
assertEqual
(
name
)
...
...
@@ -775,6 +781,7 @@ describe('relationalStoreInsertTest', function () {
resultSet
=
await
rdbStore
.
query
(
predicates
).
catch
((
err
)
=>
{
expect
(
err
!=
null
).
assertTrue
();
})
resultSet
.
close
();
})
}
catch
(
e
)
{
console
.
info
(
"
BatchInsert2 error
"
+
e
);
...
...
@@ -784,7 +791,6 @@ describe('relationalStoreInsertTest', function () {
})
})
await
sleep
(
2000
)
resultSet
=
null
done
()
console
.
info
(
TAG
+
"
************* testRdbStorebatchInsertCallback0002 end *************
"
);
})
...
...
@@ -832,6 +838,7 @@ describe('relationalStoreInsertTest', function () {
const
name
=
resultSet
.
getString
(
resultSet
.
getColumnIndex
(
"
name
"
))
const
age
=
resultSet
.
getLong
(
resultSet
.
getColumnIndex
(
"
age
"
))
const
salary
=
resultSet
.
getDouble
(
resultSet
.
getColumnIndex
(
"
salary
"
))
resultSet
.
close
();
console
.
info
(
TAG
+
"
id=
"
+
id
+
"
, name=
"
+
name
+
"
, age=
"
+
age
+
"
, salary=
"
+
salary
);
expect
(
1
).
assertEqual
(
id
);
expect
(
"
zhangsan
"
).
assertEqual
(
name
)
...
...
@@ -850,6 +857,7 @@ describe('relationalStoreInsertTest', function () {
const
name
=
resultSet
.
getString
(
resultSet
.
getColumnIndex
(
"
name
"
))
const
age
=
resultSet
.
getLong
(
resultSet
.
getColumnIndex
(
"
age
"
))
const
salary
=
resultSet
.
getDouble
(
resultSet
.
getColumnIndex
(
"
salary
"
))
resultSet
.
close
();
console
.
info
(
TAG
+
"
id=
"
+
id
+
"
, name=
"
+
name
+
"
, age=
"
+
age
+
"
, salary=
"
+
salary
);
expect
(
2
).
assertEqual
(
id
);
expect
(
"
lisi
"
).
assertEqual
(
name
)
...
...
@@ -872,6 +880,7 @@ describe('relationalStoreInsertTest', function () {
const
name
=
resultSet
.
getString
(
resultSet
.
getColumnIndex
(
"
name
"
))
const
age
=
resultSet
.
getLong
(
resultSet
.
getColumnIndex
(
"
age
"
))
const
salary
=
resultSet
.
getDouble
(
resultSet
.
getColumnIndex
(
"
salary
"
))
resultSet
.
close
();
console
.
info
(
TAG
+
"
id=
"
+
id
+
"
, name=
"
+
name
+
"
, age=
"
+
age
+
"
, salary=
"
+
salary
);
expect
(
4
).
assertEqual
(
id
);
expect
(
"
zhangmaowen
"
).
assertEqual
(
name
)
...
...
@@ -888,7 +897,6 @@ describe('relationalStoreInsertTest', function () {
})
})
await
sleep
(
2000
)
resultSet
=
null
done
();
console
.
info
(
TAG
+
"
************* testRdbStorebatchInsertCallback0003 end *************
"
);
})
...
...
@@ -928,6 +936,7 @@ describe('relationalStoreInsertTest', function () {
const
name
=
resultSet
.
getString
(
resultSet
.
getColumnIndex
(
"
name
"
))
const
age
=
resultSet
.
getLong
(
resultSet
.
getColumnIndex
(
"
age
"
))
const
salary
=
resultSet
.
getDouble
(
resultSet
.
getColumnIndex
(
"
salary
"
))
resultSet
.
close
();
console
.
info
(
TAG
+
"
id=
"
+
id
+
"
, name=
"
+
name
+
"
, age=
"
+
age
+
"
, salary=
"
+
salary
);
expect
(
56
).
assertEqual
(
id
);
expect
(
"
zhangsan55
"
).
assertEqual
(
name
)
...
...
@@ -941,7 +950,6 @@ describe('relationalStoreInsertTest', function () {
})
})
await
sleep
(
2000
)
resultSet
=
null
;
done
()
console
.
info
(
TAG
+
"
************* testRdbStorebatchInsertCallback0004 end *************
"
);
})
...
...
@@ -1000,12 +1008,12 @@ describe('relationalStoreInsertTest', function () {
}
catch
(
e
)
{
console
.
info
(
"
BatchInsert1 error
"
+
e
);
}
resultSet
.
close
();
}
done
();
})
})
await
sleep
(
2000
)
resultSet
=
null
;
done
();
console
.
info
(
TAG
+
"
************* testRdbStorebatchInsertCallback0005 end *************
"
);
})
...
...
@@ -1226,8 +1234,7 @@ describe('relationalStoreInsertTest', function () {
}
catch
(
err
)
{
console
.
log
(
TAG
+
"
InsertWithConflictResolution0003 insert error
"
+
err
);
}
resultSet
=
null
resultSet
.
close
();
done
()
console
.
log
(
TAG
+
"
************* InsertWithConflictResolution_0003 end *************
"
);
})
...
...
@@ -1262,6 +1269,7 @@ describe('relationalStoreInsertTest', function () {
}
catch
(
err
)
{
console
.
log
(
TAG
+
"
InsertWithConflictResolution0004 insert error
"
+
err
);
}
resultSet
.
close
();
{
var
u8
=
new
Uint8Array
([
4
,
5
,
6
])
...
...
@@ -1295,8 +1303,7 @@ describe('relationalStoreInsertTest', function () {
}
catch
(
err
)
{
console
.
log
(
TAG
+
"
InsertWithConflictResolution0004 resultSet query error
"
+
err
);
}
resultSet
=
null
resultSet
.
close
();
done
()
console
.
log
(
TAG
+
"
************* InsertWithConflictResolution_0004 end *************
"
);
})
...
...
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStorePredicatesJsunit.test.js
浏览文件 @
4d5e1cba
此差异已折叠。
点击以展开。
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreResultSetJsunit.test.js
浏览文件 @
4d5e1cba
此差异已折叠。
点击以展开。
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreUpdateJsunit.test.js
浏览文件 @
4d5e1cba
...
...
@@ -106,7 +106,7 @@ export default function relationalStoreUpdateTest() {
expect
(
6
).
assertEqual
(
blobType
[
2
]);
console
.
info
(
TAG
+
"
{id=
"
+
id
+
"
, name=
"
+
name
+
"
, age=
"
+
age
+
"
, salary=
"
+
salary
+
"
, blobType=
"
+
blobType
);
expect
(
false
).
assertEqual
(
resultSet
.
goToNextRow
())
resultSet
=
null
resultSet
.
close
()
}).
catch
((
err
)
=>
{
console
.
info
(
TAG
+
"
update error
"
);
expect
(
null
).
assertFail
();
...
...
@@ -349,7 +349,7 @@ export default function relationalStoreUpdateTest() {
+
salary_1
+
"
, blobType=
"
+
blobType_1
);
await
expect
(
false
).
assertEqual
(
resultSet
.
goToNextRow
())
resultSet
=
null
resultSet
.
close
()
done
();
console
.
log
(
TAG
+
"
************* testRdbStoreUpdateWithConflictResolution0001 end *************
"
);
}
...
...
@@ -451,7 +451,7 @@ export default function relationalStoreUpdateTest() {
+
salary_1
+
"
, blobType=
"
+
blobType_1
);
await
expect
(
false
).
assertEqual
(
resultSet
.
goToNextRow
())
resultSet
=
null
resultSet
.
close
()
done
()
console
.
log
(
TAG
+
"
************* testRdbStoreUpdateWithConflictResolution0002 end *************
"
);
}
...
...
@@ -540,7 +540,7 @@ export default function relationalStoreUpdateTest() {
+
salary_1
+
"
, blobType=
"
+
blobType_1
);
await
expect
(
false
).
assertEqual
(
resultSet
.
goToNextRow
())
resultSet
=
null
resultSet
.
close
()
done
();
console
.
log
(
TAG
+
"
************* testRdbStoreUpdateWithConflictResolution0003 end *************
"
);
}
...
...
@@ -643,7 +643,7 @@ export default function relationalStoreUpdateTest() {
+
salary_1
+
"
, blobType=
"
+
blobType_1
);
await
expect
(
false
).
assertEqual
(
resultSet
.
goToNextRow
())
resultSet
=
null
resultSet
.
close
()
done
()
console
.
log
(
TAG
+
"
************* testRdbStoreUpdateWithConflictResolution0004 end *************
"
);
}
...
...
@@ -732,7 +732,7 @@ export default function relationalStoreUpdateTest() {
+
salary_1
+
"
, blobType=
"
+
blobType_1
);
await
expect
(
false
).
assertEqual
(
resultSet
.
goToNextRow
())
resultSet
=
null
resultSet
.
close
()
done
()
console
.
log
(
TAG
+
"
************* testRdbStoreUpdateWithConflictResolution0005 end *************
"
);
}
...
...
@@ -804,7 +804,7 @@ export default function relationalStoreUpdateTest() {
+
salary
+
"
, blobType=
"
+
blobType
);
await
expect
(
false
).
assertEqual
(
resultSet
.
goToNextRow
())
resultSet
=
null
resultSet
.
close
()
done
()
console
.
log
(
TAG
+
"
************* testRdbStoreUpdateWithConflictResolution0006 end *************
"
);
}
...
...
@@ -901,7 +901,7 @@ export default function relationalStoreUpdateTest() {
+
salary_1
+
"
, blobType=
"
+
blobType_1
);
await
expect
(
false
).
assertEqual
(
resultSet
.
goToNextRow
())
resultSet
=
null
resultSet
.
close
()
done
()
console
.
log
(
TAG
+
"
************* testRdbStoreUpdateWithConflictResolution0007 end *************
"
);
}
...
...
@@ -973,7 +973,7 @@ export default function relationalStoreUpdateTest() {
+
salary
+
"
, blobType=
"
+
blobType
);
await
expect
(
false
).
assertEqual
(
resultSet
.
goToNextRow
())
resultSet
=
null
resultSet
.
close
()
done
()
console
.
log
(
TAG
+
"
************* testRdbStoreUpdateWithConflictResolution0008 end *************
"
);
}
...
...
@@ -1069,7 +1069,7 @@ export default function relationalStoreUpdateTest() {
+
salary_1
+
"
, blobType=
"
+
blobType_1
);
await
expect
(
false
).
assertEqual
(
resultSet
.
goToNextRow
())
resultSet
=
null
resultSet
.
close
()
done
()
console
.
log
(
TAG
+
"
************* testRdbStoreUpdateWithConflictResolution0009 end *************
"
);
}
...
...
@@ -1141,7 +1141,7 @@ export default function relationalStoreUpdateTest() {
+
salary
+
"
, blobType=
"
+
blobType
);
await
expect
(
true
).
assertEqual
(
resultSet
.
goToNextRow
())
resultSet
=
null
resultSet
.
close
()
done
()
console
.
log
(
TAG
+
"
************* testRdbStoreUpdateWithConflictResolution0010 end *************
"
);
}
...
...
@@ -1237,7 +1237,7 @@ export default function relationalStoreUpdateTest() {
+
salary_1
+
"
, blobType=
"
+
blobType_1
);
await
expect
(
false
).
assertEqual
(
resultSet
.
goToNextRow
())
resultSet
=
null
resultSet
.
close
()
done
()
console
.
log
(
TAG
+
"
************* testRdbStoreUpdateWithConflictResolution0011 end *************
"
);
}
...
...
@@ -1309,7 +1309,7 @@ export default function relationalStoreUpdateTest() {
+
salary
+
"
, blobType=
"
+
blobType
);
await
expect
(
false
).
assertEqual
(
resultSet
.
goToNextRow
())
resultSet
=
null
resultSet
.
close
()
done
()
console
.
log
(
TAG
+
"
************* testRdbStoreUpdateWithConflictResolution0012 end *************
"
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录