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

#include <Schema.hh>

Public Member Functions

 Schema (std::string const &table_name)
 
 Schema (std::string const &table_name, PrimaryKey const &primary_key)
 
 Schema (Schema const &src)
 
void add_foreign_key (ForeignKey key)
 
void add_column (Column column)
 
void add_constraint (ConstraintOP constraint)
 
void add_index (Index index)
 
std::string print (utility::sql_database::sessionOP db_session) const
 
void write (utility::sql_database::sessionOP db_session)
 

Protected Member Functions

std::string table_schema_statements (utility::sql_database::sessionOP db_session) const
 
std::string table_init_statements (utility::sql_database::sessionOP db_session) const
 
void check_table_and_perform_write (utility::sql_database::sessionOP db_session, std::string const &schema_statement, std::string const &init_statements) const
 

Private Member Functions

void init ()
 

Private Attributes

std::string table_name_
 
PrimaryKey primary_key_
 
Columns columns_
 
utility::vector1< ForeignKeyforeign_keys_
 
utility::vector1< ConstraintOPconstraints_
 
utility::vector1< Indexindices_
 

Constructor & Destructor Documentation

basic::database::schema_generator::Schema::Schema ( std::string const &  table_name)

References init().

basic::database::schema_generator::Schema::Schema ( std::string const &  table_name,
PrimaryKey const &  primary_key 
)

References init().

basic::database::schema_generator::Schema::Schema ( Schema const &  src)

Member Function Documentation

void basic::database::schema_generator::Schema::add_column ( Column  column)
void basic::database::schema_generator::Schema::add_constraint ( ConstraintOP  constraint)

References constraints_.

void basic::database::schema_generator::Schema::add_foreign_key ( ForeignKey  key)
void basic::database::schema_generator::Schema::add_index ( Index  index)

References indices_.

void basic::database::schema_generator::Schema::check_table_and_perform_write ( utility::sql_database::sessionOP  db_session,
std::string const &  schema_statement,
std::string const &  init_statements 
) const
protected
void basic::database::schema_generator::Schema::init ( )
private
std::string basic::database::schema_generator::Schema::print ( utility::sql_database::sessionOP  db_session) const
std::string basic::database::schema_generator::Schema::table_init_statements ( utility::sql_database::sessionOP  db_session) const
protected
std::string basic::database::schema_generator::Schema::table_schema_statements ( utility::sql_database::sessionOP  db_session) const
protected
void basic::database::schema_generator::Schema::write ( utility::sql_database::sessionOP  db_session)

Member Data Documentation

Columns basic::database::schema_generator::Schema::columns_
private
utility::vector1<ConstraintOP> basic::database::schema_generator::Schema::constraints_
private
utility::vector1<ForeignKey> basic::database::schema_generator::Schema::foreign_keys_
private
utility::vector1<Index> basic::database::schema_generator::Schema::indices_
private
PrimaryKey basic::database::schema_generator::Schema::primary_key_
private

Referenced by init(), and table_schema_statements().

std::string basic::database::schema_generator::Schema::table_name_
private

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