Update of /cvsroot/squirrel-sql/sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/tabs/table
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5920
Modified Files:
ContentsTab.java
Log Message:
limit cols in edit functional
Index: ContentsTab.java
===================================================================
RCS file: /cvsroot/squirrel-sql/sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/tabs/table/ContentsTab.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** ContentsTab.java 20 Apr 2004 19:47:38 -0000 1.24
--- ContentsTab.java 23 Apr 2004 18:31:00 -0000 1.25
***************
*** 124,127 ****
--- 124,139 ----
/**
+ * return the name of the table that is unambiguous across DB accesses,
+ * including the same DB on different machines.
+ * This function is static because it is used elsewhere to generate the same
+ * name as is used within instances of this class.
+ *
+ * @return the name of the table that is unique for this DB access
+ */
+ public static String getUnambiguousTableName(ISession session, String name) {
+ return session.getAlias().getUrl()+":"+name;
+ }
+
+ /**
* Get the full name of this table, creating that name the first time we are called
*/
***************
*** 130,133 ****
--- 142,149 ----
try {
final ISession session = getSession();
+ final String name = getTableInfo().getQualifiedName();
+ fullTableName = getUnambiguousTableName(session, name);
+ /***
+ final ISession session = getSession();
final ITableInfo ti = getTableInfo();
***************
*** 135,138 ****
--- 151,155 ----
ti.getCatalogName()+":"+ti.getSchemaName()+
":"+ti.getSimpleName();
+ ****/
}
catch (Exception e) {
***************
*** 142,145 ****
--- 159,163 ----
return fullTableName;
}
+
/**
***************
*** 644,648 ****
// For tables that have a lot of columns, the user may have limited the set of columns
// to use in the where clause, so see if there is a table of col names
! HashMap colNames = (EditWhereCols.getInstance()).get(getFullTableName());
for (int i=0; i< colDefs.length; i++) {
--- 662,666 ----
// For tables that have a lot of columns, the user may have limited the set of columns
// to use in the where clause, so see if there is a table of col names
! HashMap colNames = (EditWhereCols.get(getFullTableName()));
for (int i=0; i< colDefs.length; i++) {
|