Implement chart deletion from database

This commit is contained in:
Gergely Polonkai 2014-08-11 00:58:56 +02:00
parent 5c7fb089a9
commit e0b4d30b07
2 changed files with 18 additions and 0 deletions

View File

@ -1132,3 +1132,19 @@ ag_db_save_identical(const AgDbSave *a, const AgDbSave *b, gboolean chart_only)
return TRUE;
}
gboolean
ag_db_delete_chart(AgDb *db, gint row_id, GError **err)
{
AgDbPrivate *priv = ag_db_get_instance_private(db);
GValue id = G_VALUE_INIT;
g_value_init(&id, G_TYPE_INT);
g_value_set_int(&id, row_id);
return gda_connection_delete_row_from_table(
priv->conn, "chart",
"id", &id,
err
);
}

View File

@ -68,6 +68,8 @@ GList *ag_db_get_chart_list(AgDb *db, GError **err);
AgDbSave *ag_db_get_chart_data_by_id(AgDb *db, guint row_id, GError **err);
gboolean ag_db_delete_chart(AgDb *db, gint row_id, GError **err);
gboolean ag_db_save_identical(const AgDbSave *a,
const AgDbSave *b,
gboolean chart_only);