summaryrefslogtreecommitdiff
path: root/src/analysis/db/misc/rlestr.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/analysis/db/misc/rlestr.h')
-rw-r--r--src/analysis/db/misc/rlestr.h27
1 files changed, 18 insertions, 9 deletions
diff --git a/src/analysis/db/misc/rlestr.h b/src/analysis/db/misc/rlestr.h
index 2aa863f..7faafd0 100644
--- a/src/analysis/db/misc/rlestr.h
+++ b/src/analysis/db/misc/rlestr.h
@@ -30,6 +30,9 @@
#include <sys/types.h>
+#include "../../../common/sqlite.h"
+
+
/* Informations de base pour tout élément ajouté */
typedef struct _rle_string
@@ -49,6 +52,8 @@ void init_rle_string(rle_string *, const char *);
#define get_rle_string(rle) (rle)->data
+#define is_rle_string_empty(rle) ((rle)->data == NULL)
+
/* Constitue une représentation de chaîne de caractères. */
void set_rle_string(rle_string *, const char *);
@@ -58,25 +63,29 @@ void unset_rle_string(rle_string *);
/* Effectue la comparaison entre deux chaînes de caractères. */
int cmp_rle_string(const rle_string *, const rle_string *);
-
-
/* Importe la définition d'une chaîne de caractères. */
-bool load_rle_string(rle_string *, int);
+bool recv_rle_string(rle_string *, int, int);
/* Exporte la définition d'une chaîne de caractères. */
-bool store_rle_string(const rle_string *, int);
+bool send_rle_string(const rle_string *, int, int);
-#define is_rle_string_empty(rle) ((rle)->data == NULL)
+/* --------------------- MANIPULATIONS AVEC UNE BASE DE DONNEES --------------------- */
+/* Définition du tronc commun pour les créations SQLite */
+#define SQLITE_RLESTR_CREATE(n) \
+ n " TEXT"
-/* Importe la définition d'une chaîne de caractères. */
-bool recv_rle_string(rle_string *, int, int);
+/* Constitue les champs destinés à une insertion / modification. */
+bool prepare_db_statement_for_rle_string(const rle_string *, const char *, bound_value **, size_t *);
-/* Exporte la définition d'une chaîne de caractères. */
-bool send_rle_string(const rle_string *, int, int);
+/* Décrit les colonnes utiles à une chaîne de caractères. */
+bool setup_load_of_rle_string(const rle_string *, const char *, bound_value **, size_t *);
+
+/* Charge les valeurs utiles pour une chaîne de caractères. */
+bool load_rle_string(rle_string *, const char *, const bound_value *, size_t);