OmniSciDB  a987f07e93
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fragmenter_Namespace::LocalInsertConnector Class Reference

#include <InsertDataLoader.h>

+ Inheritance diagram for Fragmenter_Namespace::LocalInsertConnector:
+ Collaboration diagram for Fragmenter_Namespace::LocalInsertConnector:

Public Member Functions

size_t leafCount () override
 
void insertChunksToLeaf (const Catalog_Namespace::SessionInfo &parent_session_info, const size_t leaf_idx, const Fragmenter_Namespace::InsertChunks &insert_chunks) override
 
void insertDataToLeaf (const Catalog_Namespace::SessionInfo &parent_session_info, const size_t leaf_idx, Fragmenter_Namespace::InsertData &insert_data) override
 
void checkpoint (const Catalog_Namespace::SessionInfo &parent_session_info, int tableId) override
 
void rollback (const Catalog_Namespace::SessionInfo &parent_session_info, int tableId) override
 
- Public Member Functions inherited from Fragmenter_Namespace::InsertDataLoader::InsertConnector
virtual ~InsertConnector ()=default
 

Detailed Description

Definition at line 74 of file InsertDataLoader.h.

Member Function Documentation

void Fragmenter_Namespace::LocalInsertConnector::checkpoint ( const Catalog_Namespace::SessionInfo parent_session_info,
int  tableId 
)
overridevirtual

Implements Fragmenter_Namespace::InsertDataLoader::InsertConnector.

Reimplemented in Parser::LocalQueryConnector.

Definition at line 526 of file InsertDataLoader.cpp.

References Catalog_Namespace::Catalog::checkpointWithAutoRollback(), and Catalog_Namespace::SessionInfo::getCatalog().

527  {
528  auto& catalog = session.getCatalog();
529  catalog.checkpointWithAutoRollback(table_id);
530 }

+ Here is the call graph for this function:

void Fragmenter_Namespace::LocalInsertConnector::insertChunksToLeaf ( const Catalog_Namespace::SessionInfo parent_session_info,
const size_t  leaf_idx,
const Fragmenter_Namespace::InsertChunks insert_chunks 
)
overridevirtual

Implements Fragmenter_Namespace::InsertDataLoader::InsertConnector.

Reimplemented in Parser::LocalQueryConnector.

Definition at line 507 of file InsertDataLoader.cpp.

References CHECK, TableDescriptor::fragmenter, Catalog_Namespace::SessionInfo::getCatalog(), Catalog_Namespace::Catalog::getMetadataForTable(), and Fragmenter_Namespace::InsertChunks::table_id.

510  {
511  CHECK(leaf_idx == 0);
512  auto& catalog = session.getCatalog();
513  auto created_td = catalog.getMetadataForTable(insert_chunks.table_id);
514  created_td->fragmenter->insertChunksNoCheckpoint(insert_chunks);
515 }
#define CHECK(condition)
Definition: Logger.h:289

+ Here is the call graph for this function:

void Fragmenter_Namespace::LocalInsertConnector::insertDataToLeaf ( const Catalog_Namespace::SessionInfo parent_session_info,
const size_t  leaf_idx,
Fragmenter_Namespace::InsertData insert_data 
)
overridevirtual

Implements Fragmenter_Namespace::InsertDataLoader::InsertConnector.

Reimplemented in Parser::LocalQueryConnector.

Definition at line 517 of file InsertDataLoader.cpp.

References CHECK, TableDescriptor::fragmenter, Catalog_Namespace::SessionInfo::getCatalog(), Catalog_Namespace::Catalog::getMetadataForTable(), and Fragmenter_Namespace::InsertData::tableId.

519  {
520  CHECK(leaf_idx == 0);
521  auto& catalog = session.getCatalog();
522  auto created_td = catalog.getMetadataForTable(insert_data.tableId);
523  created_td->fragmenter->insertDataNoCheckpoint(insert_data);
524 }
int tableId
identifies the database into which the data is being inserted
Definition: Fragmenter.h:70
#define CHECK(condition)
Definition: Logger.h:289

+ Here is the call graph for this function:

size_t Fragmenter_Namespace::LocalInsertConnector::leafCount ( )
inlineoverridevirtual

Implements Fragmenter_Namespace::InsertDataLoader::InsertConnector.

Reimplemented in Parser::LocalQueryConnector.

Definition at line 76 of file InsertDataLoader.h.

76 { return 1; }
void Fragmenter_Namespace::LocalInsertConnector::rollback ( const Catalog_Namespace::SessionInfo parent_session_info,
int  tableId 
)
overridevirtual

Implements Fragmenter_Namespace::InsertDataLoader::InsertConnector.

Reimplemented in Parser::LocalQueryConnector.

Definition at line 532 of file InsertDataLoader.cpp.

References Catalog_Namespace::SessionInfo::getCatalog(), and Catalog_Namespace::Catalog::getDatabaseId().

533  {
534  auto& catalog = session.getCatalog();
535  auto db_id = catalog.getDatabaseId();
536  auto table_epochs = catalog.getTableEpochs(db_id, table_id);
537  catalog.setTableEpochs(db_id, table_epochs);
538 }

+ Here is the call graph for this function:


The documentation for this class was generated from the following files: