[libgda: 2/3] DB: Domain log domain defined. Formatinng



commit 11e1272ecc3a0baf6e285cf2f27c6f473faf17fd
Author: Pavlo Solntsev <p sun fun gmail com>
Date:   Mon May 20 07:34:40 2019 -0500

    DB: Domain log domain defined. Formatinng

 libgda/gda-db-catalog.c | 31 ++++++++++++++++++-------------
 libgda/gda-db-table.c   |  3 ++-
 2 files changed, 20 insertions(+), 14 deletions(-)
---
diff --git a/libgda/gda-db-catalog.c b/libgda/gda-db-catalog.c
index 1e66bc8bd..e95871433 100644
--- a/libgda/gda-db-catalog.c
+++ b/libgda/gda-db-catalog.c
@@ -1,6 +1,6 @@
 /* gda-db-catalog.c
  *
- * Copyright (C) 2018 Pavlo Solntsev <p sun fun gmail com>
+ * Copyright (C) 2018-2019 Pavlo Solntsev <p sun fun gmail com>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -18,6 +18,8 @@
  * Boston, MA  02110-1301, USA.
  */
 
+#define G_LOG_DOMAIN "gda-db-catalog"
+
 #include "gda-db-catalog.h"
 #include "gda-db-table.h"
 #include "gda-db-view.h"
@@ -890,18 +892,21 @@ gda_db_catalog_perform_operation (GdaDbCatalog *self,
 
       mobj = gda_meta_struct_complement (mstruct, GDA_META_DB_TABLE, catalog, schema,name, NULL);
 
-      if (mobj) {
-        st = gda_db_table_update (it->data,GDA_META_TABLE(mobj), priv->cnc, error);
-        if (!st) {
-          break;
-        }
-      }
-      else {
-        st = gda_db_table_create (it->data,priv->cnc, TRUE, error);
-        if (!st) {
-          break;
-        }
-      }
+      if (mobj)
+                               {
+                                       g_debug("Object %s was found in the database\n", 
gda_db_base_get_name(GDA_DB_BASE(it->data)));
+                                       st = gda_db_table_update (it->data,GDA_META_TABLE(mobj), priv->cnc, 
error);
+
+                                       if (!st)
+                                               break;
+                               }
+                       else
+                               {
+                                       st = gda_db_table_create (it->data,priv->cnc, TRUE, error);
+
+                                       if (!st)
+                                               break;
+                               }
     } /* End of for loop */
 
   gda_value_free (catalog);
diff --git a/libgda/gda-db-table.c b/libgda/gda-db-table.c
index 2263f146d..2b797c562 100644
--- a/libgda/gda-db-table.c
+++ b/libgda/gda-db-table.c
@@ -17,7 +17,7 @@
  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
  * Boston, MA  02110-1301, USA.
  */
-
+#define G_LOG_DOMAIN "gda-db-table"
 #include "gda-db-table.h"
 #include "gda-db-fkey.h"
 #include "gda-db-column.h"
@@ -561,6 +561,7 @@ _gda_db_compare_column_meta (GdaMetaTableColumn *a,
   const gchar *namea = a->column_name;
   const gchar *nameb = gda_db_column_get_name (b);
 
+       g_debug("Checking %s and %s\n", namea, nameb);
   return g_strcmp0 (namea,nameb);
 }
 


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