|
const std::string | m_table_name |
|
const int | m_version |
|
const std::string | m_type_name |
|
const EntryVec & | m_col_table |
| The front-end QofIdType.
|
|
Definition at line 35 of file gnc-order-sql.h.
◆ load_all()
Load all objects of m_type in the database into memory.
- Parameters
-
Implements GncSqlObjectBackend.
Definition at line 106 of file gnc-order-sql.cpp.
108 g_return_if_fail (sql_be != NULL);
110 std::string sql(
"SELECT * FROM " TABLE_NAME);
111 auto stmt = sql_be->create_statement_from_sql(sql);
114 for (
auto row : *result)
115 load_single_order (sql_be, row);
117 std::string pkey(col_table[0]->name());
118 sql =
"SELECT DISTINCT ";
119 sql += pkey +
" FROM " TABLE_NAME;
121 (BookLookupFn)gnc_order_lookup);
GncSqlResultPtr execute_select_statement(const GncSqlStatementPtr &stmt) const noexcept
Executes an SQL SELECT statement and returns the result rows.
void gnc_sql_slots_load_for_sql_subquery(GncSqlBackend *sql_be, const std::string subquery, BookLookupFn lookup_fn)
gnc_sql_slots_load_for_sql_subquery - Loads slots for all objects whose guid is supplied by a subquer...
◆ write()
Write all objects of m_type_name to the database.
- Parameters
-
- Returns
- true if the objects were successfully written, false otherwise.
Reimplemented from GncSqlObjectBackend.
Definition at line 158 of file gnc-order-sql.cpp.
160 g_return_val_if_fail (sql_be != NULL, FALSE);
void qof_object_foreach(QofIdTypeConst type_name, QofBook *book, QofInstanceForeachCB cb, gpointer user_data)
Invoke the callback 'cb' on every instance ov a particular object type.
Data-passing struct for callbacks to qof_object_foreach() used in GncSqlObjectBackend::write().
The documentation for this class was generated from the following files: