Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
0d9c742e
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0d9c742e
编写于
10月 22, 2021
作者:
O
openharmony_ci
提交者:
Gitee
10月 22, 2021
浏览文件
操作
浏览文件
下载
差异文件
!961 fixed rdb store testcases error issues
Merge pull request !961 from smagicyun/master
上级
00028fe8
f6d4f06a
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
226 addition
and
225 deletion
+226
-225
distributeddatamgr/appdatamgrjstest/hap/src/main/js/default/test/DataAbilityPredicatesJsunit.test.js
.../main/js/default/test/DataAbilityPredicatesJsunit.test.js
+214
-213
distributeddatamgr/appdatamgrjstest/hap/src/main/js/default/test/List.test.js
...ppdatamgrjstest/hap/src/main/js/default/test/List.test.js
+1
-1
distributeddatamgr/appdatamgrjstest/hap/src/main/js/default/test/RdbStoreResultSetJsunit.test.js
.../src/main/js/default/test/RdbStoreResultSetJsunit.test.js
+1
-1
distributeddatamgr/appdatamgrjstest/hap/src/main/js/default/test/RdbstorePredicatesJsunit.test.js
...src/main/js/default/test/RdbstorePredicatesJsunit.test.js
+8
-8
distributeddatamgr/appdatamgrjstest/hap/src/main/js/default/test/StorageHelperJsunit.test.js
.../hap/src/main/js/default/test/StorageHelperJsunit.test.js
+1
-1
distributeddatamgr/appdatamgrjstest/hap/src/main/js/default/test/StorageSyncJsunit.test.js
...st/hap/src/main/js/default/test/StorageSyncJsunit.test.js
+1
-1
未找到文件。
distributeddatamgr/appdatamgrjstest/hap/src/main/js/default/test/DataAbilityPredicatesJsunit.test.js
浏览文件 @
0d9c742e
...
...
@@ -13,9 +13,9 @@
* limitations under the License.
*/
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
import
ohos_data_r
db
from
'
@ohos.data.rdb
'
;
import
data
_dataa
bility
from
'
@ohos.data.dataability
'
;
import
ability_
featureAbility
from
'
@ohos.ability.featureAbility
'
;
import
dataR
db
from
'
@ohos.data.rdb
'
;
import
data
A
bility
from
'
@ohos.data.dataability
'
;
import
featureAbility
from
'
@ohos.ability.featureAbility
'
;
const
TAG
=
"
[RDB_JSKITS _TEST]
"
const
CREATE_TABLE_ALL_DATA_TYPE_SQL
=
"
CREATE TABLE IF NOT EXISTS AllDataType
"
...
...
@@ -32,12 +32,13 @@ const STORE_CONFIG = {
}
var
rdbStore
=
undefined
;
var
context
=
undefined
;
var
DOUBLE_MAX
=
9223372036854775807
;
describe
(
'
dataAbilityPredicatesTest
'
,
function
()
{
beforeAll
(
async
function
()
{
console
.
info
(
TAG
+
'
beforeAll
'
)
context
=
await
ability_
featureAbility
.
getContext
();
rdbStore
=
await
ohos_data_r
db
.
getRdbStore
(
context
,
STORE_CONFIG
,
1
);
context
=
await
featureAbility
.
getContext
();
rdbStore
=
await
dataR
db
.
getRdbStore
(
context
,
STORE_CONFIG
,
1
);
await
rdbStore
.
executeSql
(
CREATE_TABLE_ALL_DATA_TYPE_SQL
,
null
);
await
buildAllDataType1
();
await
buildAllDataType2
();
...
...
@@ -55,7 +56,7 @@ describe('dataAbilityPredicatesTest', function () {
afterAll
(
async
function
()
{
console
.
info
(
TAG
+
'
afterAll
'
)
rdbStore
=
null
await
ohos_data_r
db
.
deleteRdbStore
(
context
,
"
Predicates.db
"
);
await
dataR
db
.
deleteRdbStore
(
context
,
"
Predicates.db
"
);
})
function
resultSize
(
resultSet
)
{
...
...
@@ -75,7 +76,7 @@ describe('dataAbilityPredicatesTest', function () {
var
u8
=
new
Uint8Array
([
1
,
2
,
3
])
const
valueBucket
=
{
"
integerValue
"
:
2147483647
,
"
doubleValue
"
:
Number
.
MAX_VALUE
,
"
doubleValue
"
:
DOUBLE_MAX
,
"
booleanValue
"
:
true
,
"
floatValue
"
:
-
0.123
,
"
longValue
"
:
9223372036854775807
,
...
...
@@ -139,9 +140,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testEqualTo0001
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testEqualTo0001 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
equalTo
(
"
booleanValue
"
,
true
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
1
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -159,9 +160,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testEqualTo0002
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testEqualTo0002 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
equalTo
(
"
byteValue
"
,
-
128
).
or
().
equalTo
(
"
byteValue
"
,
1
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
2
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -179,9 +180,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testEqualTo0003
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testEqualTo0003 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
equalTo
(
"
stringValue
"
,
"
ABCDEFGHIJKLMN
"
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
3
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -199,9 +200,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testEqualTo0004
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testEqualTo0004 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
equalTo
(
"
doubleValue
"
,
Number
.
MAX_VALUE
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
equalTo
(
"
doubleValue
"
,
DOUBLE_MAX
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
1
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -219,9 +220,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testEqualTo0005
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testEqualTo0005 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
equalTo
(
"
shortValue
"
,
-
32768.0
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
1
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -239,9 +240,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testEqualTo0006
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testEqualTo0006 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
equalTo
(
"
integerValue
"
,
1
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
true
).
assertEqual
(
result
.
goToFirstRow
());
...
...
@@ -259,9 +260,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testEqualTo0007
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testEqualTo0007 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
equalTo
(
"
longValue
"
,
1
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
true
).
assertEqual
(
result
.
goToFirstRow
());
...
...
@@ -279,9 +280,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testEqualTo0008
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testEqualTo0008 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
equalTo
(
"
floatValue
"
,
-
0.123
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
true
).
assertEqual
(
result
.
goToFirstRow
());
...
...
@@ -300,9 +301,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testNotEqualTo0001
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testNotEqualTo0001 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
notEqualTo
(
"
booleanValue
"
,
true
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
2
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -320,10 +321,10 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testNotEqualTo0002
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testNotEqualTo0002 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
notEqualTo
(
"
byteValue
"
,
-
128
);
dataAbilityPredicates
.
notEqualTo
(
"
byteValue
"
,
1
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
1
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -341,9 +342,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testNotEqualTo0003
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testNotEqualTo0003 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
notEqualTo
(
"
stringValue
"
,
"
ABCDEFGHIJKLMN
"
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
0
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -361,9 +362,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testNotEqualTo0004
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testNotEqualTo0004 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
notEqualTo
(
"
doubleValue
"
,
Number
.
MAX_VALUE
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
notEqualTo
(
"
doubleValue
"
,
DOUBLE_MAX
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
2
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -381,9 +382,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testNotEqualTo0005
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testNotEqualTo0005 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
notEqualTo
(
"
shortValue
"
,
-
32768
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
2
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -401,9 +402,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testNotEqualTo0006
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testNotEqualTo0006 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
notEqualTo
(
"
integerValue
"
,
1
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
2
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -421,9 +422,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testNotEqualTo0007
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testNotEqualTo0007 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
notEqualTo
(
"
longValue
"
,
1
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
2
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -441,9 +442,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testNotEqualTo0008
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testNotEqualTo0008 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
notEqualTo
(
"
floatValue
"
,
-
0.123
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
2
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -460,9 +461,9 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testIsNull0001
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testIsNull001 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
isNull
(
"
primLongValue
"
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
3
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -478,9 +479,9 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testIsNull0002
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testIsNull0002 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
isNull
(
"
longValue
"
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
0
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -496,9 +497,9 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testIsNull0003
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testIsNull0003 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
isNull
(
"
stringValue
"
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
0
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -514,9 +515,9 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testIsNull0004
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testIsNull0004 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
isNull
(
"
stringValueX
"
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
-
1
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -532,9 +533,9 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testIsNotNull0001
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testIsNotNull0001 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
isNotNull
(
"
primLongValue
"
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
0
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -550,9 +551,9 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testIsNotNull0002
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testIsNotNull0002 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
isNotNull
(
"
longValue
"
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
3
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -568,9 +569,9 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testIsNotNull0003
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testIsNotNull0003 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
isNotNull
(
"
stringValue
"
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
3
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -586,9 +587,9 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testIsNotNull0004
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testIsNotNull0004 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
isNotNull
(
"
stringValueX
"
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
-
1
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -605,9 +606,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testGreaterThan0001
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testGreaterThan0001 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
greaterThan
(
"
stringValue
"
,
"
ABC
"
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
3
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -625,9 +626,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testGreaterThan0002
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testGreaterThan0002 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
greaterThan
(
"
doubleValue
"
,
0.0
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
3
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -645,9 +646,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testGreaterThan0003
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testGreaterThan0003 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
greaterThan
(
"
integerValue
"
,
1
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
1
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -665,9 +666,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testGreaterThan0004
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testGreaterThan0004 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
greaterThan
(
"
longValue
"
,
1
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
1
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -686,9 +687,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testGreaterThan0005
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testGreaterThan0005 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
greaterThan
(
"
stringValue
"
,
"
ZZZ
"
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
0
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -706,9 +707,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testGreaterThan0006
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testGreaterThan0006 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
greaterThan
(
"
doubleValue
"
,
999.0
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
1
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -726,9 +727,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testGreaterThan0007
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testGreaterThan0007 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
greaterThan
(
"
integerValue
"
,
-
999
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
2
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -746,9 +747,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testGreaterThan0008
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testGreaterThan0008 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
greaterThan
(
"
longValue
"
,
-
999
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
2
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -766,9 +767,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testGreaterThanOrEqualTo0001
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testGreaterThanOrEqualTo0001 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
greaterThanOrEqualTo
(
"
stringValue
"
,
"
ABC
"
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
3
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -786,9 +787,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testGreaterThanOrEqualTo0002
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testGreaterThanOrEqualTo0002 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
greaterThanOrEqualTo
(
"
doubleValue
"
,
0.0
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
3
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -806,9 +807,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testGreaterThanOrEqualTo0003
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testGreaterThanOrEqualTo0003 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
greaterThanOrEqualTo
(
"
integerValue
"
,
1
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
2
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -826,9 +827,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testGreaterThanOrEqualTo0004
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testGreaterThanOrEqualTo0004 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
greaterThanOrEqualTo
(
"
longValue
"
,
1
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
2
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -846,9 +847,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testLessThan0001
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testLessThan0001 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
lessThan
(
"
stringValue
"
,
"
ABD
"
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
3
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -866,9 +867,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testLessThan0002
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testLessThan0002 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
lessThan
(
"
doubleValue
"
,
0.0
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
0
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -886,9 +887,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testLessThan0003
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testLessThan0003 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
lessThan
(
"
integerValue
"
,
1
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
1
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -906,9 +907,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testLessThan0004
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testLessThan0004 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
lessThan
(
"
longValue
"
,
1
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
1
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -927,9 +928,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testLessThan0005
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testLessThan0005 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
lessThan
(
"
stringValue
"
,
"
ABD
"
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
3
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -947,9 +948,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testLessThan0006
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testLessThan0006 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
lessThan
(
"
doubleValue
"
,
1.0
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
1
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -967,9 +968,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testLessThan0007
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testLessThan0007 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
lessThan
(
"
integerValue
"
,
-
2147483648
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
0
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -987,9 +988,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testLessThan0008
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testLessThan0008 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
lessThan
(
"
longValue
"
,
-
9223372036854775808
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
0
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1008,9 +1009,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testLessThanOrEqualTo0001
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testLessThanOrEqualTo0001 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
lessThanOrEqualTo
(
"
stringValue
"
,
"
ABD
"
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
3
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1028,9 +1029,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testLessThanOrEqualTo0002
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testLessThanOrEqualTo0002 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
lessThanOrEqualTo
(
"
doubleValue
"
,
0.0
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
0
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1048,9 +1049,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testLessThanOrEqualTo0003
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testLessThanOrEqualTo0003 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
lessThanOrEqualTo
(
"
integerValue
"
,
1
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
2
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1068,9 +1069,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testLessThanOrEqualTo0004
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testLessThanOrEqualTo0004 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
lessThanOrEqualTo
(
"
longValue
"
,
1
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
2
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1088,9 +1089,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testBetween0001
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testBetween0001 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
between
(
"
stringValue
"
,
"
ABB
"
,
"
ABD
"
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
3
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1108,9 +1109,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testBetween0002
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testBetween0002 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
between
(
"
doubleValue
"
,
0.0
,
Number
.
MAX_VALUE
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
between
(
"
doubleValue
"
,
0.0
,
DOUBLE_MAX
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
3
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1128,9 +1129,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testBetween0003
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testBetween0003 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
between
(
"
integerValue
"
,
0
,
1
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
1
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1148,9 +1149,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testBetween0004
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testBetween0004 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
between
(
"
longValue
"
,
0
,
2
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
1
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1168,9 +1169,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testBetween0005
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testBetween0005 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
between
(
"
stringValue
"
,
"
ABB
"
,
"
ABB
"
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
0
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1188,9 +1189,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testBetween0006
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testBetween0006 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
between
(
"
doubleValue
"
,
Number
.
MAX_VALUE
,
Number
.
MAX_VALUE
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
between
(
"
doubleValue
"
,
DOUBLE_MAX
,
DOUBLE_MAX
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
1
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1208,9 +1209,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testBetween0007
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testBetween0007 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
between
(
"
integerValue
"
,
1
,
0
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
0
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1228,9 +1229,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testBetween0008
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testBetween0008 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
between
(
"
longValue
"
,
2
,
-
1
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
0
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1247,9 +1248,9 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testContains0001
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testContains0001 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
contains
(
"
stringValue
"
,
"
DEF
"
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
3
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1265,9 +1266,9 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testContains0002
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testContains0002 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
contains
(
"
stringValue
"
,
"
DEFX
"
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
0
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1283,9 +1284,9 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testContains0003
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testContains0003 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
contains
(
"
characterValue
"
,
"
中
"
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
1
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1301,9 +1302,9 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testContains0004
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testContains0004 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
contains
(
"
characterValue
"
,
"
#
"
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
1
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1319,9 +1320,9 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testBeginsWith0001
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testBeginsWith0001 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
beginsWith
(
"
stringValue
"
,
"
ABC
"
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
3
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1337,9 +1338,9 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testBeginsWith0002
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testBeginsWith0002 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
beginsWith
(
"
stringValue
"
,
"
ABCX
"
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
0
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1355,9 +1356,9 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testBeginsWith0003
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testBeginsWith0003 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
beginsWith
(
"
characterValue
"
,
"
中
"
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
1
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1373,9 +1374,9 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testBeginsWith0004
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testBeginsWith0004 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
beginsWith
(
"
characterValue
"
,
"
#
"
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
1
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1391,9 +1392,9 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testEndsWith0001
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testEndsWith0001 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
endsWith
(
"
stringValue
"
,
"
LMN
"
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
3
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1409,9 +1410,9 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testEndsWith0002
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testEndsWith0002 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
endsWith
(
"
stringValue
"
,
"
LMNX
"
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
0
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1427,9 +1428,9 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testEndsWith0003
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testEndsWith0003 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
endsWith
(
"
characterValue
"
,
"
中
"
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
1
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1445,9 +1446,9 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testEndsWith0004
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testEndsWith0004 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
endsWith
(
"
characterValue
"
,
"
#
"
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
1
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1463,9 +1464,9 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testLike0001
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testLike0001 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
like
(
"
stringValue
"
,
"
%LMN%
"
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
3
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1481,9 +1482,9 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testLike0002
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testLike0002 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
like
(
"
stringValue
"
,
"
%LMNX%
"
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
0
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1499,9 +1500,9 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testLike0003
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testLike0003 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
like
(
"
characterValue
"
,
"
%中%
"
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
1
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1517,9 +1518,9 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testLike0004
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testLike0004 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
like
(
"
characterValue
"
,
"
%#%
"
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
1
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1536,14 +1537,14 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testBeginWrap0001
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testBeginWrap0001 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
equalTo
(
"
stringValue
"
,
"
ABCDEFGHIJKLMN
"
)
.
beginWrap
()
.
equalTo
(
"
integerValue
"
,
1
)
.
or
()
.
equalTo
(
"
integerValue
"
,
2147483647
)
.
endWrap
();
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
2
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1561,12 +1562,12 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testBeginWrap0002
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testBeginWrap0002 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
equalTo
(
"
stringValue
"
,
"
ABCDEFGHIJKLMN
"
)
.
beginWrap
()
.
equalTo
(
"
characterValue
"
,
'
'
)
.
endWrap
();
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
1
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1584,12 +1585,12 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testBeginWrap0003
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testBeginWrap0003 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
equalTo
(
"
stringValue
"
,
"
ABCDEFGHIJKLMN
"
)
.
beginWrap
()
.
equalTo
(
"
characterValue
"
,
'
中
'
)
.
endWrap
();
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
1
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1607,11 +1608,11 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testBeginWrap0004
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testBeginWrap0004 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
equalTo
(
"
stringValue
"
,
"
ABCDEFGHIJKLMN
"
)
.
equalTo
(
"
characterValue
"
,
'
中
'
)
.
endWrap
();
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
-
1
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1629,11 +1630,11 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testBeginWrap0005
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testBeginWrap0005 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
equalTo
(
"
stringValue
"
,
"
ABCDEFGHIJKLMN
"
)
.
beginWrap
()
.
equalTo
(
"
characterValue
"
,
'
中
'
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
-
1
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1651,11 +1652,11 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testAnd0001
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testAnd0001 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
equalTo
(
"
stringValue
"
,
"
ABCDEFGHIJKLMN
"
)
.
and
()
.
equalTo
(
"
integerValue
"
,
1
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
1
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1673,14 +1674,14 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testAnd0002
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testAnd0002 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
equalTo
(
"
stringValue
"
,
"
ABCDEFGHIJKLMN
"
)
.
beginWrap
()
.
equalTo
(
"
integerValue
"
,
1
)
.
or
()
.
equalTo
(
"
integerValue
"
,
2147483647
)
.
endWrap
();
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
2
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1698,9 +1699,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testAnd0003
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testAnd0003 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
equalTo
(
"
stringValue
"
,
"
ABCDEFGHIJKLMN
"
).
or
().
and
().
equalTo
(
"
integerValue
"
,
1
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
console
.
log
(
TAG
+
"
you should not start a request
"
+
"
with
\"
and
\"
or use or() before this function
"
);
}
...
...
@@ -1716,9 +1717,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testAnd0004
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testAnd0004 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
equalTo
(
"
stringValue
"
,
"
ABCDEFGHIJKLMN
"
).
or
().
or
().
equalTo
(
"
integerValue
"
,
1
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
console
.
log
(
TAG
+
"
you are starting a sql request with predicate or or,
"
+
"
using function or() immediately after another or(). that is ridiculous.
"
);
...
...
@@ -1735,9 +1736,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testOrder0001
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testOrder0001 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
equalTo
(
"
stringValue
"
,
"
ABCDEFGHIJKLMN
"
).
orderByAsc
(
"
integerValue
"
).
distinct
();
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
3
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1761,9 +1762,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testOrder0002
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testOrder0002 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
equalTo
(
"
stringValue
"
,
"
ABCDEFGHIJKLMN
"
).
orderByDesc
(
"
integerValue
"
).
distinct
();
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
3
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1787,9 +1788,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testOrder0003
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testOrder0003 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
equalTo
(
"
stringValue
"
,
"
ABCDEFGHIJKLMN
"
).
orderByDesc
(
"
integerValueX
"
).
distinct
();
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
-
1
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1807,9 +1808,9 @@ describe('dataAbilityPredicatesTest', function () {
it
(
'
testOrder0004
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testOrder0004 start *************
"
);
{
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
equalTo
(
"
stringValue
"
,
"
ABCDEFGHIJKLMN
"
).
orderByAsc
(
"
integerValueX
"
).
distinct
();
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
-
1
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1826,9 +1827,9 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testLimit0001
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testLimit0001 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
like
(
"
stringValue
"
,
"
ABCDEFGHIJKLMN
"
).
limitAs
(
1
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
1
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1844,9 +1845,9 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testLimit0002
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testLimit0002 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
like
(
"
stringValue
"
,
"
ABCDEFGHIJKLMN
"
).
limitAs
(
3
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
3
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1862,9 +1863,9 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testLimit0003
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testLimit0003 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
like
(
"
stringValue
"
,
"
ABCDEFGHIJKLMN
"
).
limitAs
(
100
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
3
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1880,9 +1881,9 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testLimit0004
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testLimit0004 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
like
(
"
stringValue
"
,
"
中
"
).
limitAs
(
1
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
0
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1898,9 +1899,9 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testLimit0005
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testLimit0005 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
like
(
"
stringValue
"
,
"
ABCDEFGHIJKLMN
"
).
limitAs
(
0
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
3
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1916,9 +1917,9 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testLimit0006
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testLimit0006 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
like
(
"
stringValue
"
,
"
ABCDEFGHIJKLMN
"
).
limitAs
(
-
1
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
3
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1934,9 +1935,9 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testOffset0001
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testOffset0001 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
like
(
"
stringValue
"
,
"
ABCDEFGHIJKLMN
"
).
limitAs
(
3
).
offsetAs
(
1
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
2
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1952,9 +1953,9 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testOffset0002
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testOffset0002 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
like
(
"
stringValue
"
,
"
ABCDEFGHIJKLMN
"
).
limitAs
(
3
).
offsetAs
(
0
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
3
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1970,9 +1971,9 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testOffset0003
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testOffset0003 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
like
(
"
stringValue
"
,
"
ABCDEFGHIJKLMN
"
).
limitAs
(
3
).
offsetAs
(
5
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
0
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -1988,9 +1989,9 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testOffset0004
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testOffset0004 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
like
(
"
stringValue
"
,
"
ABCDEFGHIJKLMN
"
).
limitAs
(
3
).
offsetAs
(
-
1
);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
3
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -2006,8 +2007,8 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testCreate0001
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testCreate0001 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
3
).
assertEqual
(
result
.
rowCount
);
done
();
...
...
@@ -2021,8 +2022,8 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testCreate0002
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testCreate0002 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
test
"
,
dataAbilityPredicates
);
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
test
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
-
1
).
assertEqual
(
result
.
rowCount
);
done
();
...
...
@@ -2037,9 +2038,9 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testGroupBy0001
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testGroupBy0001 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
like
(
"
stringValue
"
,
"
ABCDEFGHIJKLMN
"
).
groupBy
([
"
characterValue
"
]);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
3
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -2055,9 +2056,9 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testGroupBy0002
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testGroupBy0002 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
like
(
"
stringValue
"
,
"
ABCDEFGHIJKLMN
"
).
groupBy
([
"
characterValueX
"
]);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
-
1
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -2073,9 +2074,9 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testIndexedBy0001
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testIndexedBy0001 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
like
(
"
stringValue
"
,
"
ABCDEFGHIJKLMN
"
).
indexedBy
([
"
characterValue
"
]);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
3
).
assertEqual
(
result
.
rowCount
);
...
...
@@ -2091,9 +2092,9 @@ describe('dataAbilityPredicatesTest', function () {
*/
it
(
'
testIndexedBy0002
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testIndexedBy0002 start *************
"
);
let
dataAbilityPredicates
=
await
new
data
_dataa
bility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
data
A
bility
.
DataAbilityPredicates
();
dataAbilityPredicates
.
like
(
"
stringValue
"
,
"
ABCDEFGHIJKLMN
"
).
indexedBy
([
"
characterValueX
"
]);
let
predicates
=
data
_dataa
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
data
A
bility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
3
).
assertEqual
(
result
.
rowCount
);
result
=
null
...
...
distributeddatamgr/appdatamgrjstest/hap/src/main/js/default/test/List.test.js
浏览文件 @
0d9c742e
...
...
@@ -13,9 +13,9 @@
* limitations under the License.
*/
require
(
'
./StorageHelperJsunit.test.js
'
)
require
(
'
./StorageSyncJsunit.test.js
'
)
require
(
'
./StoragePromiseJsunit.test.js
'
)
require
(
'
./StorageCallBackJsunit.test.js
'
)
require
(
'
./StorageSyncJsunit.test.js
'
)
require
(
'
./RdbstoreInsertJsunit.test.js
'
)
require
(
'
./RdbstoreDeleteJsunit.test.js
'
)
require
(
'
./RdbStoreResultSetJsunit.test.js
'
)
...
...
distributeddatamgr/appdatamgrjstest/hap/src/main/js/default/test/RdbStoreResultSetJsunit.test.js
浏览文件 @
0d9c742e
...
...
@@ -1529,7 +1529,7 @@ describe('rdbResultSetTest', function () {
let
resultSet
=
await
rdbStore
.
query
(
predicates
)
{
resultSet
.
goToRow
(
5
)
expect
(
fals
e
).
assertEqual
(
resultSet
.
isColumnNull
(
1
))
expect
(
tru
e
).
assertEqual
(
resultSet
.
isColumnNull
(
1
))
}
resultSet
=
null
;
done
();
...
...
distributeddatamgr/appdatamgrjstest/hap/src/main/js/default/test/RdbstorePredicatesJsunit.test.js
浏览文件 @
0d9c742e
...
...
@@ -31,7 +31,7 @@ const STORE_CONFIG = {
}
var
rdbStore
=
undefined
;
var
context
=
undefined
;
var
DOUBLE_MAX
=
9223372036854775807
;
describe
(
'
rdbPredicatesTest
'
,
function
()
{
beforeAll
(
async
function
()
{
console
.
info
(
TAG
+
'
beforeAll
'
)
...
...
@@ -74,7 +74,7 @@ describe('rdbPredicatesTest', function () {
var
u8
=
new
Uint8Array
([
1
,
2
,
3
])
const
valueBucket
=
{
"
integerValue
"
:
2147483647
,
"
doubleValue
"
:
Number
.
MAX_VALUE
,
"
doubleValue
"
:
DOUBLE_MAX
,
"
booleanValue
"
:
true
,
"
floatValue
"
:
-
0.123
,
"
longValue
"
:
9223372036854775807
,
...
...
@@ -193,7 +193,7 @@ describe('rdbPredicatesTest', function () {
console
.
log
(
TAG
+
"
************* testEqualTo0004 start *************
"
);
{
let
predicates
=
await
new
ohos_data_rdb
.
RdbPredicates
(
"
AllDataType
"
);
predicates
.
equalTo
(
"
doubleValue
"
,
Number
.
MAX_VALUE
);
predicates
.
equalTo
(
"
doubleValue
"
,
DOUBLE_MAX
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
1
).
assertEqual
(
result
.
rowCount
);
result
=
null
...
...
@@ -339,7 +339,7 @@ describe('rdbPredicatesTest', function () {
console
.
log
(
TAG
+
"
************* testNotEqualTo0004 start *************
"
);
{
let
predicates
=
await
new
ohos_data_rdb
.
RdbPredicates
(
"
AllDataType
"
);
predicates
.
notEqualTo
(
"
doubleValue
"
,
Number
.
MAX_VALUE
);
predicates
.
notEqualTo
(
"
doubleValue
"
,
DOUBLE_MAX
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
2
).
assertEqual
(
result
.
rowCount
);
result
=
null
...
...
@@ -1007,7 +1007,7 @@ describe('rdbPredicatesTest', function () {
console
.
log
(
TAG
+
"
************* testBetween0002 start *************
"
);
{
let
predicates
=
await
new
ohos_data_rdb
.
RdbPredicates
(
"
AllDataType
"
);
predicates
.
between
(
"
doubleValue
"
,
0.0
,
Number
.
MAX_VALUE
);
predicates
.
between
(
"
doubleValue
"
,
0.0
,
DOUBLE_MAX
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
3
).
assertEqual
(
result
.
rowCount
);
result
=
null
...
...
@@ -1079,7 +1079,7 @@ describe('rdbPredicatesTest', function () {
console
.
log
(
TAG
+
"
************* testBetween0006 start *************
"
);
{
let
predicates
=
await
new
ohos_data_rdb
.
RdbPredicates
(
"
AllDataType
"
);
predicates
.
between
(
"
doubleValue
"
,
Number
.
MAX_VALUE
,
Number
.
MAX_VALUE
);
predicates
.
between
(
"
doubleValue
"
,
DOUBLE_MAX
,
DOUBLE_MAX
);
let
result
=
await
rdbStore
.
query
(
predicates
);
expect
(
1
).
assertEqual
(
result
.
rowCount
);
result
=
null
...
...
@@ -1844,7 +1844,7 @@ describe('rdbPredicatesTest', function () {
*/
it
(
'
testIn0003
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testIn0003 start *************
"
);
var
values
=
[
Number
.
MAX_VALUE
.
toString
()];
var
values
=
[
DOUBLE_MAX
.
toString
()];
let
predicates
=
await
new
ohos_data_rdb
.
RdbPredicates
(
"
AllDataType
"
);
predicates
.
in
(
"
doubleValue
"
,
values
);
let
result
=
await
rdbStore
.
query
(
predicates
);
...
...
@@ -1860,7 +1860,7 @@ describe('rdbPredicatesTest', function () {
*/
it
(
'
testIn0004
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testIn0004 start *************
"
);
var
values
=
[
Number
.
MIN_VALUE
.
toString
(),
"
1.0
"
,
Number
.
MAX_VALUE
.
toString
()];
var
values
=
[
Number
.
MIN_VALUE
.
toString
(),
"
1.0
"
,
DOUBLE_MAX
.
toString
()];
let
predicates
=
await
new
ohos_data_rdb
.
RdbPredicates
(
"
AllDataType
"
);
predicates
.
in
(
"
doubleValue
"
,
values
);
let
result
=
await
rdbStore
.
query
(
predicates
);
...
...
distributeddatamgr/appdatamgrjstest/hap/src/main/js/default/test/StorageHelperJsunit.test.js
浏览文件 @
0d9c742e
...
...
@@ -76,7 +76,7 @@ describe('storageTest', function () {
expect
(
null
).
assertFail
();
}
var
value
=
mPref
.
getSync
(
'
test
'
,
0
);
expect
(
value
).
assertEqual
(
0
);
expect
(
value
).
assertEqual
(
2
);
})
/**
...
...
distributeddatamgr/appdatamgrjstest/hap/src/main/js/default/test/StorageSyncJsunit.test.js
浏览文件 @
0d9c742e
...
...
@@ -50,7 +50,7 @@ describe('storageTest', function () {
* @tc.desc Constructor test
*/
it
(
'
testConstructor002
'
,
0
,
function
()
{
expect
(
mPref
).
assert
InstanceOf
(
'
Object
'
);
expect
(
mPref
).
assert
Equal
(
'
[object Object]
'
);
})
/**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录