diff options
Diffstat (limited to 'src/analysis/db/item.h')
-rw-r--r-- | src/analysis/db/item.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/analysis/db/item.h b/src/analysis/db/item.h index 3938610..2f8ee60 100644 --- a/src/analysis/db/item.h +++ b/src/analysis/db/item.h @@ -29,6 +29,9 @@ #include <stdbool.h> +#include "../../common/sqlite.h" + + #define G_TYPE_DB_ITEM g_db_item_get_type() #define G_DB_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), g_db_item_get_type(), GDbItem)) @@ -65,4 +68,19 @@ bool g_db_item_is_volatile(const GDbItem *); +/* --------------------- MANIPULATIONS AVEC UNE BASE DE DONNEES --------------------- */ + + +/* Définition du tronc commun pour les créations SQLite */ +#define SQLITE_DB_ITEM_CREATE \ + "user TEXT, " \ + "created TIMESTAMP DEFAULT CURRENT_TIMESTAMP, " \ + "modified TIMESTAMP DEFAULT CURRENT_TIMESTAMP, " + + +/* Constitue les champs destinés à une insertion / modification. */ +bool g_db_item_prepare_db_statement(const GDbItem *, bool, bound_value **, size_t *); + + + #endif /* _ANALYSIS_DB_ITEM_H */ |