UPDATE/INSERT a single instance of m_type_name into the database.
280 Account* pAcc = GNC_ACCOUNT (inst);
283 gboolean is_ok = FALSE;
284 gnc_commodity* commodity;
287 g_return_val_if_fail (sql_be != NULL, FALSE);
288 g_return_val_if_fail (inst != NULL, FALSE);
289 g_return_val_if_fail (GNC_IS_ACCOUNT (inst), FALSE);
291 ENTER (
"inst=%p", inst);
293 is_infant = qof_instance_get_infant (inst);
306 else if (sql_be->pristine() || is_infant)
316 if (op != OP_DB_DELETE && commodity != NULL)
341 LEAVE (
"is_ok=%d", is_ok);
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.
const GncGUID * qof_instance_get_guid(gconstpointer inst)
Return the GncGUID of this instance.
gboolean qof_instance_get_destroying(gconstpointer ptr)
Retrieve the flag that indicates whether or not this object is about to be destroyed.
gboolean gnc_sql_slots_save(GncSqlBackend *sql_be, const GncGUID *guid, gboolean is_infant, QofInstance *inst)
gnc_sql_slots_save - Saves slots for an object to the db.
#define ENTER(format, args...)
Print a function entry debugging message.
bool save_commodity(gnc_commodity *comm) noexcept
Ensure that a commodity referenced in another object is in fact saved in the database.
gnc_commodity * xaccAccountGetCommodity(const Account *acc)
Get the account's commodity.
#define LEAVE(format, args...)
Print a function exit debugging message.
gboolean gnc_sql_slots_delete(GncSqlBackend *sql_be, const GncGUID *guid)
gnc_sql_slots_delete - Deletes slots for an object from the db.
The type used to store guids in C.