summaryrefslogtreecommitdiff
path: root/src/analysis/db/items/switcher.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2019-09-25 22:20:25 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2019-09-25 22:20:25 (GMT)
commit6ed1e4110eb19b78f76154aa095a74414531f04c (patch)
treed1c3562cb6e180baff3c388a3bb3574b0a02213b /src/analysis/db/items/switcher.c
parent3dc843b3f7991dcd738a30821ff56c7fe13f1094 (diff)
Prepared history for database items.
Diffstat (limited to 'src/analysis/db/items/switcher.c')
-rw-r--r--src/analysis/db/items/switcher.c53
1 files changed, 2 insertions, 51 deletions
diff --git a/src/analysis/db/items/switcher.c b/src/analysis/db/items/switcher.c
index 043effd..94d4940 100644
--- a/src/analysis/db/items/switcher.c
+++ b/src/analysis/db/items/switcher.c
@@ -136,9 +136,6 @@ static void g_switcher_collection_finalize(GSwitcherCollection *);
/* Crée la table des basculements dans une base de données. */
static bool g_switcher_collection_create_db_table(const GSwitcherCollection *, sqlite3 *);
-/* Décrit les colonnes utiles à un chargement de données. */
-static bool g_switcher_collection_setup_load(GSwitcherCollection *, bound_value **, size_t *);
-
/* Détermine si un élément est déjà présent ou non. */
static GDbItem *g_switcher_collection_has_key(GSwitcherCollection *, va_list);
@@ -790,7 +787,6 @@ static void g_switcher_collection_class_init(GSwitcherCollectionClass *klass)
collec = G_DB_COLLECTION_CLASS(klass);
collec->create_table = (collec_create_db_table_fc)g_switcher_collection_create_db_table;
- collec->setup_load = (collec_setup_load_fc)g_switcher_collection_setup_load;
collec->has_key = (collec_has_key_fc)g_switcher_collection_has_key;
}
@@ -929,53 +925,6 @@ static bool g_switcher_collection_create_db_table(const GSwitcherCollection *col
/******************************************************************************
* *
* Paramètres : collec = ensemble d'éléments à consulter. *
-* values = tableau d'éléments à compléter. [OUT] *
-* count = nombre de descriptions renseignées. [OUT] *
-* *
-* Description : Décrit les colonnes utiles à un chargement de données. *
-* *
-* Retour : Bilan de l'opération. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static bool g_switcher_collection_setup_load(GSwitcherCollection *collec, bound_value **values, size_t *count)
-{
- bool status; /* Bilan d'une préparation */
- bound_value *value; /* Valeur à éditer / définir */
-
- status = G_DB_COLLECTION_CLASS(g_switcher_collection_parent_class)->setup_load(G_DB_COLLECTION(collec), \
- values, count);
- if (!status) return false;
-
- if (!store_vmpa(NULL, NULL, values, count))
- return false;
-
- *count += 2;
- *values = realloc(*values, *count * sizeof(bound_value));
-
- value = &(*values)[*count - 2];
-
- value->cname = "op_index";
- value->built_name = false;
- value->type = SQLITE_INTEGER;
-
- value = &(*values)[*count - 1];
-
- value->cname = "type";
- value->built_name = false;
- value->type = SQLITE_INTEGER;
-
- return true;
-
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : collec = ensemble d'éléments à consulter. *
* ap = clef identifiant de manière unique un élément. *
* *
* Description : Détermine si un élément est déjà présent ou non. *
@@ -998,6 +947,7 @@ static GDbItem *g_switcher_collection_has_key(GSwitcherCollection *collec, va_li
ref = va_arg(ap, vmpa2t *);
+#if 0
items = g_db_collection_get_items(G_DB_COLLECTION(collec));
for (iter = g_list_first(items); iter != NULL && result == NULL; iter = g_list_next(iter))
@@ -1014,6 +964,7 @@ static GDbItem *g_switcher_collection_has_key(GSwitcherCollection *collec, va_li
result = G_DB_ITEM(bm);
}
+#endif
return result;