database¶
Bindings for basic::database namespace
-
pyrosetta.rosetta.basic.database.
attributes_for_parse_database_connection
(: pyrosetta.rosetta.std.list_utility_tag_XMLSchemaAttribute_t, xsd: utility::tag::XMLSchemaDefinition) → None¶ C++: basic::database::attributes_for_parse_database_connection(class std::list<class utility::tag::XMLSchemaAttribute, class std::allocator<class utility::tag::XMLSchemaAttribute> > &, class utility::tag::XMLSchemaDefinition &) –> void
-
pyrosetta.rosetta.basic.database.
check_statement_sanity
(sql: str) → None¶ C++: basic::database::check_statement_sanity(class std::basic_string<char>) –> void
-
pyrosetta.rosetta.basic.database.
db_partition_from_options
(db_mode: pyrosetta.rosetta.utility.sql_database.e) → int¶ Returns partition identifer if in partitioned database mode, otherwise -1.
C++: basic::database::db_partition_from_options(enum utility::sql_database::DatabaseMode::e) –> long
-
pyrosetta.rosetta.basic.database.
find_cache_file
(cache_file: str, dir_only: bool) → bool¶ - Does cache file (absolute path) exist?
- if dir_only is true, will return true if the cache file could be created.
C++: basic::database::find_cache_file(const class std::basic_string<char> &, bool) –> bool
-
pyrosetta.rosetta.basic.database.
find_database_path
(*args, **kwargs)¶ Overloaded function.
- find_database_path(dir: str, filename: str) -> str
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())
dir like chemical/carbohydrates/linkage_conformers/
C++: basic::database::find_database_path(class std::basic_string<char>, class std::basic_string<char>) –> std::string
- find_database_path(dir: str, filename: str, ext: str) -> str
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())
dir like chemical/carbohydrates/linkage_conformers/
C++: basic::database::find_database_path(class std::basic_string<char>, class std::basic_string<char>, class std::basic_string<char>) –> std::string
-
pyrosetta.rosetta.basic.database.
full_cache_name
(short_name: str, source_file: str, for_writing: bool) → str¶ - 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.
C++: basic::database::full_cache_name(const class std::basic_string<char> &, const class std::basic_string<char> &, bool) –> std::string
-
pyrosetta.rosetta.basic.database.
full_name
(*args, **kwargs)¶ Overloaded function.
- full_name(db_file: str) -> str
- full_name(db_file: str, warn: bool) -> str
Full-path database file name
C++: basic::database::full_name(const class std::basic_string<char> &, bool) –> std::string
-
pyrosetta.rosetta.basic.database.
get_db_session
(*args, **kwargs)¶ Overloaded function.
- get_db_session() -> pyrosetta.rosetta.utility.sql_database.session
- Aquire a database session using the command line options
- transaction type is set to standard
C++: basic::database::get_db_session() –> class std::shared_ptr<class utility::sql_database::session>
- get_db_session(db_name: str) -> pyrosetta.rosetta.utility.sql_database.session
- get_db_session(db_name: str, pq_schema: str) -> pyrosetta.rosetta.utility.sql_database.session
- 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
C++: basic::database::get_db_session(const class std::basic_string<char> &, const class std::basic_string<char> &) –> class std::shared_ptr<class utility::sql_database::session>
- get_db_session(db_name: str, transaction_mode: pyrosetta.rosetta.utility.sql_database.e, chunk_size: int) -> pyrosetta.rosetta.utility.sql_database.session
- get_db_session(db_name: str, transaction_mode: pyrosetta.rosetta.utility.sql_database.e, chunk_size: int, pq_schema: str) -> pyrosetta.rosetta.utility.sql_database.session
- Aquire a database session using the command line parameters
- For postgres databases, the pq_schema acts like a namespace in the database
C++: basic::database::get_db_session(const class std::basic_string<char> &, enum utility::sql_database::TransactionMode::e, unsigned long, const class std::basic_string<char> &) –> class std::shared_ptr<class utility::sql_database::session>
- get_db_session(db_mode: pyrosetta.rosetta.utility.sql_database.e, db_name: str) -> pyrosetta.rosetta.utility.sql_database.session
- get_db_session(db_mode: pyrosetta.rosetta.utility.sql_database.e, db_name: str, pq_schema: str) -> pyrosetta.rosetta.utility.sql_database.session
C++: basic::database::get_db_session(enum utility::sql_database::DatabaseMode::e, const class std::basic_string<char> &, const class std::basic_string<char> &) –> class std::shared_ptr<class utility::sql_database::session>
- get_db_session(db_mode: pyrosetta.rosetta.utility.sql_database.e, transaction_mode: pyrosetta.rosetta.utility.sql_database.e, chunk_size: int, db_name: str) -> pyrosetta.rosetta.utility.sql_database.session
- get_db_session(db_mode: pyrosetta.rosetta.utility.sql_database.e, transaction_mode: pyrosetta.rosetta.utility.sql_database.e, chunk_size: int, db_name: str, pq_schema: str) -> pyrosetta.rosetta.utility.sql_database.session
- Aquire a database session using the command line parameters
- For postgres databases, the pq_schema acts like a namespace in the database
C++: basic::database::get_db_session(enum utility::sql_database::DatabaseMode::e, enum utility::sql_database::TransactionMode::e, unsigned long, const class std::basic_string<char> &, const class std::basic_string<char> &) –> class std::shared_ptr<class utility::sql_database::session>
-
pyrosetta.rosetta.basic.database.
insert_or_ignore
(table_name: str, column_names: pyrosetta.rosetta.std.vector_std_string, values: pyrosetta.rosetta.std.vector_std_string, db_session: pyrosetta.rosetta.utility.sql_database.session) → None¶ C++: basic::database::insert_or_ignore(class std::basic_string<char>, class std::vector<class std::basic_string<char>, class std::allocator<class std::basic_string<char> > >, class std::vector<class std::basic_string<char>, class std::allocator<class std::basic_string<char> > >, class std::shared_ptr<class utility::sql_database::session>) –> void
-
pyrosetta.rosetta.basic.database.
make_compound_statement
(table_name: str, column_names: pyrosetta.rosetta.std.vector_std_string, row_count: int) → str¶ C++: basic::database::make_compound_statement(const class std::basic_string<char> &, const class std::vector<class std::basic_string<char>, class std::allocator<class std::basic_string<char> > > &, const unsigned long &) –> std::string
-
pyrosetta.rosetta.basic.database.
open
(*args, **kwargs)¶ Overloaded function.
- open(db_stream: utility::io::izstream, db_file: str) -> bool
- open(db_stream: utility::io::izstream, db_file: str, warn: bool) -> bool
Open a database file on a provided stream
C++: basic::database::open(class utility::io::izstream &, const class std::basic_string<char> &, bool) –> bool
-
pyrosetta.rosetta.basic.database.
parse_database_connection
(tag: utility::tag::Tag) → pyrosetta.rosetta.utility.sql_database.session¶ C++: basic::database::parse_database_connection(class std::shared_ptr<const class utility::tag::Tag>) –> class std::shared_ptr<class utility::sql_database::session>
-
pyrosetta.rosetta.basic.database.
resolve_db_partition
(*args, **kwargs)¶ Overloaded function.
- resolve_db_partition(partition_by_mpi_process: bool) -> int
- resolve_db_partition(partition_by_mpi_process: bool, manual_partition: int) -> int
Returns partition identifer from mpi rank if in partitioned database mode, or valid manual partition, otherwise -1.
C++: basic::database::resolve_db_partition(bool, long) –> long
-
pyrosetta.rosetta.basic.database.
safely_prepare_statement
(statement_string: str, db_session: pyrosetta.rosetta.utility.sql_database.session) → pyrosetta.rosetta.cppdb.statement¶ C++: basic::database::safely_prepare_statement(const class std::basic_string<char> &, class std::shared_ptr<class utility::sql_database::session>) –> class cppdb::statement
-
pyrosetta.rosetta.basic.database.
safely_read_from_database
(statement: pyrosetta.rosetta.cppdb.statement) → pyrosetta.rosetta.cppdb.result¶ C++: basic::database::safely_read_from_database(class cppdb::statement &) –> class cppdb::result
-
pyrosetta.rosetta.basic.database.
safely_write_to_database
(statement: pyrosetta.rosetta.cppdb.statement) → None¶ C++: basic::database::safely_write_to_database(class cppdb::statement &) –> void
-
pyrosetta.rosetta.basic.database.
set_cache_size
(db_session: pyrosetta.rosetta.utility.sql_database.session, cache_size: int) → None¶ set the number of 1kb pages to use for cache
C++: basic::database::set_cache_size(class std::shared_ptr<class utility::sql_database::session>, unsigned long) –> void
-
pyrosetta.rosetta.basic.database.
table_exists
(db_session: pyrosetta.rosetta.utility.sql_database.session, table_name: str) → bool¶ C++: basic::database::table_exists(class std::shared_ptr<class utility::sql_database::session>, const class std::basic_string<char> &) –> bool
-
pyrosetta.rosetta.basic.database.
write_schema_to_database
(schema: str, db_session: pyrosetta.rosetta.utility.sql_database.session) → None¶ C++: basic::database::write_schema_to_database(class std::basic_string<char>, class std::shared_ptr<class utility::sql_database::session>) –> void