• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2023 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef CLOUD_DB_CONSTANT_H
17 #define CLOUD_DB_CONSTANT_H
18 
19 #include "cloud/cloud_store_types.h"
20 #include <string>
21 
22 namespace DistributedDB {
23 class CloudDbConstant {
24 public:
25     static constexpr const char *CLOUD_META_TABLE_PREFIX = "naturalbase_cloud_meta_";
26     static constexpr const char *GID_FIELD = "#_gid";
27     static constexpr const char *CREATE_FIELD = "#_createTime";
28     static constexpr const char *MODIFY_FIELD = "#_modifyTime";
29     static constexpr const char *DELETE_FIELD = "#_deleted";
30     static constexpr const char *CURSOR_FIELD = "#_cursor";
31     static constexpr const char *ROW_ID_FIELD_NAME = "rowid";
32     static constexpr uint32_t MAX_UPLOAD_SIZE = 1024 * 512 * 3; // 1.5M
33     // cloud data timestamp is utc ms precision
34     // used for 100ns to ms when handle cloud data timestamp
35     static constexpr uint32_t TEN_THOUSAND = 10000;
36 };
37 } // namespace DistributedDB
38 #endif // CLOUD_DB_CONSTANT_H