Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
basic::database::insert_statement_generator::InsertGenerator Class Reference

#include <InsertGenerator.hh>

Public Member Functions

 InsertGenerator (std::string const &table_name)
 
void add_column (std::string const &column_name)
 
void add_row (std::vector< RowDataBaseOP > const &row)
 
void write_to_database (utility::sql_database::sessionOP db_session)
 
void write_to_database (utility::sql_database::sessionOP db_session, long long &last_sequence_id, std::string const &sequence_name)
 

Private Member Functions

void write_to_database_sequential (utility::sql_database::sessionOP db_session)
 
void write_to_database_chunked (utility::sql_database::sessionOP db_session, platform::Size chunksize)
 
void bind_row_data (cppdb::statement &statement, platform::Size row_start_index, platform::Size row_end_index)
 

Private Attributes

std::string table_name_
 
std::vector< std::vector
< RowDataBaseOP > > 
row_list_
 
std::vector< std::string > column_list_
 
std::map< std::string,
platform::Size
column_index_map_
 

Constructor & Destructor Documentation

basic::database::insert_statement_generator::InsertGenerator::InsertGenerator ( std::string const &  table_name)

Member Function Documentation

void basic::database::insert_statement_generator::InsertGenerator::add_column ( std::string const &  column_name)

References column_index_map_, and column_list_.

void basic::database::insert_statement_generator::InsertGenerator::add_row ( std::vector< RowDataBaseOP > const &  row)

References row_list_.

void basic::database::insert_statement_generator::InsertGenerator::bind_row_data ( cppdb::statement &  statement,
platform::Size  row_start_index,
platform::Size  row_end_index 
)
private
void basic::database::insert_statement_generator::InsertGenerator::write_to_database ( utility::sql_database::sessionOP  db_session)
void basic::database::insert_statement_generator::InsertGenerator::write_to_database ( utility::sql_database::sessionOP  db_session,
long long &  last_sequence_id,
std::string const &  sequence_name 
)
void basic::database::insert_statement_generator::InsertGenerator::write_to_database_chunked ( utility::sql_database::sessionOP  db_session,
platform::Size  chunksize 
)
private
void basic::database::insert_statement_generator::InsertGenerator::write_to_database_sequential ( utility::sql_database::sessionOP  db_session)
private

Member Data Documentation

std::map<std::string,platform::Size> basic::database::insert_statement_generator::InsertGenerator::column_index_map_
private

Referenced by add_column(), and bind_row_data().

std::vector<std::string> basic::database::insert_statement_generator::InsertGenerator::column_list_
private
std::vector<std::vector<RowDataBaseOP> > basic::database::insert_statement_generator::InsertGenerator::row_list_
private
std::string basic::database::insert_statement_generator::InsertGenerator::table_name_
private

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