OmniSciDB  085a039ca4
 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 524 of file InsertDataLoader.cpp.

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

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

+ 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 505 of file InsertDataLoader.cpp.

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

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

+ 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 515 of file InsertDataLoader.cpp.

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

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

+ 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 530 of file InsertDataLoader.cpp.

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

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

+ Here is the call graph for this function:


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