106694b06Sopenharmony_ci/*
206694b06Sopenharmony_ci * Copyright (c) 2021 Huawei Device Co., Ltd.
306694b06Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
406694b06Sopenharmony_ci * you may not use this file except in compliance with the License.
506694b06Sopenharmony_ci * You may obtain a copy of the License at
606694b06Sopenharmony_ci *
706694b06Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
806694b06Sopenharmony_ci *
906694b06Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1006694b06Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1106694b06Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1206694b06Sopenharmony_ci * See the License for the specific language governing permissions and
1306694b06Sopenharmony_ci * limitations under the License.
1406694b06Sopenharmony_ci */
1506694b06Sopenharmony_ci
1606694b06Sopenharmony_ci#ifndef NATIVE_RDB_TEST_COMMON_H
1706694b06Sopenharmony_ci#define NATIVE_RDB_TEST_COMMON_H
1806694b06Sopenharmony_ci
1906694b06Sopenharmony_ci#include <string>
2006694b06Sopenharmony_ci#include "values_bucket.h"
2106694b06Sopenharmony_ci
2206694b06Sopenharmony_cinamespace OHOS {
2306694b06Sopenharmony_cinamespace NativeRdb {
2406694b06Sopenharmony_ci
2506694b06Sopenharmony_cistatic const std::string RDB_TEST_PATH = "/data/test/";
2606694b06Sopenharmony_cistruct RowData {
2706694b06Sopenharmony_ci    int id;
2806694b06Sopenharmony_ci    std::string name;
2906694b06Sopenharmony_ci    int age;
3006694b06Sopenharmony_ci    double salary;
3106694b06Sopenharmony_ci    std::vector<uint8_t> blobType;
3206694b06Sopenharmony_ci    AssetValue asset;
3306694b06Sopenharmony_ci    std::vector<AssetValue> assets;
3406694b06Sopenharmony_ci};
3506694b06Sopenharmony_ci
3606694b06Sopenharmony_cistruct RowDatas {
3706694b06Sopenharmony_ci    int id;
3806694b06Sopenharmony_ci    std::string eName;
3906694b06Sopenharmony_ci    int jobId;
4006694b06Sopenharmony_ci    ValueObject mgr;
4106694b06Sopenharmony_ci    std::string joinDate;
4206694b06Sopenharmony_ci    double salary;
4306694b06Sopenharmony_ci    ValueObject bonus;
4406694b06Sopenharmony_ci    int deptId;
4506694b06Sopenharmony_ci};
4606694b06Sopenharmony_ci
4706694b06Sopenharmony_ciclass UTUtils {
4806694b06Sopenharmony_cipublic:
4906694b06Sopenharmony_ci    static ValuesBucket SetRowData(const RowData &rowData);
5006694b06Sopenharmony_ci
5106694b06Sopenharmony_ci    static ValuesBucket SetRowDatas(const RowDatas &rowDatas);
5206694b06Sopenharmony_ci
5306694b06Sopenharmony_ci    static const RowData g_rowData[3];
5406694b06Sopenharmony_ci
5506694b06Sopenharmony_ci    static const RowDatas gRowDatas[14];
5606694b06Sopenharmony_ci};
5706694b06Sopenharmony_ci
5806694b06Sopenharmony_ci} // namespace NativeRdb
5906694b06Sopenharmony_ci} // namespace OHOS
6006694b06Sopenharmony_ci
6106694b06Sopenharmony_ci#endif
62