Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
0a25843a
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看板
提交
0a25843a
编写于
11月 21, 2022
作者:
L
liangzhenyu123
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
用例优化,解决时区问题
Signed-off-by:
N
liangzhenyu123
<
liangzhenyu6@huawei.com
>
上级
30ddf9d9
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
88 addition
and
72 deletion
+88
-72
distributeddatamgr/preferencesjstest/hap/src/main/js/test/V9_PreferencesCallBackJsunit.test.js
...hap/src/main/js/test/V9_PreferencesCallBackJsunit.test.js
+43
-42
distributeddatamgr/preferencesjstest/hap/src/main/js/test/V9_PreferencesPromiseJsunit.test.js
.../hap/src/main/js/test/V9_PreferencesPromiseJsunit.test.js
+41
-26
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RdbstorePredicatesComplexFiledJsunit.test.js
...main/js/test/RdbstorePredicatesComplexFiledJsunit.test.js
+4
-4
未找到文件。
distributeddatamgr/preferencesjstest/hap/src/main/js/test/V9_PreferencesCallBackJsunit.test.js
浏览文件 @
0a25843a
...
@@ -330,9 +330,9 @@ describe('preferencesV9CallbackTest', async function () {
...
@@ -330,9 +330,9 @@ describe('preferencesV9CallbackTest', async function () {
})
})
/**
/**
* @tc.name mPreference.
clear
()
* @tc.name mPreference.
on
()
* @tc.number SUB_DDM_JSPREFERENCEV9_CALLBACK_1300
* @tc.number SUB_DDM_JSPREFERENCEV9_CALLBACK_1300
* @tc.desc mPreference.
clear
()
* @tc.desc mPreference.
on
()
*/
*/
it
(
'
SUB_DDM_JSPREFERENCEV9_CALLBACK_1300
'
,
0
,
async
function
()
{
it
(
'
SUB_DDM_JSPREFERENCEV9_CALLBACK_1300
'
,
0
,
async
function
()
{
console
.
log
(
"
SUB_DDM_JSPREFERENCEV9_CALLBACK_1300 begin.
"
)
console
.
log
(
"
SUB_DDM_JSPREFERENCEV9_CALLBACK_1300 begin.
"
)
...
@@ -347,6 +347,7 @@ describe('preferencesV9CallbackTest', async function () {
...
@@ -347,6 +347,7 @@ describe('preferencesV9CallbackTest', async function () {
};
};
await
mPreference
.
on
(
'
change
'
,
observer
);
await
mPreference
.
on
(
'
change
'
,
observer
);
await
mPreference
.
put
(
KEY_TEST_STRING_ELEMENT
,
"
abcd
"
);
await
mPreference
.
put
(
KEY_TEST_STRING_ELEMENT
,
"
abcd
"
);
mPreference
.
off
(
'
change
'
,
observer
);
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
"
trycatch err =
"
+
err
+
"
, code =
"
+
err
.
code
+
"
, message =
"
+
err
.
message
)
console
.
log
(
"
trycatch err =
"
+
err
+
"
, code =
"
+
err
.
code
+
"
, message =
"
+
err
.
message
)
expect
(
false
).
assertTrue
()
expect
(
false
).
assertTrue
()
...
@@ -354,48 +355,48 @@ describe('preferencesV9CallbackTest', async function () {
...
@@ -354,48 +355,48 @@ describe('preferencesV9CallbackTest', async function () {
})
})
/**
/**
* @tc.name mPreference.
clear
()
* @tc.name mPreference.
on
()
* @tc.number SUB_DDM_JSPREFERENCEV9_CALLBACK_1400
* @tc.number SUB_DDM_JSPREFERENCEV9_CALLBACK_1400
* @tc.desc mPreference.
clear
()
* @tc.desc mPreference.
on
()
*/
*/
it
(
'
SUB_DDM_JSPREFERENCEV9_CALLBACK_1400
'
,
0
,
async
function
(
)
{
it
(
'
SUB_DDM_JSPREFERENCEV9_CALLBACK_1400
'
,
0
,
async
function
(
done
)
{
console
.
log
(
"
SUB_DDM_JSPREFERENCEV9_CALLBACK_1400 begin.
"
)
console
.
log
(
"
SUB_DDM_JSPREFERENCEV9_CALLBACK_1400 begin.
"
)
await
mPreference
.
clear
();
try
{
try
{
var
observer
=
function
(
key
)
{
var
observer
=
function
(
key
)
{
if
(
key
)
{
console
.
info
(
'
SUB_DDM_JSPREFERENCEV9_CALLBACK_1400 key
'
+
key
);
console
.
info
(
'
SUB_DDM_JSPREFERENCEV9_CALLBACK_1400 key
'
+
key
);
expect
(
false
).
assertTrue
()
done
();
}
expect
(
KEY_TEST_STRING_ELEMENT
).
assertEqual
(
key
);
expect
(
"
abcd
"
).
assertEqual
(
key
);
};
};
mPreference
.
clear
();
mPreference
.
on
(
'
change
'
,
observer
);
await
mPreference
.
on
(
'
sschange
'
,
observer
);
await
mPreference
.
put
(
KEY_TEST_STRING_ELEMENT
,
"
abc
"
);
await
mPreference
.
put
(
KEY_TEST_STRING_ELEMENT
,
"
abcd
"
);
await
mPreference
.
flush
(
);
}
catch
(
err
or
)
{
}
catch
(
err
)
{
console
.
log
(
"
trycatch err =
"
+
err
+
"
, code =
"
+
err
.
code
+
"
, message =
"
+
err
.
message
)
console
.
log
(
"
trycatch err =
"
+
err
+
"
, code =
"
+
err
.
code
+
"
, message =
"
+
err
.
message
)
done
()
expect
(
false
).
assertTrue
()
expect
(
false
).
assertTrue
()
}
finally
{
mPreference
.
off
(
'
change
'
,
observer
);
}
}
})
})
/**
/**
* @tc.name mPreference.o
n
()
* @tc.name mPreference.o
ff
()
* @tc.number SUB_DDM_JSPREFERENCEV9_CALLBACK_1500
* @tc.number SUB_DDM_JSPREFERENCEV9_CALLBACK_1500
* @tc.desc mPreference.o
n
()
* @tc.desc mPreference.o
ff
()
*/
*/
it
(
'
SUB_DDM_JSPREFERENCEV9_CALLBACK_1500
'
,
0
,
async
function
()
{
it
(
'
SUB_DDM_JSPREFERENCEV9_CALLBACK_1500
'
,
0
,
async
function
(
done
)
{
try
{
console
.
log
(
"
SUB_DDM_JSPREFERENCEV9_CALLBACK_1500 begin.
"
)
console
.
log
(
"
SUB_DDM_JSPREFERENCEV9_CALLBACK_1500 begin.
"
)
await
mPreference
.
clear
();
try
{
var
observer
=
function
(
key
)
{
var
observer
=
function
(
key
)
{
console
.
info
(
'
SUB_DDM_JSPREFERENCEV9_CALLBACK_1500 key
'
+
key
);
console
.
info
(
'
SUB_DDM_JSPREFERENCEV9_CALLBACK_1500 key
'
+
key
);
expect
(
''
).
assertEqual
(
key
);
expect
(
KEY_TEST_STRING_ELEMENT
).
assertEqual
(
key
);
};
};
await
mPreference
.
on
(
'
change
'
,
observer
);
mPreference
.
on
(
'
sschange
'
,
observer
);
await
mPreference
.
off
(
'
change
'
,
observer
);
await
mPreference
.
put
(
KEY_TEST_STRING_ELEMENT
,
"
abc
"
);
}
catch
(
error
)
{
console
.
log
(
"
trycatch err =
"
+
err
+
"
, code =
"
+
err
.
code
+
"
, message =
"
+
err
.
message
)
expect
(
false
).
assertTrue
()
expect
(
false
).
assertTrue
()
}
catch
(
err
)
{
console
.
log
(
"
trycatch err =
"
+
err
+
"
, code =
"
+
err
.
code
+
"
, message =
"
+
err
.
message
)
done
();
}
}
})
})
...
@@ -404,21 +405,21 @@ describe('preferencesV9CallbackTest', async function () {
...
@@ -404,21 +405,21 @@ describe('preferencesV9CallbackTest', async function () {
* @tc.number SUB_DDM_JSPREFERENCEV9_CALLBACK_1600
* @tc.number SUB_DDM_JSPREFERENCEV9_CALLBACK_1600
* @tc.desc mPreference.off()
* @tc.desc mPreference.off()
*/
*/
it
(
'
SUB_DDM_JSPREFERENCEV9_CALLBACK_1600
'
,
0
,
async
function
()
{
it
(
'
SUB_DDM_JSPREFERENCEV9_CALLBACK_1600
'
,
0
,
async
function
(
done
)
{
try
{
console
.
log
(
"
SUB_DDM_JSPREFERENCEV9_CALLBACK_1600 begin.
"
)
console
.
log
(
"
SUB_DDM_JSPREFERENCEV9_CALLBACK_1600 begin.
"
)
try
{
var
observer
=
function
(
key
)
{
var
observer
=
function
(
key
)
{
console
.
info
(
'
SUB_DDM_JSPREFERENCEV9_CALLBACK_1600 key
'
+
key
);
console
.
info
(
'
SUB_DDM_JSPREFERENCEV9_CALLBACK_1600 key
'
+
key
);
expect
(
''
).
assertEqual
(
key
);
};
};
await
mPreference
.
on
(
'
change
'
,
observer
);
mPreference
.
on
(
'
change
'
,
observer
);
await
mPreference
.
off
(
'
123change
'
,
observer
);
mPreference
.
off
(
'
change
'
,
observer
);
await
mPreference
.
put
(
KEY_TEST_STRING_ELEMENT
,
"
abc
"
);
await
mPreference
.
put
(
KEY_TEST_STRING_ELEMENT
,
"
abb
"
);
}
catch
(
error
)
{
await
mPreference
.
flush
();
}
catch
(
err
)
{
console
.
log
(
"
trycatch err =
"
+
err
+
"
, code =
"
+
err
.
code
+
"
, message =
"
+
err
.
message
)
console
.
log
(
"
trycatch err =
"
+
err
+
"
, code =
"
+
err
.
code
+
"
, message =
"
+
err
.
message
)
done
()
expect
(
false
).
assertTrue
()
expect
(
false
).
assertTrue
()
}
}
done
();
})
})
})
})
}
}
\ No newline at end of file
distributeddatamgr/preferencesjstest/hap/src/main/js/test/V9_PreferencesPromiseJsunit.test.js
浏览文件 @
0a25843a
...
@@ -34,6 +34,12 @@ describe('preferencesV9PromiseTest', async function () {
...
@@ -34,6 +34,12 @@ describe('preferencesV9PromiseTest', async function () {
await
data_preferences
.
deletePreferences
(
context
,
NAME
)
await
data_preferences
.
deletePreferences
(
context
,
NAME
)
})
})
beforeEach
(
async
function
()
{
console
.
info
(
'
beforeEach
'
)
await
mPreference
.
clear
();
await
mPreference
.
flush
();
})
/**
/**
* @tc.name has、delete、get、flush String callback interface test
* @tc.name has、delete、get、flush String callback interface test
* @tc.number SUB_DDM_JSPREFERENCEV9_PROMISE_0100
* @tc.number SUB_DDM_JSPREFERENCEV9_PROMISE_0100
...
@@ -113,12 +119,13 @@ describe('preferencesV9PromiseTest', async function () {
...
@@ -113,12 +119,13 @@ describe('preferencesV9PromiseTest', async function () {
* @tc.number SUB_DDM_JSPREFERENCEV9_PROMISE_0300
* @tc.number SUB_DDM_JSPREFERENCEV9_PROMISE_0300
* @tc.desc mPreference.get()
* @tc.desc mPreference.get()
*/
*/
it
(
'
SUB_DDM_JSPREFERENCEV9_PROMISE_0300
'
,
0
,
function
(
done
)
{
it
(
'
SUB_DDM_JSPREFERENCEV9_PROMISE_0300
'
,
0
,
async
function
(
done
)
{
console
.
log
(
"
SUB_DDM_JSPREFERENCEV9_PROMISE_0300 begin.
"
)
console
.
log
(
"
SUB_DDM_JSPREFERENCEV9_PROMISE_0300 begin.
"
)
try
{
try
{
mPreference
.
get
(
KEY_TEST_STRING_ELEMENT
,
KEY_TEST_INT_ELEMENT
).
then
((
ret
)
=>
{
await
mPreference
.
put
(
KEY_TEST_STRING_ELEMENT
,
'
123
'
);
expect
(
'
123
'
).
assertEqual
(
ret
)
mPreference
.
get
(
KEY_TEST_STRING_ELEMENT
,
KEY_TEST_INT_ELEMENT
).
then
((
ret
)
=>
{
done
()
done
()
expect
(
'
123
'
).
assertEqual
(
ret
)
console
.
log
(
"
SUB_DDM_JSPREFERENCEV9_PROMISE_0300 end.
"
)
console
.
log
(
"
SUB_DDM_JSPREFERENCEV9_PROMISE_0300 end.
"
)
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
log
(
"
get err =
"
+
err
+
"
, code =
"
+
err
.
code
+
"
, message =
"
+
err
.
message
)
console
.
log
(
"
get err =
"
+
err
+
"
, code =
"
+
err
.
code
+
"
, message =
"
+
err
.
message
)
...
@@ -329,15 +336,19 @@ describe('preferencesV9PromiseTest', async function () {
...
@@ -329,15 +336,19 @@ describe('preferencesV9PromiseTest', async function () {
*/
*/
it
(
'
SUB_DDM_JSPREFERENCEV9_PROMISE_1300
'
,
0
,
async
function
()
{
it
(
'
SUB_DDM_JSPREFERENCEV9_PROMISE_1300
'
,
0
,
async
function
()
{
console
.
log
(
"
SUB_DDM_JSPREFERENCEV9_PROMISE_1300 begin.
"
)
console
.
log
(
"
SUB_DDM_JSPREFERENCEV9_PROMISE_1300 begin.
"
)
await
mPreference
.
clear
();
try
{
try
{
mPreference
.
clear
();
var
observer
=
function
(
key
)
{
var
observer
=
function
(
key
)
{
if
(
key
)
{
console
.
info
(
'
SUB_DDM_JSPREFERENCEV9_PROMISE_1300 key
'
+
key
);
console
.
info
(
'
SUB_DDM_JSPREFERENCEV9_PROMISE_1300 key
'
+
key
);
expect
(
'
abc
'
).
assertEqual
(
key
);
expect
(
false
).
assertTrue
()
}
expect
(
"
abcd
"
).
assertEqual
(
key
);
};
};
mPreference
.
on
(
'
change
'
,
observer
);
await
mPreference
.
on
(
'
change
'
,
observer
);
mPreference
.
put
(
KEY_TEST_STRING_ELEMENT
,
"
abc
"
);
await
mPreference
.
put
(
KEY_TEST_STRING_ELEMENT
,
"
abcd
"
);
}
catch
(
err
)
{
mPreference
.
off
(
'
change
'
,
observer
);
}
catch
(
error
)
{
console
.
log
(
"
trycatch err =
"
+
err
+
"
, code =
"
+
err
.
code
+
"
, message =
"
+
err
.
message
)
console
.
log
(
"
trycatch err =
"
+
err
+
"
, code =
"
+
err
.
code
+
"
, message =
"
+
err
.
message
)
expect
(
false
).
assertTrue
()
expect
(
false
).
assertTrue
()
}
}
...
@@ -348,20 +359,23 @@ describe('preferencesV9PromiseTest', async function () {
...
@@ -348,20 +359,23 @@ describe('preferencesV9PromiseTest', async function () {
* @tc.number SUB_DDM_JSPREFERENCEV9_PROMISE_1400
* @tc.number SUB_DDM_JSPREFERENCEV9_PROMISE_1400
* @tc.desc mPreference.on()
* @tc.desc mPreference.on()
*/
*/
it
(
'
SUB_DDM_JSPREFERENCEV9_PROMISE_1400
'
,
0
,
async
function
(
)
{
it
(
'
SUB_DDM_JSPREFERENCEV9_PROMISE_1400
'
,
0
,
async
function
(
done
)
{
console
.
log
(
"
SUB_DDM_JSPREFERENCEV9_PROMISE_1400 begin.
"
)
console
.
log
(
"
SUB_DDM_JSPREFERENCEV9_PROMISE_1400 begin.
"
)
await
mPreference
.
clear
();
await
mPreference
.
clear
();
try
{
try
{
var
observer
=
function
(
key
)
{
var
observer
=
function
(
key
)
{
console
.
info
(
'
SUB_DDM_JSPREFERENCEV9_PROMISE_1400 key
'
+
key
);
console
.
info
(
'
SUB_DDM_JSPREFERENCEV9_PROMISE_1400 key
'
+
key
);
expect
(
'
abc
'
).
assertEqual
(
key
);
done
();
expect
(
KEY_TEST_STRING_ELEMENT
).
assertEqual
(
key
);
};
};
mPreference
.
on
(
'
sschange
'
,
observer
);
mPreference
.
on
(
'
change
'
,
observer
);
mPreference
.
put
(
KEY_TEST_STRING_ELEMENT
,
"
abc
"
);
await
mPreference
.
put
(
KEY_TEST_STRING_ELEMENT
,
"
abc
"
);
await
mPreference
.
flush
();
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
log
(
"
trycatch err =
"
+
err
+
"
, code =
"
+
err
.
code
+
"
, message =
"
+
err
.
message
)
console
.
log
(
"
trycatch err =
"
+
err
+
"
, code =
"
+
err
.
code
+
"
, message =
"
+
err
.
message
)
done
()
expect
(
false
).
assertTrue
()
expect
(
false
).
assertTrue
()
}
finally
{
mPreference
.
off
(
'
change
'
,
observer
);
}
}
})
})
...
@@ -370,41 +384,42 @@ describe('preferencesV9PromiseTest', async function () {
...
@@ -370,41 +384,42 @@ describe('preferencesV9PromiseTest', async function () {
* @tc.number SUB_DDM_JSPREFERENCEV9_PROMISE_1500
* @tc.number SUB_DDM_JSPREFERENCEV9_PROMISE_1500
* @tc.desc mPreference.off()
* @tc.desc mPreference.off()
*/
*/
it
(
'
SUB_DDM_JSPREFERENCEV9_PROMISE_1500
'
,
0
,
async
function
(
)
{
it
(
'
SUB_DDM_JSPREFERENCEV9_PROMISE_1500
'
,
0
,
async
function
(
done
)
{
console
.
log
(
"
SUB_DDM_JSPREFERENCEV9_PROMISE_1500 begin.
"
)
console
.
log
(
"
SUB_DDM_JSPREFERENCEV9_PROMISE_1500 begin.
"
)
await
mPreference
.
clear
();
try
{
try
{
var
observer
=
function
(
key
)
{
var
observer
=
function
(
key
)
{
console
.
info
(
'
SUB_DDM_JSPREFERENCEV9_PROMISE_1500 key
'
+
key
);
console
.
info
(
'
SUB_DDM_JSPREFERENCEV9_PROMISE_1500 key
'
+
key
);
expect
(
''
).
assertEqual
(
key
);
expect
(
KEY_TEST_STRING_ELEMENT
).
assertEqual
(
key
);
};
};
mPreference
.
on
(
'
change
'
,
observer
);
mPreference
.
on
(
'
sschange
'
,
observer
);
mPreference
.
off
(
'
change
'
,
observer
);
expect
(
false
).
assertTrue
()
mPreference
.
put
(
KEY_TEST_STRING_ELEMENT
,
"
abc
"
);
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
log
(
"
trycatch err =
"
+
err
+
"
, code =
"
+
err
.
code
+
"
, message =
"
+
err
.
message
)
console
.
log
(
"
trycatch err =
"
+
err
+
"
, code =
"
+
err
.
code
+
"
, message =
"
+
err
.
message
)
expect
(
false
).
assertTrue
()
done
();
}
}
})
})
/**
/**
* @tc.name mPreference.off()
* @tc.name mPreference.off()
* @tc.number SUB_DDM_JSPREFERENCEV9_PROMISE_1600
* @tc.number SUB_DDM_JSPREFERENCEV9_PROMISE_1600
* @tc.desc mPreference.off()
* @tc.desc mPreference.off()
*/
*/
it
(
'
SUB_DDM_JSPREFERENCEV9_PROMISE_1600
'
,
0
,
async
function
(
)
{
it
(
'
SUB_DDM_JSPREFERENCEV9_PROMISE_1600
'
,
0
,
async
function
(
done
)
{
console
.
log
(
"
SUB_DDM_JSPREFERENCEV9_PROMISE_1600 begin.
"
)
console
.
log
(
"
SUB_DDM_JSPREFERENCEV9_PROMISE_1600 begin.
"
)
try
{
try
{
var
observer
=
function
(
key
)
{
var
observer
=
function
(
key
)
{
console
.
info
(
'
SUB_DDM_JSPREFERENCEV9_PROMISE_1600 key
'
+
key
);
console
.
info
(
'
SUB_DDM_JSPREFERENCEV9_PROMISE_1600 key
'
+
key
);
expect
(
''
).
assertEqual
(
key
);
};
};
mPreference
.
on
(
'
change
'
,
observer
);
mPreference
.
on
(
'
change
'
,
observer
);
mPreference
.
off
(
'
sschange
'
,
observer
);
mPreference
.
off
(
'
change
'
,
observer
);
mPreference
.
put
(
KEY_TEST_STRING_ELEMENT
,
"
abc
"
);
await
mPreference
.
put
(
KEY_TEST_STRING_ELEMENT
,
"
abb
"
);
await
mPreference
.
flush
();
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
log
(
"
trycatch err =
"
+
err
+
"
, code =
"
+
err
.
code
+
"
, message =
"
+
err
.
message
)
console
.
log
(
"
trycatch err =
"
+
err
+
"
, code =
"
+
err
.
code
+
"
, message =
"
+
err
.
message
)
done
()
expect
(
false
).
assertTrue
()
expect
(
false
).
assertTrue
()
}
}
done
();
})
})
})
})
}
}
\ No newline at end of file
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RdbstorePredicatesComplexFiledJsunit.test.js
浏览文件 @
0a25843a
...
@@ -68,8 +68,8 @@ describe('rdbStorePredicatesComplexFiledTest', function () {
...
@@ -68,8 +68,8 @@ describe('rdbStorePredicatesComplexFiledTest', function () {
console
.
log
(
TAG
+
"
************* SUB_DDM_AppDataFWK_JSRDB_Predicates_ComplexFiled_0001 start *************
"
);
console
.
log
(
TAG
+
"
************* SUB_DDM_AppDataFWK_JSRDB_Predicates_ComplexFiled_0001 start *************
"
);
let
predicates
=
await
new
dataRdb
.
RdbPredicates
(
"
test
"
)
let
predicates
=
await
new
dataRdb
.
RdbPredicates
(
"
test
"
)
predicates
.
groupBy
([
"
DATE(test.adddate
,'utc'
)
"
]).
orderByAsc
(
"
COUNT(*)
"
)
predicates
.
groupBy
([
"
DATE(test.adddate)
"
]).
orderByAsc
(
"
COUNT(*)
"
)
let
resultSet
=
await
rdbStore
.
query
(
predicates
,
[
"
COUNT(*) AS 'num Count'
"
,
"
DATE(test.adddate
,'utc'
) as birthday
"
])
let
resultSet
=
await
rdbStore
.
query
(
predicates
,
[
"
COUNT(*) AS 'num Count'
"
,
"
DATE(test.adddate) as birthday
"
])
expect
(
true
).
assertEqual
(
resultSet
.
goToFirstRow
())
expect
(
true
).
assertEqual
(
resultSet
.
goToFirstRow
())
let
count
=
await
resultSet
.
getLong
(
resultSet
.
getColumnIndex
(
"
num Count
"
))
let
count
=
await
resultSet
.
getLong
(
resultSet
.
getColumnIndex
(
"
num Count
"
))
let
birthday
=
await
resultSet
.
getString
(
resultSet
.
getColumnIndex
(
"
birthday
"
))
let
birthday
=
await
resultSet
.
getString
(
resultSet
.
getColumnIndex
(
"
birthday
"
))
...
@@ -94,8 +94,8 @@ describe('rdbStorePredicatesComplexFiledTest', function () {
...
@@ -94,8 +94,8 @@ describe('rdbStorePredicatesComplexFiledTest', function () {
console
.
log
(
TAG
+
"
************* SUB_DDM_AppDataFWK_JSRDB_Predicates_ComplexFiled_0002 start *************
"
);
console
.
log
(
TAG
+
"
************* SUB_DDM_AppDataFWK_JSRDB_Predicates_ComplexFiled_0002 start *************
"
);
let
predicates
=
await
new
dataRdb
.
RdbPredicates
(
"
test
"
)
let
predicates
=
await
new
dataRdb
.
RdbPredicates
(
"
test
"
)
predicates
.
groupBy
([
"
DATE(test.adddate
,'utc'
)
"
]).
orderByDesc
(
"
COUNT(*)
"
)
predicates
.
groupBy
([
"
DATE(test.adddate)
"
]).
orderByDesc
(
"
COUNT(*)
"
)
let
resultSet
=
await
rdbStore
.
query
(
predicates
,
[
"
COUNT(*) AS numCount
"
,
"
DATE(test.adddate
,'utc'
) as birthday
"
])
let
resultSet
=
await
rdbStore
.
query
(
predicates
,
[
"
COUNT(*) AS numCount
"
,
"
DATE(test.adddate) as birthday
"
])
expect
(
true
).
assertEqual
(
resultSet
.
goToFirstRow
())
expect
(
true
).
assertEqual
(
resultSet
.
goToFirstRow
())
let
count
=
await
resultSet
.
getLong
(
resultSet
.
getColumnIndex
(
"
numCount
"
))
let
count
=
await
resultSet
.
getLong
(
resultSet
.
getColumnIndex
(
"
numCount
"
))
let
birthday
=
await
resultSet
.
getString
(
resultSet
.
getColumnIndex
(
"
birthday
"
))
let
birthday
=
await
resultSet
.
getString
(
resultSet
.
getColumnIndex
(
"
birthday
"
))
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录