Rosetta
|
Namespaces | |
insert_statement_generator | |
schema_generator | |
Functions | |
bool | open (utility::io::izstream &db_stream, std::string const &db_file, bool warn) |
Open a database file on a provided stream. More... | |
std::string | full_name (std::string const &db_file, bool warn) |
Full-path database file name. More... | |
std::string | find_database_path (std::string const &dir, std::string const &filename, bool const mute_error_if_failure) |
Find a path to a file. More... | |
std::string | find_database_path (std::string const &dir, std::string const &filename, std::string const &ext) |
Find a path to a file. More... | |
bool | find_cache_file (std::string const &cache_file, bool dir_only) |
Does cache file (absolute path) exist? if dir_only is true, will return true if the cache file could be created. More... | |
std::string | full_cache_name (std::string const &short_name, std::string const &source_file, bool for_writing) |
Get the (absolute) path to a given cached file. If source_file is given, it's the full path to the source database file that's being cached. If for_writing is true, will only check that the given file would be creatable. Will return an empty string if it can't find a cache file. More... | |
sessionOP | get_db_session () |
Aquire a database session using the command line options transaction type is set to standard. More... | |
sessionOP | 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... | |
sessionOP | get_db_session (string const &db_name, TransactionMode::e transaction_mode, Size chunk_size, string const &pq_schema) |
utility::sql_database::sessionOP | get_db_session (utility::sql_database::DatabaseMode::e db_mode, std::string const &db_name, std::string const &pq_schema) |
sessionOP | get_db_session (DatabaseMode::e db_mode, TransactionMode::e transaction_mode, Size chunk_size, string const &db_name, string const &pq_schema) |
platform::SSize | db_partition_from_options (DatabaseMode::e db_mode) |
@ More... | |
platform::SSize | 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 | safely_prepare_statement (string const &statement_string, sessionOP db_session) |
statement | prepare_statement_no_catch (std::string const &statement_string, utility::sql_database::sessionOP db_session) |
Do not catch the error - leave the catch for the code using it. Do not use this unless YOU are catching any erorrs (cppdb::error). More... | |
void | safely_write_to_database (statement &statement) |
result | safely_read_from_database (statement &statement) |
bool | table_exists (sessionOP db_session, string const &table_name) |
void | check_statement_sanity (string sql) |
void | insert_or_ignore (string table_name, std::vector< string > column_names, std::vector< string > values, sessionOP db_session) |
void | write_schema_to_database (string schema_str, sessionOP db_session) |
void | set_cache_size (sessionOP db_session, Size cache_size) |
std::string | make_compound_statement (std::string const &table_name, std::vector< std::string > const &column_names, platform::Size const &row_count) |
utility::sql_database::sessionOP | parse_database_connection (utility::tag::TagCOP tag) |
void | attributes_for_parse_database_connection (utility::tag::AttributeList &attlist, utility::tag::XMLSchemaDefinition &xsd) |
utility::sql_database::sessionOP | 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 | 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... | |
void | safely_write_to_database (cppdb::statement &statement) |
cppdb::result | safely_read_from_database (cppdb::statement &statement) |
void | set_cache_size (utility::sql_database::sessionOP db_session, platform::Size cache_size) |
set the number of 1kb pages to use for cache More... | |
Variables | |
static basic::Tracer | TR ("basic.io.database") |
static basic::Tracer | TR ("basic.database.sql_utils") |
void basic::database::attributes_for_parse_database_connection | ( | utility::tag::AttributeList & | attlist, |
utility::tag::XMLSchemaDefinition & | xsd | ||
) |
References utility::tag::XMLSchemaRestriction::add_restriction(), utility::tag::XMLSchemaDefinition::add_top_level_element(), utility::tag::XMLSchemaRestriction::base_type(), SmotifHasher::mode, utility::tag::XMLSchemaRestriction::name(), utility::tag::xs_integer, utility::tag::xs_string, utility::tag::xsct_non_negative_integer, utility::tag::xsct_rosetta_bool, utility::tag::xsr_enumeration, and utility::tag::xsr_pattern.
Referenced by basic::resource_manager::locator::DatabaseResourceLocator::provide_xml_schema().
void basic::database::check_statement_sanity | ( | string | sql | ) |
References create_a3b_hbs::i, test.G203_Module_SQLPDB::sql, and utility_exit_with_message.
Referenced by basic::resource_manager::locator::DatabaseResourceLocator::parse_my_tag().
platform::SSize basic::database::db_partition_from_options | ( | DatabaseMode::e | db_mode | ) |
@
Returns partition identifer if in partitioned database mode, otherwise -1.
References inout::dbms::database_partition(), closure_error::error, utility::sql_database::DatabaseMode::mysql, option, utility::sql_database::DatabaseMode::postgres, resolve_db_partition(), inout::dbms::separate_db_per_mpi_process(), utility::sql_database::DatabaseMode::sqlite3, basic::options::OptionKeys::inout::dbms::user, and utility_exit_with_message.
Referenced by get_db_session().
bool basic::database::find_cache_file | ( | std::string const & | cache_file, |
bool | dir_only | ||
) |
Does cache file (absolute path) exist? if dir_only is true, will return true if the cache file could be created.
References utility::file::create_directory_recursive(), utility::file::create_temp_filename(), basic::Tracer::Debug, utility::file::file_delete(), utility::file::file_exists(), utility::file::FileName::path(), TR, and basic::Tracer::TracerProxy::visible().
Referenced by full_cache_name().
std::string basic::database::find_database_path | ( | std::string const & | dir, |
std::string const & | filename, | ||
bool const | mute_error_if_failure | ||
) |
Find a path to a file.
Try various combinations to locate the specific file being requested by the user. (inspired by core::scoring::ScoreFunction::find_weights_file())
@athor Labonte JWLab onte @jhu. edu
Try various combinations to locate the specific file being requested by the user. (inspired by core::scoring::ScoreFunction::find_weights_file())
mute_error_if_failure returns "" if the file does not exist instead of throwing a loud exception
dir like chemical/carbohydrates/linkage_conformers/
References lactamize::filename, full_name(), utility::io::izstream::good(), closure_error::path, PB_potential::potential_file, and utility_exit_with_message.
std::string basic::database::find_database_path | ( | std::string const & | dir, |
std::string const & | filename, | ||
std::string const & | ext | ||
) |
Find a path to a file.
Try various combinations to locate the specific file being requested by the user. (inspired by core::scoring::ScoreFunction::find_weights_file())
@athor Labonte JWLab onte @jhu. edu
Try various combinations to locate the specific file being requested by the user. (inspired by core::scoring::ScoreFunction::find_weights_file())
dir like chemical/carbohydrates/linkage_conformers/
References val2thr::ext, lactamize::filename, full_name(), utility::io::izstream::good(), closure_error::path, PB_potential::potential_file, and utility_exit_with_message.
std::string basic::database::full_cache_name | ( | std::string const & | short_name, |
std::string const & | source_file, | ||
bool | for_writing | ||
) |
Get the (absolute) path to a given cached file. If source_file is given, it's the full path to the source database file that's being cached. If for_writing is true, will only check that the given file would be creatable. Will return an empty string if it can't find a cache file.
References utility::file::FileName::bare_name(), in::path::database_cache_dir(), find_cache_file(), utility::file::get_home_dir(), option, closure_error::path, utility::file::FileName::path(), and basic::options::OptionKeys::inout::dbms::user.
std::string basic::database::full_name | ( | std::string const & | db_file, |
bool | warn | ||
) |
Full-path database file name.
References in::path::database(), utility::file::file_exists(), PREcst::fname, create_a3b_hbs::i, option, subloop_histogram::size, TR, and basic::Tracer::Warning.
Referenced by DetectSymmetry::apply(), complex_interface_optimize::apply(), compute_Irmsd::apply(), find_database_path(), general_initialize(), get_atom_packing_score(), get_holes_score(), get_rsrpl(), HemeBindingMover::HemeBindingMover(), basic::citation_manager::CitationManager::load_rosetta_citations_from_database(), main(), make_etable(), open(), read_frags(), read_tensor_test(), rna_assemble_all_combinations_test(), rna_assemble_test(), RosettaHolesMover::RosettaHolesMover(), run(), and test().
utility::sql_database::sessionOP basic::database::get_db_session | ( | ) |
Aquire a database session using the command line options transaction type is set to standard.
References inout::dbms::database_name(), get_db_session(), option, inout::dbms::pq_schema(), and utility::sql_database::TransactionMode::standard.
Referenced by main(), InterfaceFeaturesTests::setUp(), NativeEnsemble::write_job_to_db(), NativeEnsemble::write_schema_to_db(), NativeEnsemble::write_stats_to_db(), NativeEnsemble::write_stop_time_to_db(), and NativeEnsemble::write_temperatures_to_db().
sessionOP basic::database::get_db_session | ( | DatabaseMode::e | db_mode, |
TransactionMode::e | transaction_mode, | ||
Size | chunk_size, | ||
string const & | db_name, | ||
string const & | pq_schema | ||
) |
References db_partition_from_options(), enumerate_junctions::default, utility::SingletonBase< DatabaseSessionManager >::get_instance(), utility::sql_database::DatabaseSessionManager::get_session_mysql(), utility::sql_database::DatabaseSessionManager::get_session_postgres(), utility::sql_database::DatabaseSessionManager::get_session_sqlite3(), inout::dbms::host(), utility::sql_database::DatabaseMode::mysql, utility::sql_database::name_from_database_mode(), option, inout::dbms::password(), inout::dbms::port(), utility::sql_database::DatabaseMode::postgres, basic::options::OptionKeys::inout::dbms::pq_schema, inout::dbms::readonly(), utility::sql_database::DatabaseMode::sqlite3, TR, basic::options::OptionKeys::inout::dbms::user, inout::dbms::user(), utility_exit_with_message, and basic::Tracer::Warning.
Referenced by get_db_session().
utility::sql_database::sessionOP basic::database::get_db_session | ( | string const & | db_name, |
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.
References utility::sql_database::database_mode_from_name(), get_db_session(), inout::dbms::mode(), option, basic::options::OptionKeys::inout::dbms::pq_schema, and utility::sql_database::TransactionMode::standard.
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.
sessionOP basic::database::get_db_session | ( | string const & | db_name, |
TransactionMode::e | transaction_mode, | ||
Size | chunk_size, | ||
string const & | pq_schema | ||
) |
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.
void basic::database::insert_or_ignore | ( | string | table_name, |
std::vector< string > | column_names, | ||
std::vector< string > | values, | ||
sessionOP | db_session | ||
) |
References enumerate_junctions::default, create_a3b_hbs::i, utility::sql_database::DatabaseMode::mysql, utility::sql_database::name_from_database_mode(), utility::sql_database::DatabaseMode::postgres, res, safely_prepare_statement(), safely_read_from_database(), safely_write_to_database(), utility::sql_database::DatabaseMode::sqlite3, utility_exit_with_message, and test.T040_Types::values.
std::string basic::database::make_compound_statement | ( | std::string const & | table_name, |
std::vector< std::string > const & | column_names, | ||
platform::Size const & | row_count | ||
) |
References create_a3b_hbs::i, create_a3b_hbs::j, and utility::join().
Referenced by basic::database::insert_statement_generator::InsertGenerator::write_to_database(), basic::database::insert_statement_generator::InsertGenerator::write_to_database_chunked(), and basic::database::insert_statement_generator::InsertGenerator::write_to_database_sequential().
bool basic::database::open | ( | utility::io::izstream & | db_stream, |
std::string const & | db_file, | ||
bool | warn = true |
||
) |
Open a database file on a provided stream.
Does a database file exist?
Open a database file on a provided stream
References utility::io::izstream::clear(), utility::io::izstream::close(), CREATE_EXCEPTION, full_name(), utility::io::izstream::good(), utility::io::izstream::open(), and TR.
Referenced by pyrosetta.distributed.cluster.io.IO::_save_results(), pyrosetta.distributed.cluster.io.IO::_write_environment_file(), pyrosetta.toolbox.load_ligand::add_cid_to_database(), add_xyz_to_pose::append_to_pdb(), auto-DRRAFTER_setup::auto_setup_helices(), DRRAFTER_util::better_reorder_pdb(), calc_blosum_scores(), calculate_total_hASA_within_distance_avg_values(), calculate_total_hASA_within_distance_avgresiduevalues_allnbs_conditionalonnumnbs(), DRRAFTER_util::cat_outfiles(), pyrosetta.toolbox.cleaning::cleanATOM(), options.KeepSameFile::close(), get_junctions_from_legos::collect_junctions(), add_xyz_to_pose::collect_xyz(), combine_pdbs::combine_pdbs(), compare_times::compare_times(), make_bindings_via_cmake::compile_sources(), ez_setup::download_file_insecure(), pyrosetta.toolbox.rcsb::download_from_web(), pyrosetta.toolbox.atom_pair_energy::dump_atom_pair_energy_table(), pyrosetta.toolbox.atom_pair_energy::dump_residue_pair_energies(), DRRAFTER_util::easy_cat(), enumerate_junctions::enumerate_tranform_db(), erraser_wrapper::erraser(), erraser_wrapper::erraser_minimize(), erraser_wrapper::erraser_single_res(), erraser_single_res_analysis::extract_info(), DRRAFTER_util::extract_lowscore_decoys(), erraser_util::extract_pdb(), auto-DRRAFTER_setup_next_round::figure_out_next_round(), mutant_modeler::figure_out_WT_seq(), finalize_models::finalize(), erraser_util::find_chi_angle(), erraser_analysis::find_chi_angle_std_pdb(), erraser_single_res_analysis::find_chi_angle_std_pdb(), bin_torsions::find_pivots(), kic_runner::find_rosetta_installation(), helpers::find_rosetta_root(), bin_torsions::find_title(), bin_torsions::find_y_limits(), update_ui_project::generate_app_list(), update_ui_project::generate_app_shell_scripts(), build::generate_bindings(), build::generate_cmake_file(), enumerate_junctions::generate_dhrs_txt_file(), build::generate_documentation(), bin_torsions::generate_histograms(), enumerate_junctions::generate_junctions_txt_file(), pyrosetta.toolbox.generate_resfile::generate_resfile_from_pose(), demo.D050_Packer_task::generate_resfile_from_pose(), build::generate_rosetta_cmake_files(), build::generate_rosetta_external_cmake_files(), update_ui_project::generate_rosetta_external_project_files(), update_ui_project::generate_rosetta_libraries_project_files(), sphinx-doc-generator::generate_rst_sphinx_files(), enumerate_junctions::get_all_dhrs(), enumerate_junctions::get_all_junctions(), DRRAFTER::get_coord_csts(), build::get_defines(), drrafter_rna::get_density_per_residue(), erraser_util::get_fasta(), get_frags_map(), mutant_modeler.MutantModeler::get_high_res_command_lines(), pyrosetta.distributed.cluster.tools::get_instance_kwargs(), mutant_modeler.MutantModeler::get_med_res_command_lines(), setup::get_package_version(), cal_vdw_radius_pool::get_pair_counts(), pyrosetta.distributed.cluster.converter_tasks::get_protocols_list_of_str(), auto-DRRAFTER_setup_next_round::get_results(), get_final_ddG_scores::get_scores(), pyrosetta.distributed.cluster.converter_tasks::get_scores_dict(), DRRAFTER_util::get_sequences(), auto-DRRAFTER_setup_next_round::get_silent_file_subset(), setup_for_complex_scoring_general::get_ss(), mutant_modeler::get_ss(), auto-DRRAFTER_setup_next_round::get_top_ten_models_from_silent_files(), erraser_util::get_total_res(), erraser_util::grep(), ez_setup::has_curl(), ez_setup::has_powershell(), ez_setup::has_wget(), pyrosetta.distributed.viewer.core::init(), build::install_llvm_tool(), subloop_histogram::key_from_pivots(), enumerate_junctions::listener(), dbscan_cluster_rotamer::load_centroid(), kmeans_adaptive_kernel_density_bb_dependent_rotlib::load_centroid(), kmeans_bb_dependent_rotlib::load_centroid(), kmeans_common::load_centroid(), spectral_cluster_kmeans_adaptive_kernel_density_bb_dependent_rotlib::load_centroid(), kmeans_adaptive_kernel_density_bb_dependent_rotlib::load_centroid_xyz(), kmeans_common::load_centroid_xyz(), dbscan_adaptive_kernel_density_bb_dependent_rotlib::load_data(), pyrosetta.toolbox.rcsb::load_fasta_from_rcsb(), compare_times::load_files(), pyrosetta.toolbox.load_ligand::load_from_pubchem(), pyrosetta.toolbox.rcsb::load_from_rcsb(), bin_torsions::load_histograms_from_npz(), erraser_util::load_pdb_coord(), erraser_util::load_pdb_coord_old(), bin_torsions::load_torsions_from_dat(), progress_bar::main(), setup_for_complex_scoring_general::main(), dbscan_cluster_rotamer::main(), find_lowest_scoring_relaxed_struct::main(), general_RNP_setup_script::main(), get_final_ddG_scores::main(), relax_starting_structure::main(), get_lowest_scoring_relaxed_models::main(), sphinx-doc-generator::main(), self-test::main(), combine_ContactMaps::main(), arls_impl::main(), best_ifaceE::main(), get_scores::main(), prune_atdiff_top5pct::main(), sidechain_cst_3::main(), main(), dbscan_cluster_rotamer::main_old_kmeans(), make_bindings_via_cmake::make_all_includes(), make_bindings_via_cmake::make_bindings_code(), mutant_modeler.MutantModeler::make_high_res_subsets_and_cmd_lines(), submit_jobs::make_job_files_and_submit(), pyrosetta.io.silent_file_map::open_compressed(), utility::sql_database::session::open_mysql_session(), utility::sql_database::session::open_postgres_session(), utility::sql_database::session::open_sqlite3_session(), pyrosetta.toolbox.py_jobdistributor::output_scorefile(), percent_subangstrom::parse_benchmark(), DRRAFTER::parse_fasta(), bin_torsions::parse_iterations(), percent_subangstrom::parse_job(), score_vs_rmsd::parse_new_source(), score_vs_rmsd::parse_old_source(), DRRAFTER::parse_secstruct(), erraser_util::pdb2fasta(), erraser_util::pdb2rosetta(), erraser_util::pdb_slice(), DRRAFTER_util::pdbslice(), histogram::plot_ideal_torsions(), histogram::plot_rama_kic(), bin_torsions::plot_score_function(), histogram::plot_uniform_kic(), ObjexxFCL::process_file(), DRRAFTER_util::read_pdb(), util::read_pdb(), DRRAFTER_util::read_pdb_with_segid(), read_rama_map_file(), read_sphere(), SphereSample::read_sphere_data(), erraser_wrapper::rebuild_completed(), pyrosetta.distributed.cluster.tools::recreate_environment(), erraser_util::regularize_OP1_OP2(), erraser_util::regularize_pdb(), self-test::remover_absolute_paths(), DRRAFTER_util::renumber_pdb(), basic::sampling::orientations::QuaternionGridManager::request_by_name(), erraser_util::rosetta2phenix_merge_back(), erraser_util::rosetta2std_pdb(), self-test::run_test(), demo.D090_Ala_scan::scanning(), demo.D090_Ala_scan::scanning_analysis(), erraser_wrapper::seq_rebuild(), erraser_wrapper::seq_rebuild_new(), pyrosetta.tests.distributed.test_viewer.TestViewer::setUp(), kic_runner::setup_hook(), DRRAFTER::setup_job(), drrafter_rna::setup_next_round(), erraser_util::sliced2orig_merge_back(), sphere_coverage(), SphereSampler::SphereSampler(), submit_jobs::submit_jobs(), erraser_util::subprocess_call(), erraser_util::subprocess_out(), erraser_wrapper::SWA_rebuild_erraser(), pyrosetta.tests.distributed.cluster.test_logging.LoggingTest::test_logging(), pyrosetta.tests.distributed.cluster.test_reproducibility.TestReproducibilityMulti::test_reproducibility_from_reproduce(), pyrosetta.tests.distributed.cluster.test_reproducibility.TestReproducibility::test_reproducibility_minimizer_nstruct(), pyrosetta.tests.distributed.cluster.test_reproducibility.TestReproducibility::test_reproducibility_packer_nstruct(), pyrosetta.tests.distributed.cluster.test_reproducibility.TestReproducibilityMulti::test_reproducibility_packer_nstruct_multi(), pyrosetta.tests.distributed.cluster.test_reproducibility.TestReproducibilityMulti::test_reproducibility_packer_nstruct_multi_decoy_ids(), pyrosetta.tests.distributed.cluster.test_reproducibility.TestReproducibility::test_reproducibility_packer_separate(), pyrosetta.tests.distributed.cluster.test_smoke.SaveAllTest::test_save_all(), pyrosetta.tests.distributed.test_dask_worker.TestDaskArgs::test_worker_extra(), build::update_source_file(), update_ui_project::update_source_file(), drrafter_rna::write_command_file(), drrafter_rna::write_flags_extend_last_round(), DRRAFTER::write_flags_file(), arls_impl::write_if_not_exists(), and mutant_modeler.MutantModeler::write_mutfile().
utility::sql_database::sessionOP basic::database::parse_database_connection | ( | utility::tag::TagCOP | tag | ) |
@detail build database connection from options in a tag, this is useful make sure the fields for constructing a database connection are consistent across different tags.
References out::path::all(), utility::sql_database::TransactionMode::chunk, utility::sql_database::database_mode_from_name(), basic::options::OptionKeys::inout::dbms::database_name, basic::options::OptionKeys::inout::dbms::database_partition, inout::dbms::database_partition(), out::path::db(), enumerate_junctions::default, utility::sql_database::DatabaseSessionManager::get_db_session(), utility::SingletonBase< DatabaseSessionManager >::get_instance(), basic::options::OptionKeys::cloud::host, SmotifHasher::mode, utility::sql_database::DatabaseMode::mysql, utility::sql_database::name_from_database_mode(), utility::sql_database::name_from_transaction_mode(), utility::sql_database::TransactionMode::none, option, basic::options::OptionKeys::inout::dbms::password, closure_error::path, inout::dbms::path(), basic::options::OptionKeys::cloud::port, utility::sql_database::DatabaseMode::postgres, basic::options::OptionKeys::inout::dbms::pq_schema, resolve_db_partition(), inout::dbms::separate_db_per_mpi_process(), utility::sql_database::DatabaseMode::sqlite3, utility::sql_database::TransactionMode::standard, tag, TR, utility::sql_database::transaction_mode_from_name(), basic::options::OptionKeys::inout::dbms::user, utility_exit_with_message, and basic::Tracer::Warning.
Referenced by basic::resource_manager::locator::DatabaseResourceLocator::parse_my_tag().
cppdb::statement basic::database::prepare_statement_no_catch | ( | string const & | statement_string, |
sessionOP | db_session | ||
) |
Do not catch the error - leave the catch for the code using it. Do not use this unless YOU are catching any erorrs (cppdb::error).
platform::SSize basic::database::resolve_db_partition | ( | bool | partition_by_mpi_process, |
platform::SSize | manual_partition | ||
) |
Returns partition identifer from mpi rank if in partitioned database mode, or valid manual partition, otherwise -1.
References utility::mpi_rank().
Referenced by db_partition_from_options(), and parse_database_connection().
cppdb::statement basic::database::safely_prepare_statement | ( | string const & | statement_string, |
sessionOP | db_session | ||
) |
References closure_error::error, basic::Tracer::Error, TR, and utility_exit_with_message.
Referenced by clean_up_database(), dump_bundle_pose(), dump_curve_to_db(), dump_pair_pose(), feed_rms_and_clash_scores_to_database(), get_element_coords(), get_models(), get_nodes(), get_random_bundle_ids(), get_substructure_map(), insert_or_ignore(), load_coordinates_from_database(), basic::resource_manager::locator::DatabaseResourceLocator::locate_resource_stream(), main(), populate_database_with_dummy_data(), prepare_helix_bundles(), prepare_smotifs(), set_cache_size(), setup_activity_table(), setup_roc_curve(), superimpose_smotifs(), table_exists(), write_hbgeom_to_db(), write_hbgeom_types_to_database(), NativeEnsemble::write_job_to_db(), write_new_respair_to_database(), write_respair_scores_to_database(), write_score_types_to_database(), write_scores_and_hbond_geoms_to_database(), NativeEnsemble::write_stats_to_db(), NativeEnsemble::write_stop_time_to_db(), NativeEnsemble::write_temperatures_to_db(), basic::database::insert_statement_generator::InsertGenerator::write_to_database(), basic::database::insert_statement_generator::InsertGenerator::write_to_database_chunked(), basic::database::insert_statement_generator::InsertGenerator::write_to_database_sequential(), and write_weights_to_db().
cppdb::result basic::database::safely_read_from_database | ( | cppdb::statement & | statement | ) |
result basic::database::safely_read_from_database | ( | statement & | statement | ) |
References cycle(), option, inout::dbms::retry_failed_reads(), numeric::random::rg(), TR, numeric::random::uniform(), and utility_exit_with_message.
Referenced by clean_up_database(), dump_bundle_pose(), dump_pair_pose(), get_element_coords(), get_models(), get_nodes(), get_random_bundle_ids(), get_substructure_map(), insert_or_ignore(), load_coordinates_from_database(), basic::resource_manager::locator::DatabaseResourceLocator::locate_resource_stream(), main(), prepare_helix_bundles(), prepare_smotifs(), setup_roc_curve(), and superimpose_smotifs().
void basic::database::safely_write_to_database | ( | cppdb::statement & | statement | ) |
void basic::database::safely_write_to_database | ( | statement & | statement | ) |
References utility_exit_with_message.
Referenced by dump_curve_to_db(), feed_rms_and_clash_scores_to_database(), insert_or_ignore(), main(), populate_database_with_dummy_data(), prepare_helix_bundles(), prepare_smotifs(), set_cache_size(), setup_activity_table(), write_hbgeom_to_db(), write_hbgeom_types_to_database(), NativeEnsemble::write_job_to_db(), write_new_respair_to_database(), write_respair_scores_to_database(), write_schema_to_database(), write_score_types_to_database(), write_scores_and_hbond_geoms_to_database(), NativeEnsemble::write_stats_to_db(), NativeEnsemble::write_stop_time_to_db(), NativeEnsemble::write_temperatures_to_db(), basic::database::insert_statement_generator::InsertGenerator::write_to_database(), basic::database::insert_statement_generator::InsertGenerator::write_to_database_chunked(), basic::database::insert_statement_generator::InsertGenerator::write_to_database_sequential(), and write_weights_to_db().
void basic::database::set_cache_size | ( | sessionOP | db_session, |
Size | cache_size | ||
) |
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
bool basic::database::table_exists | ( | sessionOP | db_session, |
string const & | table_name | ||
) |
References enumerate_junctions::default, create_a3b_hbs::i, utility::sql_database::DatabaseMode::mysql, utility::sql_database::DatabaseMode::postgres, res, safely_prepare_statement(), utility::sql_database::DatabaseMode::sqlite3, and utility_exit_with_message.
Referenced by basic::database::schema_generator::Schema::check_table_and_perform_write().
void basic::database::write_schema_to_database | ( | string | schema_str, |
sessionOP | db_session | ||
) |
|
static |
|
static |
Referenced by find_cache_file(), full_name(), and open().