|
| | GncDbiBackend (GncSqlConnection *conn, QofBook *book) |
| void | session_begin (QofSession *, const char *, SessionOpenMode) override |
| | Open the file or connect to the server.
|
| void | session_end () override |
| void | load (QofBook *, QofBackendLoadType) override |
| | Load the minimal set of application data needed for the application to be operable at initial startup.
|
| void | safe_sync (QofBook *) override |
| | Safely resave a database by renaming all of its tables, recreating everything, and then dropping the backup tables only if there were no errors.
|
| bool | connected () const noexcept |
| void | set_dbi_error (QofBackendError error, unsigned int repeat, bool retry) noexcept |
| | FIXME: Just a pass-through to m_conn:
|
| void | retry_connection (const char *msg) const noexcept |
| bool | exists () |
| void | set_exists (bool exists) |
| void | session_begin (QofSession *session, const char *new_uri, SessionOpenMode mode) |
| | Open the file or connect to the server.
|
| void | safe_sync (QofBook *book) |
| | Perform a sync in a way that prevents data loss on a DBI backend.
|
| | GncSqlBackend (GncSqlConnection *conn, QofBook *book) |
| void | load (QofBook *, QofBackendLoadType) override |
| | Load the contents of an SQL database into a book.
|
| void | sync (QofBook *) override |
| | Save the contents of a book to an SQL database.
|
| void | begin (QofInstance *) override |
| | An object is about to be edited.
|
| void | commit (QofInstance *) override |
| | Object editing is complete and the object should be saved.
|
| void | rollback (QofInstance *) override |
| | Object editing has been cancelled.
|
| void | connect (GncSqlConnection *conn) noexcept |
| | Connect the backend to a GncSqlConnection.
|
| void | init_version_info () noexcept |
| | Initializes DB table version information.
|
| bool | reset_version_info () noexcept |
| | Resets the version table information by removing all version table info.
|
| void | finalize_version_info () noexcept |
| | Finalizes DB table version information.
|
| GncSqlStatementPtr | create_statement_from_sql (const std::string &str) const noexcept |
| GncSqlResultPtr | execute_select_statement (const GncSqlStatementPtr &stmt) const noexcept |
| | Executes an SQL SELECT statement and returns the result rows.
|
| int | execute_nonselect_statement (const GncSqlStatementPtr &stmt) const noexcept |
| std::string | quote_string (const std::string &) const noexcept |
| bool | create_table (const std::string &table_name, const EntryVec &col_table) const noexcept |
| | Creates a table in the database.
|
| bool | create_table (const std::string &table_name, int table_version, const EntryVec &col_table) noexcept |
| | Creates a table in the database and sets its version.
|
| void | create_tables () noexcept |
| | Create/update all tables in the database.
|
| bool | create_index (const std::string &index_name, const std::string &table_name, const EntryVec &col_table) const noexcept |
| | Creates an index in the database.
|
| bool | add_columns_to_table (const std::string &table_name, const EntryVec &col_table) const noexcept |
| | Adds one or more columns to an existing table.
|
| void | upgrade_table (const std::string &table_name, const EntryVec &col_table) noexcept |
| | Upgrades a table to a new structure.
|
| uint_t | get_table_version (const std::string &table_name) const noexcept |
| | Returns the version number for a DB table.
|
| bool | set_table_version (const std::string &table_name, uint_t version) noexcept |
| | Registers the version for a table.
|
| void | commodity_for_postload_processing (gnc_commodity *) |
| | Register a commodity to be committed after loading is complete.
|
| GncSqlObjectBackendPtr | get_object_backend (const std::string &type) const noexcept |
| | Get the GncSqlObjectBackend for the indicated type.
|
| bool | object_in_db (const char *table_name, QofIdTypeConst obj_name, const gpointer pObject, const EntryVec &table) const noexcept |
| | Checks whether an object is in the database or not.
|
| bool | do_db_operation (E_DB_OPERATION op, const char *table_name, QofIdTypeConst obj_name, gpointer pObject, const EntryVec &table) const noexcept |
| | Performs an operation on the database.
|
| bool | save_commodity (gnc_commodity *comm) noexcept |
| | Ensure that a commodity referenced in another object is in fact saved in the database.
|
| QofBook * | book () const noexcept |
| void | set_loading (bool loading) noexcept |
| bool | pristine () const noexcept |
| void | update_progress (double pct) const noexcept |
| void | finish_progress () const noexcept |
|
| QofBackend (const QofBackend &)=delete |
|
| QofBackend (const QofBackend &&)=delete |
| virtual void | export_coa (QofBook *) |
| | Extract the chart of accounts from the current database and create a new database with it.
|
| void | set_error (QofBackendError err) |
| | Set the error value only if there isn't already an error already.
|
| QofBackendError | get_error () |
| | Retrieve the currently-stored error and clear it.
|
| bool | check_error () |
| | Report if there is an error.
|
| void | set_message (std::string &&) |
| | Set a descriptive message that can be displayed to the user when there's an error.
|
| const std::string && | get_message () |
| | Retrieve and clear the stored error message.
|
| void | set_percentage (QofBePercentageFunc pctfn) |
| | Store and retrieve a backend-specific function for determining the progress in completing a long operation, for use with a progress meter.
|
| QofBePercentageFunc | get_percentage () |
| const std::string & | get_uri () |
| | Retrieve the backend's storage URI.
|
template<DbType Type>
class GncDbiBackend< Type >
Definition at line 88 of file gnc-backend-dbi.hpp.