public String toString() { return getWholeColumnName(); } }
public void visit(Column column) { buffer.append(column.getWholeColumnName()); }
public void deParse(Replace replace) { buffer.append("REPLACE " + replace.getTable().getWholeTableName()); if (replace.getItemsList() != null) { if (replace.getColumns() != null) { buffer.append(" ("); for (int i = 0; i < replace.getColumns().size(); i++) { Column column = (Column) replace.getColumns().get(i); buffer.append(column.getWholeColumnName()); if (i < replace.getColumns().size() - 1) { buffer.append(", "); } } buffer.append(") "); } else { buffer.append(" "); } } else { buffer.append(" SET "); for (int i = 0; i < replace.getColumns().size(); i++) { Column column = (Column) replace.getColumns().get(i); buffer.append(column.getWholeColumnName() + "="); Expression expression = (Expression) replace.getExpressions().get(i); expression.accept(expressionVisitor); if (i < replace.getColumns().size() - 1) { buffer.append(", "); } } } }
public void deParse(Update update) { buffer.append("UPDATE " + update.getTable().getWholeTableName() + " SET "); for (int i = 0; i < update.getColumns().size(); i++) { Column column = (Column) update.getColumns().get(i); buffer.append(column.getWholeColumnName() + "="); Expression expression = (Expression) update.getExpressions().get(i); expression.accept(expressionVisitor); if (i < update.getColumns().size() - 1) { buffer.append(", "); } } if (update.getWhere() != null) { buffer.append(" WHERE "); update.getWhere().accept(expressionVisitor); } }
for (Iterator iterator = join.getUsingColumns().iterator(); iterator.hasNext();) { Column column = (Column) iterator.next(); buffer.append(column.getWholeColumnName()); if (iterator.hasNext()) { buffer.append(" ,");
public String toString() { return getWholeColumnName(); } }
public void visit(Column column) { buffer.append(column.getWholeColumnName()); }
public String toString() { StringBuilder sb = new StringBuilder(); sb.append(column.getWholeColumnName()); sb.append(" @@ "); sb.append(query); sb.append("::tsquery"); return sb.toString(); } }
public void visit(Column column) { buffer.append(column.getComment() != null ? column.getComment() + " " + ExpressionDeParser.LINE_SEPARATOR : "").append(column.getWholeColumnName()); }
@Override public String toString() { return (getComment() != null ? getComment() + " " : "") + getWholeColumnName(); }
public void deParse(Replace replace) { buffer.append("REPLACE " + replace.getTable().getWholeTableName()); if (replace.getItemsList() != null) { if (replace.getColumns() != null) { buffer.append(" ("); for (int i = 0; i < replace.getColumns().size(); i++) { Column column = (Column) replace.getColumns().get(i); buffer.append(column.getWholeColumnName()); if (i < replace.getColumns().size() - 1) { buffer.append(", "); } } buffer.append(") "); } else { buffer.append(" "); } } else { buffer.append(" SET "); for (int i = 0; i < replace.getColumns().size(); i++) { Column column = (Column) replace.getColumns().get(i); buffer.append(column.getWholeColumnName() + "="); Expression expression = (Expression) replace.getExpressions().get(i); expression.accept(expressionVisitor); if (i < replace.getColumns().size() - 1) { buffer.append(", "); } } } }
public void deParse(Update update) { buffer.append("UPDATE " + update.getTable().getWholeTableName() + " SET "); for (int i = 0; i < update.getColumns().size(); i++) { Column column = (Column) update.getColumns().get(i); buffer.append(column.getWholeColumnName() + "="); Expression expression = (Expression) update.getExpressions().get(i); expression.accept(expressionVisitor); if (i < update.getColumns().size() - 1) { buffer.append(", "); } } if (update.getWhere() != null) { buffer.append(" WHERE "); update.getWhere().accept(expressionVisitor); } }
public void deParse(Update aUpdate) { buffer.append(aUpdate.getComment() != null ? aUpdate.getComment() + " " + ExpressionDeParser.LINE_SEPARATOR : "").append("Update ").append(ExpressionDeParser.LINE_SEPARATOR) .append(aUpdate.getTable().getComment() != null ? aUpdate.getTable().getComment() + " " + ExpressionDeParser.LINE_SEPARATOR : "").append(aUpdate.getTable().getWholeTableName()).append(ExpressionDeParser.LINE_SEPARATOR) .append(aUpdate.getCommentSet() != null ? " " + aUpdate.getCommentSet() + ExpressionDeParser.LINE_SEPARATOR : "").append(" set "); int columnsCounter = 0; for (int i = 0, s = aUpdate.getColumns().size(); i < s; i++) { Column column = (Column) aUpdate.getColumns().get(i); buffer.append(column.getComment() != null ? column.getComment() + " " + ExpressionDeParser.LINE_SEPARATOR : "").append(column.getWholeColumnName()) .append(!aUpdate.getCommentsEqaulas().get(i).toString().isEmpty() ? " " + aUpdate.getCommentsEqaulas().get(i) + ExpressionDeParser.LINE_SEPARATOR : "").append(" = "); Expression expression = (Expression) aUpdate.getExpressions().get(i); expression.accept(expressionVisitor); if (i < aUpdate.getColumns().size() - 1) { buffer.append(!aUpdate.getCommentsComma().get(i).toString().isEmpty() ? " " + aUpdate.getCommentsComma().get(i) + " " : ""); if (columnsCounter++ == 2) { columnsCounter = 0; buffer.append(ExpressionDeParser.LINE_SEPARATOR).append(", "); } else { buffer.append(", "); } } } if (aUpdate.getWhere() != null) { buffer.append(aUpdate.getCommentWhere() != null ? " " + aUpdate.getCommentWhere() : "") .append(ExpressionDeParser.LINE_SEPARATOR).append(" Where "); aUpdate.getWhere().accept(expressionVisitor); } buffer.append(!"".equals(aUpdate.getEndComment()) ? " " + aUpdate.getEndComment() : ""); }
for (Iterator iterator = join.getUsingColumns().iterator(); iterator.hasNext();) { Column column = (Column) iterator.next(); buffer.append(column.getWholeColumnName()); if (iterator.hasNext()) { buffer.append(" ,");
for (Iterator iterator = join.getUsingColumns().iterator(); iterator.hasNext();) { Column column = (Column) iterator.next(); buffer.append(column.getWholeColumnName()); if (iterator.hasNext()) { buffer.append(" ,");
for (int i = 0; i < insert.getColumns().size(); i++) { Column column = (Column) insert.getColumns().get(i); buffer.append(column.getComment() != null ? column.getComment() + " " + ExpressionDeParser.LINE_SEPARATOR : "").append(column.getWholeColumnName()); buffer.append((i < insert.getColumns().size() - 1) ? (!"".equals(insert.getColumsComment().get(i)) ? " " + insert.getColumsComment().get(i) : "") : ""); if (i < insert.getColumns().size() - 1) {
for (int i = 0, s = aReplace.getColumns().size(); i < s; i++) { Column column = (Column) aReplace.getColumns().get(i); buffer.append(column.getComment() != null ? column.getComment() + " " + ExpressionDeParser.LINE_SEPARATOR : "").append(column.getWholeColumnName()) .append(!aReplace.getCommentEqlasColums().get(i).toString().isEmpty() ? " " + aReplace.getCommentEqlasColums().get(i) + ExpressionDeParser.LINE_SEPARATOR : "").append(" = "); Expression expression = (Expression) aReplace.getExpressions().get(i); for (int i = 0; i < aReplace.getColumns().size(); i++) { Column column = (Column) aReplace.getColumns().get(i); buffer.append(column.getComment() != null ? column.getComment() + " " + ExpressionDeParser.LINE_SEPARATOR : "").append(column.getWholeColumnName()); if (i < aReplace.getColumns().size() - 1) { buffer.append(!"".equals(aReplace.getCommentCommaColums().get(i)) ? " " + aReplace.getCommentCommaColums().get(i) + ExpressionDeParser.LINE_SEPARATOR : "")
for (int i = 0, s = join.getUsingColumns().size(); i < s; i++) { Column column = (Column) join.getUsingColumns().get(i); buffer.append(column.getComment() != null ? column.getComment() + " " + ExpressionDeParser.LINE_SEPARATOR : "").append(column.getWholeColumnName()); if (i < join.getUsingColumns().size() - 1) { buffer.append(!join.getCommentComma().get(i).toString().isEmpty() ? " " + join.getCommentComma().get(i) + " " + ExpressionDeParser.LINE_SEPARATOR : "");