mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Delete unused or duplicated member variables from GncSqlBackend & GncDbiBackend.
This commit is contained in:
parent
c0a193c593
commit
ccbfb69cf1
@ -1480,8 +1480,7 @@ gnc_dbi_load (QofBackend* qbe, QofBook* book, QofBackendLoadType loadType)
|
||||
|
||||
if (loadType == LOAD_TYPE_INITIAL_LOAD)
|
||||
{
|
||||
g_assert (be->primary_book == nullptr);
|
||||
be->primary_book = book;
|
||||
g_assert (be->sql_be.book == nullptr);
|
||||
|
||||
// Set up table version information
|
||||
gnc_sql_init_version_info (&be->sql_be);
|
||||
@ -1677,7 +1676,7 @@ gnc_dbi_safe_sync_all (QofBackend* qbe, QofBook* book)
|
||||
g_return_if_fail (be != nullptr);
|
||||
g_return_if_fail (book != nullptr);
|
||||
|
||||
ENTER ("book=%p, primary=%p", book, be->primary_book);
|
||||
ENTER ("book=%p, primary=%p", book, be->sql_be.book);
|
||||
dbname = dbi_conn_get_option (be->conn, "dbname");
|
||||
auto table_list = conn->m_provider->get_table_list (conn->m_conn, dbname);
|
||||
if (!conn_table_operation (conn, table_list, backup))
|
||||
@ -1700,8 +1699,6 @@ gnc_dbi_safe_sync_all (QofBackend* qbe, QofBook* book)
|
||||
return;
|
||||
}
|
||||
}
|
||||
be->is_pristine_db = TRUE;
|
||||
be->primary_book = book;
|
||||
|
||||
gnc_sql_sync_all (&be->sql_be, book);
|
||||
if (qof_backend_check_error (qbe))
|
||||
|
@ -82,16 +82,7 @@ struct GncDbiBackend
|
||||
|
||||
dbi_conn conn;
|
||||
|
||||
QofBook* primary_book; /* The primary, main open book */
|
||||
gboolean loading; /* We are performing an initial load */
|
||||
gboolean in_query;
|
||||
gboolean supports_transactions;
|
||||
gboolean is_pristine_db; // Are we saving to a new pristine db?
|
||||
gboolean exists; // Does the database exist?
|
||||
|
||||
gint obj_total; // Total # of objects (for percentage calculation)
|
||||
gint operations_done; // Number of operations (save/load) done
|
||||
// GHashTable* versions; // Version number for each table
|
||||
};
|
||||
|
||||
class GncDbiSqlConnection : public GncSqlConnection
|
||||
|
@ -450,12 +450,6 @@ gnc_sql_sync_all (GncSqlBackend* be, QofBook* book)
|
||||
|
||||
/* Save all contents */
|
||||
be->book = book;
|
||||
be->obj_total = 0;
|
||||
be->obj_total += 1 + gnc_account_n_descendants (gnc_book_get_root_account (
|
||||
book));
|
||||
be->obj_total += gnc_book_count_transactions (book);
|
||||
be->operations_done = 0;
|
||||
|
||||
is_ok = be->conn->begin_transaction ();
|
||||
|
||||
// FIXME: should write the set of commodities that are used
|
||||
|
@ -73,8 +73,6 @@ struct GncSqlBackend
|
||||
gboolean loading; /**< We are performing an initial load */
|
||||
gboolean in_query; /**< We are processing a query */
|
||||
gboolean is_pristine_db; /**< Are we saving to a new pristine db? */
|
||||
gint obj_total; /**< Total # of objects (for percentage calculation) */
|
||||
gint operations_done; /**< Number of operations (save/load) done */
|
||||
GHashTable* versions; /**< Version number for each table */
|
||||
const gchar* timespec_format; /**< Format string for SQL for timespec values */
|
||||
};
|
||||
|
@ -637,7 +637,7 @@ test_gnc_sql_convert_timespec_to_string ()
|
||||
nullptr, nullptr, nullptr, nullptr, ERR_BACKEND_NO_ERR, nullptr,
|
||||
0, nullptr
|
||||
},
|
||||
nullptr, nullptr, FALSE, FALSE, FALSE, 0, 0, nullptr,
|
||||
nullptr, nullptr, FALSE, FALSE, FALSE, nullptr,
|
||||
"%4d-%02d-%02d %02d:%02d:%02d"
|
||||
};
|
||||
const char* date[numtests] = {"1995-03-11 19:17:26",
|
||||
|
Loading…
Reference in New Issue
Block a user