• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
16 #ifndef NATIVE_RDB_SHARED_RESULT_SET_H
17 #define NATIVE_RDB_SHARED_RESULT_SET_H
18 
19 #include <string>
20 #include "shared_block.h"
21 
22 namespace OHOS {
23 namespace NativeRdb {
24 class SharedResultSet {
25 public:
SharedResultSet()26     SharedResultSet() {};
~SharedResultSet()27     ~SharedResultSet() {};
28     /**
29      * Obtains a block from the {@link SharedResultSet}
30      */
31     virtual AppDataFwk::SharedBlock *GetBlock() const = 0;
32     /**
33      * Adds the data of a {@code SharedResultSet} to a {@link SharedBlock}
34      */
35     virtual void FillBlock(int startRowIndex, AppDataFwk::SharedBlock *block) = 0;
36     /**
37      * Called when the position of the result set changes
38      */
39     virtual bool OnGo(int oldRowIndex, int newRowIndex) = 0;
40 };
41 } // namespace NativeRdb
42 } // namespace OHOS
43 
44 #endif