@Override public void printCollection(Vector items, ExpressionSQLPrinter printer) { if (items.size() == 1 && items.get(0) instanceof QueryKeyExpression && "deleteTs".equals(((QueryKeyExpression) items.get(0)).getName())) { if (!CubaUtil.isSoftDeletion()) { try { printer.getWriter().write("(0=0)"); return; } catch (IOException e) { throw new RuntimeException(e); } } } super.printCollection(items, printer); } }
/** * INTERNAL: * Print SQL */ public void printSQL(ExpressionSQLPrinter printer) { ListExpressionOperator platformOperator = (ListExpressionOperator)getPlatformOperator(printer.getPlatform()); platformOperator.copyTo(operator); operator.printCollection(getChildren(), printer); }
/** * INTERNAL: * Print SQL using the operator. */ public void printSQL(ExpressionSQLPrinter printer) { // If all children are parameters, some databases don't allow binding. if (printer.getPlatform().isDynamicSQLRequiredForFunctions() && !this.children.isEmpty()) { boolean allParams = true; for (Iterator iterator = this.children.iterator(); iterator.hasNext(); ) { Expression child = (Expression)iterator.next(); if (!(child.isParameterExpression() || child.isConstantExpression())) { allParams = false; } } if (allParams) { printer.getCall().setUsesBinding(false); } } ExpressionOperator realOperator; realOperator = getPlatformOperator(printer.getPlatform()); realOperator.printCollection(this.children, printer); }
/** * INTERNAL: * Print SQL using the operator. */ public void printSQL(ExpressionSQLPrinter printer) { // If all children are parameters, some databases don't allow binding. if (printer.getPlatform().isDynamicSQLRequiredForFunctions() && !this.children.isEmpty()) { boolean allParams = true; for (Iterator iterator = this.children.iterator(); iterator.hasNext(); ) { Expression child = (Expression)iterator.next(); if (!(child.isParameterExpression() || child.isConstantExpression())) { allParams = false; } } if (allParams) { printer.getCall().setUsesBinding(false); } } ExpressionOperator realOperator; realOperator = getPlatformOperator(printer.getPlatform()); realOperator.printCollection(this.children, printer); }
/** * INTERNAL: * Print SQL using the operator. */ @Override public void printSQL(ExpressionSQLPrinter printer) { // If all children are parameters, some databases don't allow binding. if (printer.getPlatform().isDynamicSQLRequiredForFunctions() && !this.children.isEmpty()) { boolean allParams = true; for (Iterator<Expression> iterator = this.children.iterator(); iterator.hasNext(); ) { Expression child = iterator.next(); if (!(child.isParameterExpression() || child.isConstantExpression())) { allParams = false; } } if (allParams) { printer.getCall().setUsesBinding(false); } } ExpressionOperator realOperator; realOperator = getPlatformOperator(printer.getPlatform()); realOperator.printCollection(this.children, printer); }
/** * INTERNAL: * Print SQL */ public void printSQL(ExpressionSQLPrinter printer) { ListExpressionOperator platformOperator = (ListExpressionOperator)getPlatformOperator(printer.getPlatform()); platformOperator.copyTo(operator); ((ListExpressionOperator)operator).setIsComplete(true); operator.printCollection(getChildren(), printer); }
/** * INTERNAL: * Print SQL */ public void printSQL(ExpressionSQLPrinter printer) { ListExpressionOperator platformOperator = (ListExpressionOperator)getPlatformOperator(printer.getPlatform()); platformOperator.copyTo(operator); ((ListExpressionOperator)operator).setIsComplete(true); operator.printCollection(getChildren(), printer); }