Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [dtp-dev] Firebird enablement in DTP

Hi Roman,

Thanks very much for the updated patches and your work in enabling DTP for
Firebird. I've applied the updated patches to the 1.5 code line, and you
can find them in the 4/25 nightly build. For 175454, I added a "TODO" to
the method referencing that bug, so the committer responsible can look into
it later (deprecate? fix? remove? etc.)

Please let us know if you find any problems with how these patches were
applied or elsewhere.

Regards,
John Graham
Eclipse Data Tools Platform PMC Chair
Staff Software Engineer, Sybase, Inc.
http://dataplat.blogspot.com/



                                                                           
             Roman Rokytskyy                                               
             <rrokytskyy@yahoo                                             
             .co.uk>                                                    To 
             Sent by:                  DTP development mailing list        
             dtp-dev-bounces@e         <dtp-dev@xxxxxxxxxxx>               
             clipse.org                                                 cc 
                                                                           
                                                                   Subject 
             04/23/2007 05:19          Re: [dtp-dev] Firebird enablement   
             PM                        in DTP                              
                                                                           
                                                                           
             Please respond to                                             
              DTP development                                              
               mailing list                                                
             <dtp-dev@eclipse.                                             
                   org>                                                    
                                                                           
                                                                           




Hello,

Recently I have upgraded my development to DTP 1.5, so far things work ok.

> I have opened following bug reports:
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=175454
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=175455
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=175456
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=175457
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=175458

Also I have updated the suggested patches - everything is fine, diffs
are in the attachment - please forward them to the appropriate
developers (I will update also bugs, however that will happen later this
week).

The bug 175454 remains unpatched - suggested patch creates circular
dependencies between plugins. However the good news are that the buggy
method is not used anywhere in DTP - good candidate for deprecation.

Best regards,
Roman Rokytskyy
### Eclipse Workspace Patch 1.0
#P org.eclipse.datatools.sqltools.data.core
Index:
src/org/eclipse/datatools/sqltools/data/internal/core/load/LoadData.java
===================================================================
RCS file:
/cvsroot/datatools/org.eclipse.datatools.sqltools/plugins/org.eclipse.datatools.sqltools.data.core/src/org/eclipse/datatools/sqltools/data/internal/core/load/LoadData.java,v

retrieving revision 1.1
diff -u -r1.1 LoadData.java
---
src/org/eclipse/datatools/sqltools/data/internal/core/load/LoadData.java
       13 Dec 2006 02:08:27 -0000          1.1
+++
src/org/eclipse/datatools/sqltools/data/internal/core/load/LoadData.java
       23 Apr 2007 21:13:20 -0000
@@ -17,6 +17,9 @@
 import java.util.Vector;

 import org.eclipse.core.runtime.IStatus;
+import
org.eclipse.datatools.connectivity.sqm.core.definition.DatabaseDefinition;
+import org.eclipse.datatools.connectivity.sqm.internal.core.RDBCorePlugin;
+import org.eclipse.datatools.modelbase.sql.schema.Database;
 import org.eclipse.datatools.modelbase.sql.tables.Table;
 import org.eclipse.datatools.sqltools.data.internal.core.DataCorePlugin;
 import org.eclipse.datatools.sqltools.data.internal.core.common.Output;
@@ -182,7 +185,20 @@
     }

     protected String getFullyQualifiedName() {
-            return "\"" + table.getSchema().getName() + "\".\"" +
table.getName() + "\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+        Database db = table.getSchema().getCatalog() != null ?
+            table.getSchema().getCatalog().getDatabase() :
+            table.getSchema().getDatabase();
+
+        RDBCorePlugin plugin = RDBCorePlugin.getDefault();
+
+        DatabaseDefinition dbDefinition =
+            plugin.getDatabaseDefinitionRegistry().getDefinition(db);
+
+        if (dbDefinition.supportsSchema()) {
+            return "\"" + table.getSchema().getName() + "\".\"" +
table.getName() + "\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+        } else {
+            return "\"" + table.getName() + "\""; //$NON-NLS-1$
//$NON-NLS-2$ //$NON-NLS-3$
+        }
     }

 }
Index:
src/org/eclipse/datatools/sqltools/data/internal/core/editor/TableDataImpl.java

===================================================================
RCS file:
/cvsroot/datatools/org.eclipse.datatools.sqltools/plugins/org.eclipse.datatools.sqltools.data.core/src/org/eclipse/datatools/sqltools/data/internal/core/editor/TableDataImpl.java,v

retrieving revision 1.2
diff -u -r1.2 TableDataImpl.java
---
src/org/eclipse/datatools/sqltools/data/internal/core/editor/TableDataImpl.java
             18 Dec 2006 19:07:27 -0000          1.2
+++
src/org/eclipse/datatools/sqltools/data/internal/core/editor/TableDataImpl.java
             23 Apr 2007 21:13:20 -0000
@@ -369,10 +369,20 @@
     {
         //return DataCorePlugin.getQualifiedTableName(sqlTable);
             StringBuffer sb = new StringBuffer(50);
-            sb.append(DataCorePlugin.quoteIdentifier(con,
sqlTable.getSchema().getName()))
-              .append(".")
-              .append(DataCorePlugin.quoteIdentifier(con,
sqlTable.getName()));
-            return sb.toString();
+        org.eclipse.datatools.modelbase.sql.schema.Database db =
+            sqlTable.getSchema().getCatalog() != null ?
+
sqlTable.getSchema().getCatalog().getDatabase():
+                                    sqlTable.getSchema().getDatabase();
+
+        RDBCorePlugin plugin = RDBCorePlugin.getDefault();
+
+        DatabaseDefinition dbDefinition =
plugin.getDatabaseDefinitionRegistry().getDefinition(db);
+
+        if (dbDefinition.supportsSchema())
+
sb.append(DataCorePlugin.quoteIdentifier(con,sqlTable.getSchema().getName())).append(".");

+
+        sb.append(DataCorePlugin.quoteIdentifier(con,
sqlTable.getName()));
+        return sb.toString();
     }

     /**
Index:
src/org/eclipse/datatools/sqltools/data/internal/core/DataCorePlugin.java
===================================================================
RCS file:
/cvsroot/datatools/org.eclipse.datatools.sqltools/plugins/org.eclipse.datatools.sqltools.data.core/src/org/eclipse/datatools/sqltools/data/internal/core/DataCorePlugin.java,v

retrieving revision 1.3
diff -u -r1.3 DataCorePlugin.java
---
src/org/eclipse/datatools/sqltools/data/internal/core/DataCorePlugin.java
       3 Apr 2007 02:06:58 -0000           1.3
+++
src/org/eclipse/datatools/sqltools/data/internal/core/DataCorePlugin.java
       23 Apr 2007 21:13:19 -0000
@@ -135,8 +135,17 @@
             Database db = table.getSchema().getCatalog() != null ?

table.getSchema().getCatalog().getDatabase():
                                     table.getSchema().getDatabase();
-        return quoteIdentifier(db, table.getSchema().getName())
-            + "." + quoteIdentifier(db, table.getName()); //$NON-NLS-1$
+
+        RDBCorePlugin plugin = RDBCorePlugin.getDefault();
+        DatabaseDefinition dbDefinition =
+            plugin.getDatabaseDefinitionRegistry().getDefinition(db);
+
+        if (dbDefinition.supportsSchema()) {
+            return quoteIdentifier(db, table.getSchema().getName())
+                    + "." + quoteIdentifier(db, table.getName());
//$NON-NLS-1$
+        } else {
+            return quoteIdentifier(db, table.getName()); //$NON-NLS-1$
+        }
     }

     public static String getQualifiedUDTName(UserDefinedType udt)
@@ -144,8 +153,17 @@
             Database db = udt.getSchema().getCatalog() != null ?

udt.getSchema().getCatalog().getDatabase():
                                     udt.getSchema().getDatabase();
-            return quoteIdentifier(db, udt.getSchema().getName())
-        + "." + quoteIdentifier(db, udt.getName()); //$NON-NLS-1$
+
+        RDBCorePlugin plugin = RDBCorePlugin.getDefault();
+        DatabaseDefinition dbDefinition =
+            plugin.getDatabaseDefinitionRegistry().getDefinition(db);
+
+        if (dbDefinition.supportsSchema()) {
+            return quoteIdentifier(db, udt.getSchema().getName())
+            + "." + quoteIdentifier(db, udt.getName()); //$NON-NLS-1$
+          } else {
+            return quoteIdentifier(db, udt.getName()); //$NON-NLS-1$
+          }
     }

     public static String quoteIdentifier(Database db, String s)
### Eclipse Workspace Patch 1.0
#P org.eclipse.datatools.sqltools.tabledataeditor
Index:
src/org/eclipse/datatools/sqltools/tabledataeditor/actions/SampleContentAction.java

===================================================================
RCS file:
/cvsroot/datatools/org.eclipse.datatools.sqltools/plugins/org.eclipse.datatools.sqltools.tabledataeditor/src/org/eclipse/datatools/sqltools/tabledataeditor/actions/SampleContentAction.java,v

retrieving revision 1.2
diff -u -r1.2 SampleContentAction.java
---
src/org/eclipse/datatools/sqltools/tabledataeditor/actions/SampleContentAction.java
             14 Dec 2006 00:57:10 -0000          1.2
+++
src/org/eclipse/datatools/sqltools/tabledataeditor/actions/SampleContentAction.java
             23 Apr 2007 21:16:50 -0000
@@ -61,7 +61,24 @@

     private String getFullyQualifiedName(Table table)
     {
-        return this.wrapName(table.getSchema().getName()) + "." +
this.wrapName(table.getName()); //$NON-NLS-1$
+        // return this.wrapName(table.getSchema().getName()) + "." +
this.wrapName(table.getName()); //$NON-NLS-1$
+
+        Database db = table.getSchema().getCatalog() != null ?
+            table.getSchema().getCatalog().getDatabase() :
+            table.getSchema().getDatabase();
+
+        RDBCorePlugin plugin = RDBCorePlugin.getDefault();
+
+        DatabaseDefinition dbDefinition =
+            plugin.getDatabaseDefinitionRegistry().getDefinition(db);
+
+       if (dbDefinition.supportsSchema()) {
+            return this.wrapName(table.getSchema().getName())
+                    + "." + this.wrapName(table.getName()); //$NON-NLS-1$
+        } else {
+            return this.wrapName(table.getName()); //$NON-NLS-1$
+        }
+
     }

     private Database getDatabase (Schema schema)
_______________________________________________
dtp-dev mailing list
dtp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dtp-dev




Back to the top