commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From di...@apache.org
Subject cvs commit: jakarta-commons/dbcp/src/test/org/apache/commons/dbcp TesterPreparedStatement.java
Date Sun, 07 Mar 2004 15:28:36 GMT
dirkv       2004/03/07 07:28:36

  Modified:    dbcp/src/test/org/apache/commons/dbcp
                        TesterPreparedStatement.java
  Log:
  sql of preparedstatement is dependent on the catalog setting of the connection
  
  Revision  Changes    Path
  1.12      +16 -1     jakarta-commons/dbcp/src/test/org/apache/commons/dbcp/TesterPreparedStatement.java
  
  Index: TesterPreparedStatement.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/dbcp/src/test/org/apache/commons/dbcp/TesterPreparedStatement.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- TesterPreparedStatement.java	28 Feb 2004 11:47:52 -0000	1.11
  +++ TesterPreparedStatement.java	7 Mar 2004 15:28:36 -0000	1.12
  @@ -38,19 +38,34 @@
   public class TesterPreparedStatement extends TesterStatement implements PreparedStatement
{
       private ResultSetMetaData _resultSetMetaData = null;
       private String _sql = null;
  +    private String _catalog = null;
   
       public TesterPreparedStatement(Connection conn) {
           super(conn);
  +        try {
  +            _catalog = conn.getCatalog();
  +        } catch (SQLException e) { }
       }
   
       public TesterPreparedStatement(Connection conn, String sql) {
           super(conn);
           _sql = sql;
  +        try {
  +            _catalog = conn.getCatalog();
  +        } catch (SQLException e) { }
       }
   
       public TesterPreparedStatement(Connection conn, String sql, int resultSetType, int
resultSetConcurrency) {
           super(conn, resultSetType, resultSetConcurrency);
           _sql = sql;
  +        try {
  +            _catalog = conn.getCatalog();
  +        } catch (SQLException e) { }
  +    }
  +    
  +    /** for junit test only */
  +    public String getCatalog() {
  +        return _catalog;
       }
   
       public ResultSet executeQuery(String sql) throws SQLException {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message