Ignore:
Timestamp:
2013-07-11T15:36:55+12:00 (11 years ago)
Author:
sjm84
Message:

Added a function to empty the user database (useful for testing)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/DerbyWrapper.java

    r27617 r27807  
    134134            System.err.println("Warning: Derby did not shut down normally");
    135135        }
    136 
     136    }
     137
     138    public void clearUserData()
     139    {
     140        try
     141        {
     142            conn.setAutoCommit(false);
     143            state.execute("drop table data");
     144            state.execute("create table data (username varchar(40) not null, name varchar(128) not null, value clob, primary key (username, name))");
     145            conn.commit();
     146        }
     147        catch (SQLException e)
     148        {
     149            e.printStackTrace();
     150        }
    137151    }
    138152
Note: See TracChangeset for help on using the changeset viewer.