Rosetta Utilities  2014.35
Namespaces | Functions
sql_utils.hh File Reference
#include <utility/sql_database/DatabaseSessionManager.hh>
#include <platform/types.hh>
#include <utility/down_cast.hh>
#include <utility/file/FileName.fwd.hh>
#include <utility/file/FileName.hh>
#include <utility/file/PathName.fwd.hh>
#include <utility/file/PathName.hh>
#include <utility/pointer/ReferenceCount.fwd.hh>
#include <utility/pointer/ReferenceCount.hh>
#include <utility/pointer/owning_ptr.functions.hh>
#include <utility/pointer/owning_ptr.fwd.hh>
#include <utility/pointer/owning_ptr.hh>
#include <utility/tag/Tag.hh>
#include <utility/sql_database/DatabaseSessionManager.fwd.hh>
#include <utility/vector1.hh>
#include <cassert>
#include <cstddef>
#include <iosfwd>
#include <string>
#include <vector>
#include <boost/scoped_ptr.hpp>
#include <cppdb/frontend.h>

Namespaces

 basic
 
 basic::database
 

Functions

sessionOP basic::database::get_db_session ()
 Aquire a database session using the command line options transaction type is set to standard. More...
 
sessionOP basic::database::get_db_session (std::string const &db_name, std::string const &pq_schema="")
 Aquire a database session using the command line parameters For postgres databases, the pq_schema acts like a namespace in the database. Transaction type set to standard. More...
 
utility::sql_database::sessionOP basic::database::get_db_session (std::string const &db_name, utility::sql_database::TransactionMode::e transaction_mode, platform::Size chunk_size, std::string const &pq_schema="")
 Aquire a database session using the command line parameters For postgres databases, the pq_schema acts like a namespace in the database. More...
 
utility::sql_database::sessionOP basic::database::get_db_session (utility::sql_database::DatabaseMode::e db_mode, std::string const &db_name, std::string const &pq_schema)
 
utility::sql_database::sessionOP basic::database::get_db_session (utility::sql_database::DatabaseMode::e db_mode, utility::sql_database::TransactionMode::e transaction_mode, platform::Size chunk_size, std::string const &db_name, std::string const &pq_schema="")
 Aquire a database session using the command line parameters For postgres databases, the pq_schema acts like a namespace in the database. More...
 
platform::SSize basic::database::db_partition_from_options (DatabaseMode::e db_mode)
 @ More...
 
platform::SSize basic::database::resolve_db_partition (bool partition_by_mpi_process, platform::SSize manual_partition=-1)
 Returns partition identifer from mpi rank if in partitioned database mode, or valid manual partition, otherwise -1. More...
 
statement basic::database::safely_prepare_statement (string const &statement_string, sessionOP db_session)
 
void basic::database::safely_write_to_database (cppdb::statement &statement)
 
cppdb::result basic::database::safely_read_from_database (cppdb::statement &statement)
 
void basic::database::insert_or_ignore (string table_name, std::vector< string > column_names, std::vector< string > values, sessionOP db_session)
 
void basic::database::check_statement_sanity (string sql)
 
bool basic::database::table_exists (sessionOP db_session, string const &table_name)
 
void basic::database::set_cache_size (utility::sql_database::sessionOP db_session, platform::Size cache_size)
 set the number of 1kb pages to use for cache More...
 
void basic::database::write_schema_to_database (string schema_str, sessionOP db_session)
 
std::string basic::database::make_compound_statement (std::string const &table_name, std::vector< std::string > const &column_names, platform::Size const &row_count)
 
utility::sql_database::sessionOP basic::database::parse_database_connection (utility::tag::TagCOP tag)
 

Detailed Description

Author
Sam DeLuca