#34 mdbtools-jdbc: no where clause

closed-accepted
nobody
None
5
2004-10-13
2004-10-08
No

This patch allows for a query with no where clause, and
also fixes getColumnName.

Index: ./src/mdbtools/jdbc/Engine.java

RCS file:
/cvsroot/mdbtools/mdbtools-java/src/mdbtools/jdbc/Engine.java,v
retrieving revision 1.1
diff -u -r1.1 Engine.java
--- ./src/mdbtools/jdbc/Engine.java 17 Jun 2004
00:06:34 -0000 1.1
+++ ./src/mdbtools/jdbc/Engine.java 8 Oct 2004 19:25:37
-0000
@@ -237,6 +237,9 @@
MdbTableDef table)
throws SQLException
{
+ if (where == null) {
+ return true; // no "where" clause means all rows
match
+ }
if ((where instanceof Equation) == false)
throw new SQLException("only equation is
implemented");

Index: ./src/mdbtools/jdbc/MDBResultSetMetaData.java

RCS file:
/cvsroot/mdbtools/mdbtools-java/src/mdbtools/jdbc/MDBResultSetMetaData.java,v
retrieving revision 1.1
diff -u -r1.1 MDBResultSetMetaData.java
--- ./src/mdbtools/jdbc/MDBResultSetMetaData.java 17
Jun 2004 00:06:34 -0000 1.1
+++ ./src/mdbtools/jdbc/MDBResultSetMetaData.java 8 Oct
2004 19:25:37 -0000
@@ -69,7 +69,7 @@
public String getColumnName(int column)
throws SQLException
{
- return names[column+1];
+ return names[column-1];
}

Discussion

  • James Stansell

    James Stansell - 2004-10-13

    Logged In: YES
    user_id=206825

    Applied to CVS by calvinrsmith.

     
  • James Stansell

    James Stansell - 2004-10-13
    • status: open --> closed-accepted
     

Log in to post a comment.