1 /* 2 * Copyright (c) 2024 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 #ifndef OHOS_DISTRIBUTED_DATA_NATIVE_GDB_GRAPH_FULLRESULT_H 16 #define OHOS_DISTRIBUTED_DATA_NATIVE_GDB_GRAPH_FULLRESULT_H 17 18 #include <cstdint> 19 #include <functional> 20 #include <memory> 21 #include <string> 22 #include <variant> 23 #include <vector> 24 25 #include "edge.h" 26 #include "gdb_store_config.h" 27 #include "nlohmann/json.hpp" 28 #include "path.h" 29 #include "result.h" 30 #include "vertex.h" 31 32 namespace OHOS::DistributedDataAip { 33 class Statement; 34 class FullResult final : public Result { 35 public: 36 FullResult() = default; 37 std::vector<std::unordered_map<std::string, GraphValue>> GetAllData() const override; 38 int32_t InitData(std::shared_ptr<Statement> stmt); 39 40 private: 41 std::pair<int32_t, std::unordered_map<std::string, GraphValue>> GetRow(std::shared_ptr<Statement> stmt); 42 std::vector<std::unordered_map<std::string, GraphValue>> data_; 43 }; 44 } // namespace OHOS::DistributedDataAip 45 #endif //OHOS_DISTRIBUTED_DATA_NATIVE_GDB_GRAPH_FULLRESULT_H 46