[libgda] Removing Connection check



commit 8f06fa38921c28c11ea3890d466a2fe9abeecbc3
Author: Pavlo Solntsev <p sun fun gmail com>
Date:   Wed Jun 3 22:42:49 2020 -0500

    Removing Connection check
    
    The connection will be checked in the interface
    implementation.

 libgda/gda-db-column.c | 14 --------------
 libgda/gda-db-index.c  | 14 --------------
 2 files changed, 28 deletions(-)
---
diff --git a/libgda/gda-db-column.c b/libgda/gda-db-column.c
index 7d299f477..ae3f772b0 100644
--- a/libgda/gda-db-column.c
+++ b/libgda/gda-db-column.c
@@ -1323,13 +1323,6 @@ gda_db_column_create (GdaDdlModifiable *self,
 
   const gchar *strtype = NULL;
 
-  if (!gda_connection_is_opened (cnc))
-    {
-      g_set_error (error, GDA_DDL_MODIFIABLE_ERROR, GDA_DDL_MODIFIABLE_CONNECTION_NOT_OPENED,
-                   _("Connection is not opened"));
-      return FALSE;
-    }
-
   gda_lockable_lock (GDA_LOCKABLE (cnc));
 
   provider = gda_connection_get_provider (cnc);
@@ -1438,13 +1431,6 @@ gda_db_column_rename (GdaDdlModifiable *self,
   GdaDbColumn *column = GDA_DB_COLUMN (self);
   GdaDbColumn *column_new = GDA_DB_COLUMN (user_data);
 
-  if (!gda_connection_is_opened (cnc))
-    {
-      g_set_error (error, GDA_DDL_MODIFIABLE_ERROR, GDA_DDL_MODIFIABLE_CONNECTION_NOT_OPENED,
-                   _("Connection is not opened"));
-      return FALSE;
-    }
-
   gda_lockable_lock (GDA_LOCKABLE (cnc));
 
   provider = gda_connection_get_provider (cnc);
diff --git a/libgda/gda-db-index.c b/libgda/gda-db-index.c
index 48eeac789..6f2458aad 100644
--- a/libgda/gda-db-index.c
+++ b/libgda/gda-db-index.c
@@ -354,13 +354,6 @@ gda_db_index_drop (GdaDdlModifiable *self,
   G_DEBUG_HERE();
   g_return_val_if_fail (GDA_IS_DB_INDEX (self), FALSE);
 
-  if (!gda_connection_is_opened(cnc))
-    {
-      g_set_error (error, GDA_DDL_MODIFIABLE_ERROR, GDA_DDL_MODIFIABLE_CONNECTION_NOT_OPENED,
-                   _("Connection is not opened"));
-      return FALSE;
-    }
-
   GdaServerProvider *provider = NULL;
   GdaServerOperation *op = NULL;
 
@@ -422,13 +415,6 @@ gda_db_index_create (GdaDdlModifiable *self,
   GdaDbIndex *index = GDA_DB_INDEX (self);
   GdaDbTable *table = NULL;
 
-  if (!gda_connection_is_opened (cnc))
-    {
-      g_set_error (error, GDA_DDL_MODIFIABLE_ERROR, GDA_DDL_MODIFIABLE_CONNECTION_NOT_OPENED,
-                   _("Connection is not opened"));
-      return FALSE;
-    }
-
   gda_lockable_lock (GDA_LOCKABLE (cnc));
 
   provider = gda_connection_get_provider (cnc);


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