use of com.djrapitops.plan.storage.database.transactions.ExecStatement in project Plan by plan-player-analytics.
the class StoreServerTableResultTransaction method deleteOldRows.
private void deleteOldRows(Integer tableID, int afterRow) {
String sql = DELETE_FROM + TABLE_NAME + WHERE + TABLE_ID + "=?" + AND + SERVER_UUID + "=?" + AND + TABLE_ROW + // Since row count is zero indexed and afterRow is size the value should be removed.
">=?";
execute(new ExecStatement(sql) {
@Override
public void prepare(PreparedStatement statement) throws SQLException {
statement.setInt(1, tableID);
statement.setString(2, serverUUID.toString());
statement.setInt(3, afterRow);
}
});
}
Aggregations