[libgda] postgres-meta: some fixes on meta generation



commit 21de9cf2e7866dc6c8d1377a68578c08eb5355b7
Author: Daniel Espinosa Ortiz <esodan gmail com>
Date:   Tue Jan 8 12:49:21 2019 -0600

    postgres-meta: some fixes on meta generation
    
    Improved GdaMetaContext stringify

 libgda/gda-meta-store.c                          | 7 +++++--
 providers/reuseable/postgres/gda-postgres-meta.c | 9 +++------
 2 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/libgda/gda-meta-store.c b/libgda/gda-meta-store.c
index eac17d70a..88d128e67 100644
--- a/libgda/gda-meta-store.c
+++ b/libgda/gda-meta-store.c
@@ -441,7 +441,9 @@ gda_meta_context_stringify (GdaMetaContext *ctx)
 {
        gint i;
        gchar *str;
-       GString *string = g_string_new ("");
+       GString *string = g_string_new ("{");
+       g_string_append (string, ctx->table_name);
+       g_string_append (string, "}=>{{");
 
        for (i = 0; i < ctx->size; i++) {
                if (i > 0)
@@ -451,7 +453,8 @@ gda_meta_context_stringify (GdaMetaContext *ctx)
                g_free (str);
        }
        if (i == 0)
-               g_string_append (string, "no constraint in context");
+               g_string_append (string, "no constraints in context");
+       g_string_append (string, "}}");
        str = string->str;
        g_string_free (string, FALSE);
        return str;
diff --git a/providers/reuseable/postgres/gda-postgres-meta.c 
b/providers/reuseable/postgres/gda-postgres-meta.c
index 80972e941..87dd282f8 100644
--- a/providers/reuseable/postgres/gda-postgres-meta.c
+++ b/providers/reuseable/postgres/gda-postgres-meta.c
@@ -590,12 +590,9 @@ _gda_postgres_meta__domains (G_GNUC_UNUSED GdaServerProvider *prov, GdaConnectio
                                                              _col_types_domains, error);
        if (!model)
                return FALSE;
-  gchar *s = gda_meta_context_stringify (context);
-  g_message ("Context used to update: %s", s);
-  g_free (s);
        gda_meta_store_set_reserved_keywords_func (store, _gda_postgres_reuseable_get_reserved_keywords_func
                                                   ((GdaProviderReuseable*) rdata));
-       retval = gda_meta_store_modify_with_context (store, context, model, error);
+       retval = gda_meta_store_modify (store, gda_meta_context_get_table (context), model, NULL, error, 
NULL);
        g_object_unref (model);
                
        return retval;
@@ -727,7 +724,7 @@ _gda_postgres_meta__el_types (G_GNUC_UNUSED GdaServerProvider *prov, GdaConnecti
 
        gda_meta_store_set_reserved_keywords_func (store, _gda_postgres_reuseable_get_reserved_keywords_func
                                                   ((GdaProviderReuseable*) rdata));
-       retval = gda_meta_store_modify_with_context (store, context, model, error);
+       retval = gda_meta_store_modify (store, gda_meta_context_get_table (context), model, NULL, error, 
NULL);
        g_object_unref (model);
                
        return retval;
@@ -1957,7 +1954,7 @@ _gda_postgres_meta__routine_par (G_GNUC_UNUSED GdaServerProvider *prov, GdaConne
 
        gda_meta_store_set_reserved_keywords_func (store, _gda_postgres_reuseable_get_reserved_keywords_func
                                                   ((GdaProviderReuseable*) rdata));
-       retval = gda_meta_store_modify_with_context (store, context, model, error);
+       retval = gda_meta_store_modify (store, gda_meta_context_get_table (context), model, NULL, error, 
NULL);
        g_object_unref (model);
                
        return retval;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]