}
@SuppressWarnings("unchecked")
private int handleUpdate() throws JSQLParserException, SQLException {
int returnval = 0;
Update update = (Update) this.parserManager.parse(new StringReader(this.sql));
String domain = update.getTable().getName();
String qury = "SELECT * FROM " + SimpleDBUtils.quoteName(domain) +
" WHERE " + update.getWhere().toString();
int sizeSets = update.getColumns().size(); // this is the size of sets
int argsSize = this.args.size();
for (int x = sizeSets; x < argsSize; x++) {
qury = qury.replaceFirst("\\?", SimpleDBUtils.quoteValue(this.args.get(x)));
}
SelectRequest selectRequest = new SelectRequest(qury);
List<Item> items = this.connection.getSimpleDB().select(selectRequest).getItems();
List<ReplaceableItem> data = new ArrayList<ReplaceableItem>();
for (Item item : items) {
List<Column> columns = (List<Column>) update.getColumns();
List<ReplaceableAttribute> attributes = new ArrayList<ReplaceableAttribute>();
int count = 0;
for (int x = 0; x < sizeSets; x++) {
String attributeName = columns.get(x).getColumnName();