提交 4256d082 编写于 作者: S smagicyun
上级 8af82af7
......@@ -13,9 +13,9 @@
* limitations under the License.
*/
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'
import ohos_data_rdb from '@ohos.data.rdb';
import data_dataability from '@ohos.data.dataability';
import ability_featureAbility from '@ohos.ability.featureAbility';
import dataRdb from '@ohos.data.rdb';
import dataAbility 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_rdb.getRdbStore(context, STORE_CONFIG, 1);
context = await featureAbility.getContext();
rdbStore = await dataRdb.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_rdb.deleteRdbStore(context, "Predicates.db");
await dataRdb.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.equalTo("booleanValue", true);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.equalTo("byteValue", -128).or().equalTo("byteValue", 1);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.equalTo("stringValue", "ABCDEFGHIJKLMN");
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
dataAbilityPredicates.equalTo("doubleValue", Number.MAX_VALUE);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.equalTo("doubleValue", DOUBLE_MAX);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.equalTo("shortValue", -32768.0);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.equalTo("integerValue", 1);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.equalTo("longValue", 1);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.equalTo("floatValue", -0.123);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.notEqualTo("booleanValue", true);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.notEqualTo("byteValue", -128);
dataAbilityPredicates.notEqualTo("byteValue", 1);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.notEqualTo("stringValue", "ABCDEFGHIJKLMN");
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
dataAbilityPredicates.notEqualTo("doubleValue", Number.MAX_VALUE);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.notEqualTo("doubleValue", DOUBLE_MAX);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.notEqualTo("shortValue", -32768);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.notEqualTo("integerValue", 1);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.notEqualTo("longValue", 1);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.notEqualTo("floatValue", -0.123);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.isNull("primLongValue");
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.isNull("longValue");
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.isNull("stringValue");
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.isNull("stringValueX");
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.isNotNull("primLongValue");
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.isNotNull("longValue");
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.isNotNull("stringValue");
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.isNotNull("stringValueX");
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.greaterThan("stringValue", "ABC");
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.greaterThan("doubleValue", 0.0);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.greaterThan("integerValue", 1);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.greaterThan("longValue", 1);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.greaterThan("stringValue", "ZZZ");
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.greaterThan("doubleValue", 999.0);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.greaterThan("integerValue", -999);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.greaterThan("longValue", -999);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.greaterThanOrEqualTo("stringValue", "ABC");
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.greaterThanOrEqualTo("doubleValue", 0.0);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.greaterThanOrEqualTo("integerValue", 1);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.greaterThanOrEqualTo("longValue", 1);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.lessThan("stringValue", "ABD");
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.lessThan("doubleValue", 0.0);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.lessThan("integerValue", 1);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.lessThan("longValue", 1);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.lessThan("stringValue", "ABD");
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.lessThan("doubleValue", 1.0);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.lessThan("integerValue", -2147483648);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.lessThan("longValue", -9223372036854775808);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.lessThanOrEqualTo("stringValue", "ABD");
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.lessThanOrEqualTo("doubleValue", 0.0);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.lessThanOrEqualTo("integerValue", 1);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.lessThanOrEqualTo("longValue", 1);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.between("stringValue", "ABB", "ABD");
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
dataAbilityPredicates.between("doubleValue", 0.0, Number.MAX_VALUE);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.between("doubleValue", 0.0, DOUBLE_MAX);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.between("integerValue", 0, 1);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.between("longValue", 0, 2);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.between("stringValue", "ABB", "ABB");
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
dataAbilityPredicates.between("doubleValue", Number.MAX_VALUE, Number.MAX_VALUE);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.between("doubleValue", DOUBLE_MAX, DOUBLE_MAX);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.between("integerValue", 1, 0);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.between("longValue", 2, -1);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.contains("stringValue", "DEF");
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.contains("stringValue", "DEFX");
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.contains("characterValue", "");
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.contains("characterValue", "#");
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.beginsWith("stringValue", "ABC");
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.beginsWith("stringValue", "ABCX");
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.beginsWith("characterValue", "");
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.beginsWith("characterValue", "#");
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.endsWith("stringValue", "LMN");
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.endsWith("stringValue", "LMNX");
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.endsWith("characterValue", "");
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.endsWith("characterValue", "#");
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.like("stringValue", "%LMN%");
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.like("stringValue", "%LMNX%");
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.like("characterValue", "%中%");
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.like("characterValue", "%#%");
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.equalTo("stringValue", "ABCDEFGHIJKLMN")
.beginWrap()
.equalTo("integerValue", 1)
.or()
.equalTo("integerValue", 2147483647)
.endWrap();
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.equalTo("stringValue", "ABCDEFGHIJKLMN")
.beginWrap()
.equalTo("characterValue", ' ')
.endWrap();
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.equalTo("stringValue", "ABCDEFGHIJKLMN")
.beginWrap()
.equalTo("characterValue", '')
.endWrap();
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.equalTo("stringValue", "ABCDEFGHIJKLMN")
.equalTo("characterValue", '')
.endWrap();
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.equalTo("stringValue", "ABCDEFGHIJKLMN")
.beginWrap()
.equalTo("characterValue", '');
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.equalTo("stringValue", "ABCDEFGHIJKLMN")
.and()
.equalTo("integerValue", 1);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.equalTo("stringValue", "ABCDEFGHIJKLMN")
.beginWrap()
.equalTo("integerValue", 1)
.or()
.equalTo("integerValue", 2147483647)
.endWrap();
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.equalTo("stringValue", "ABCDEFGHIJKLMN").or().and().equalTo("integerValue", 1);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.equalTo("stringValue", "ABCDEFGHIJKLMN").or().or().equalTo("integerValue", 1);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.equalTo("stringValue", "ABCDEFGHIJKLMN").orderByAsc("integerValue").distinct();
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.equalTo("stringValue", "ABCDEFGHIJKLMN").orderByDesc("integerValue").distinct();
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.equalTo("stringValue", "ABCDEFGHIJKLMN").orderByDesc("integerValueX").distinct();
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.equalTo("stringValue", "ABCDEFGHIJKLMN").orderByAsc("integerValueX").distinct();
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.like("stringValue", "ABCDEFGHIJKLMN").limitAs(1);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.like("stringValue", "ABCDEFGHIJKLMN").limitAs(3);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.like("stringValue", "ABCDEFGHIJKLMN").limitAs(100);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.like("stringValue", "").limitAs(1);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.like("stringValue", "ABCDEFGHIJKLMN").limitAs(0);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.like("stringValue", "ABCDEFGHIJKLMN").limitAs(-1);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.like("stringValue", "ABCDEFGHIJKLMN").limitAs(3).offsetAs(1);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.like("stringValue", "ABCDEFGHIJKLMN").limitAs(3).offsetAs(0);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.like("stringValue", "ABCDEFGHIJKLMN").limitAs(3).offsetAs(5);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.like("stringValue", "ABCDEFGHIJKLMN").limitAs(3).offsetAs(-1);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let predicates = data_dataability.createRdbPredicates("test", dataAbilityPredicates);
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.like("stringValue", "ABCDEFGHIJKLMN").groupBy(["characterValue"]);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.like("stringValue", "ABCDEFGHIJKLMN").groupBy(["characterValueX"]);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.like("stringValue", "ABCDEFGHIJKLMN").indexedBy(["characterValue"]);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.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_dataability.DataAbilityPredicates();
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.like("stringValue", "ABCDEFGHIJKLMN").indexedBy(["characterValueX"]);
let predicates = data_dataability.createRdbPredicates("AllDataType", dataAbilityPredicates);
let predicates = dataAbility.createRdbPredicates("AllDataType", dataAbilityPredicates);
let result = await rdbStore.query(predicates);
expect(3).assertEqual(result.rowCount);
result = null
......
......@@ -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')
......
......@@ -1529,7 +1529,7 @@ describe('rdbResultSetTest', function () {
let resultSet = await rdbStore.query(predicates)
{
resultSet.goToRow(5)
expect(false).assertEqual(resultSet.isColumnNull(1))
expect(true).assertEqual(resultSet.isColumnNull(1))
}
resultSet = null;
done();
......
......@@ -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);
......
......@@ -76,7 +76,7 @@ describe('storageTest', function () {
expect(null).assertFail();
}
var value = mPref.getSync('test', 0);
expect(value).assertEqual(0);
expect(value).assertEqual(2);
})
/**
......
......@@ -50,7 +50,7 @@ describe('storageTest', function () {
* @tc.desc Constructor test
*/
it('testConstructor002', 0, function () {
expect(mPref).assertInstanceOf('Object');
expect(mPref).assertEqual('[object Object]');
})
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册