/** * Create a bioseg index on the location table. * * @throws SQLException if there is a problem dropping the tabe or creating the view */ public void createIndex() throws SQLException { Database db = this.osw.getDatabase(); Connection con = db.getConnection(); con.setAutoCommit(false); String indexSql = "CREATE INDEX location_object_bioseg ON location " + "USING gist (locatedonid, bioseg_create(intermine_start, intermine_end))"; Statement statement = con.createStatement(); statement.executeUpdate(indexSql); statement.close(); con.commit(); con.close(); }
@Override public void setUp() throws Exception { db = DatabaseFactory.getDatabase("db.unittest"); con = db.getConnection(); con.setAutoCommit(true); }