Implement chart deletion from database
This commit is contained in:
parent
5c7fb089a9
commit
e0b4d30b07
16
src/ag-db.c
16
src/ag-db.c
@ -1132,3 +1132,19 @@ ag_db_save_identical(const AgDbSave *a, const AgDbSave *b, gboolean chart_only)
|
|||||||
|
|
||||||
return TRUE;
|
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
|
||||||
|
);
|
||||||
|
}
|
||||||
|
@ -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);
|
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,
|
gboolean ag_db_save_identical(const AgDbSave *a,
|
||||||
const AgDbSave *b,
|
const AgDbSave *b,
|
||||||
gboolean chart_only);
|
gboolean chart_only);
|
||||||
|
Loading…
Reference in New Issue
Block a user