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 #include "cloud/cloud_db.h"
17 namespace OHOS::DistributedData {
Execute(const std::string & table,const std::string & sql,const VBucket & extend)18 int32_t CloudDB::Execute(const std::string &table, const std::string &sql, const VBucket &extend)
19 {
20     return E_NOT_SUPPORT;
21 }
22 
BatchInsert(const std::string & table,VBuckets && values,VBuckets & extends)23 int32_t CloudDB::BatchInsert(const std::string &table, VBuckets &&values, VBuckets &extends)
24 {
25     return E_NOT_SUPPORT;
26 }
27 
BatchUpdate(const std::string & table,VBuckets && values,VBuckets & extends)28 int32_t CloudDB::BatchUpdate(const std::string &table, VBuckets &&values, VBuckets &extends)
29 {
30     return BatchUpdate(table, std::move(values), static_cast<const VBuckets &>(extends));
31 }
32 
BatchUpdate(const std::string & table,VBuckets && values,const VBuckets & extends)33 int32_t CloudDB::BatchUpdate(const std::string &table, VBuckets &&values, const VBuckets &extends)
34 {
35     return E_NOT_SUPPORT;
36 }
37 
BatchDelete(const std::string & table,VBuckets & extends)38 int32_t CloudDB::BatchDelete(const std::string &table, VBuckets &extends)
39 {
40     return E_NOT_SUPPORT;
41 }
42 
Query(const std::string & table,const VBucket & extend)43 std::shared_ptr<Cursor> CloudDB::Query(const std::string &table, const VBucket &extend)
44 {
45     return nullptr;
46 }
47 
Query(GenQuery & query,const VBucket & extend)48 std::shared_ptr<Cursor> CloudDB::Query(GenQuery& query, const VBucket& extend)
49 {
50     return nullptr;
51 }
52 
PreSharing(const std::string & table,VBuckets & extend)53 int32_t CloudDB::PreSharing(const std::string& table, VBuckets& extend)
54 {
55     return E_NOT_SUPPORT;
56 }
57 
Sync(const Devices & devices,int32_t mode,const GenQuery & query,Async async,int32_t wait)58 int32_t CloudDB::Sync(const Devices &devices, int32_t mode, const GenQuery &query, Async async, int32_t wait)
59 {
60     return E_NOT_SUPPORT;
61 }
62 
Watch(int32_t origin,Watcher & watcher)63 int32_t CloudDB::Watch(int32_t origin, Watcher &watcher)
64 {
65     return E_NOT_SUPPORT;
66 }
67 
Unwatch(int32_t origin,Watcher & watcher)68 int32_t CloudDB::Unwatch(int32_t origin, Watcher &watcher)
69 {
70     return E_NOT_SUPPORT;
71 }
72 
Lock()73 int32_t CloudDB::Lock()
74 {
75     return E_NOT_SUPPORT;
76 }
77 
Heartbeat()78 int32_t CloudDB::Heartbeat()
79 {
80     return E_NOT_SUPPORT;
81 }
82 
Unlock()83 int32_t CloudDB::Unlock()
84 {
85     return E_NOT_SUPPORT;
86 }
87 
AliveTime()88 int64_t CloudDB::AliveTime()
89 {
90     return -1;
91 }
92 
Close()93 int32_t CloudDB::Close()
94 {
95     return E_NOT_SUPPORT;
96 }
97 
GetEmptyCursor(const std::string & tableName)98 std::pair<int32_t, std::string> CloudDB::GetEmptyCursor(const std::string &tableName)
99 {
100     return { E_NOT_SUPPORT, "" };
101 }
102 
SetPrepareTraceId(const std::string & prepareTraceId)103 void CloudDB::SetPrepareTraceId(const std::string &prepareTraceId)
104 {
105     (void)prepareTraceId;
106     return;
107 }
108 } // namespace OHOS::DistributedData
109