public void delete() throws SqlJetException { if (!eof) { cursor.delete(); eof = cursor.eof(); } }
@Override public void execute(SqlJetDb db) throws SqlJetException { ISqlJetTable table = db.getTable(STATE_TABLE); ISqlJetCursor cursor = table.lookup(table.getPrimaryKeyIndexName(), event.getSource()); try { if (!cursor.eof()) { cursor.delete(); } } finally { close(cursor); } } };
@Override public void delete(String fullname) { try { db.beginTransaction(SqlJetTransactionMode.WRITE); try { ISqlJetTable table = db.getTable(StateTable.TABLE_NAME); ISqlJetCursor cursor = table.lookup(StateTable.NDX_FULL_NAME, fullname); while (!cursor.eof()) { cursor.delete(); } cursor.close(); } finally { db.commit(); } } catch (Throwable e) { logger.error("unable to delete: " + fullname, e); } }
public long exec() throws SVNException { long n = 0; statementStarted(); while (!eof()) { try { beforeDelete(getCursor()); getCursor().delete(); } catch (SqlJetException e) { statementCompleted(e); SVNSqlJetDb.createSqlJetError(e); return n; } n++; } statementCompleted(null); return n; }