OmniSciDB  1dac507f6e
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
InsertDataLoader.h
Go to the documentation of this file.
1 /*
2  * Copyright 2019, OmniSci, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef INSERT_DATA_LOADER_H_
18 #define INSERT_DATA_LOADER_H_
19 
20 #include "../Catalog/Catalog.h"
21 #include "Fragmenter.h"
22 
23 namespace Fragmenter_Namespace {
24 
26  public:
28  virtual size_t leafCount() = 0;
29  virtual void insertDataToLeaf(
30  const Catalog_Namespace::SessionInfo& parent_session_info,
31  const size_t leaf_idx,
32  Fragmenter_Namespace::InsertData& insert_data) = 0;
33  };
34 
36  : leaf_count_(connector.leafCount())
38  , connector_(connector){};
39 
40  void insertData(const Catalog_Namespace::SessionInfo& session_info,
41  InsertData& insert_data);
42 
43  private:
44  void moveToNextLeaf() {
48  }
49  }
50 
51  size_t leaf_count_;
54 };
55 
56 } // namespace Fragmenter_Namespace
57 
58 #endif
InsertDataLoader(DistributedConnector &connector)
virtual void insertDataToLeaf(const Catalog_Namespace::SessionInfo &parent_session_info, const size_t leaf_idx, Fragmenter_Namespace::InsertData &insert_data)=0
void insertData(const Catalog_Namespace::SessionInfo &session_info, InsertData &insert_data)
The data to be inserted using the fragment manager.
Definition: Fragmenter.h:59