1 /* 2 * Copyright (c) 2021 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 #include "kvdb_windowed_result_set.h" 16 17 #include "db_errno.h" 18 19 namespace DistributedDB { KvDBWindowedResultSet()20KvDBWindowedResultSet::KvDBWindowedResultSet() 21 : window_(nullptr) 22 { 23 } 24 ~KvDBWindowedResultSet()25KvDBWindowedResultSet::~KvDBWindowedResultSet() 26 { 27 window_ = nullptr; 28 } 29 Open(bool isMemDb)30int KvDBWindowedResultSet::Open(bool isMemDb) 31 { 32 return -E_NOT_SUPPORT; 33 } 34 GetCount() const35int KvDBWindowedResultSet::GetCount() const 36 { 37 return 0; 38 } 39 GetPosition() const40int KvDBWindowedResultSet::GetPosition() const 41 { 42 return -1; // return invalid position 43 } 44 Move(int offset) const45int KvDBWindowedResultSet::Move(int offset) const 46 { 47 return -E_NOT_SUPPORT; 48 } 49 MoveTo(int position) const50int KvDBWindowedResultSet::MoveTo(int position) const 51 { 52 return -E_NOT_SUPPORT; 53 } 54 MoveToFirst()55int KvDBWindowedResultSet::MoveToFirst() 56 { 57 return -E_NOT_SUPPORT; 58 } 59 MoveToLast()60int KvDBWindowedResultSet::MoveToLast() 61 { 62 return -E_NOT_SUPPORT; 63 } 64 IsFirst() const65bool KvDBWindowedResultSet::IsFirst() const 66 { 67 return -E_NOT_SUPPORT; 68 } 69 IsLast() const70bool KvDBWindowedResultSet::IsLast() const 71 { 72 return -E_NOT_SUPPORT; 73 } 74 IsBeforeFirst() const75bool KvDBWindowedResultSet::IsBeforeFirst() const 76 { 77 return -E_NOT_SUPPORT; 78 } 79 IsAfterLast() const80bool KvDBWindowedResultSet::IsAfterLast() const 81 { 82 return -E_NOT_SUPPORT; 83 } 84 GetEntry(Entry & entry) const85int KvDBWindowedResultSet::GetEntry(Entry &entry) const 86 { 87 return -E_NOT_SUPPORT; 88 } 89 Close()90int KvDBWindowedResultSet::Close() 91 { 92 return E_OK; 93 } 94 } // namespace DistributedDB 95