if (stateObject.isDecorated()) {
toText(stateObject);
}
else {
CoalesceExpression expression = stateObject.getExpression();
// 'COALESCE'
appendIdentifier((expression != null) ? expression.getActualIdentifier() : COALESCE, COALESCE);
// '('
if (shouldOutput(expression) || expression.hasLeftParenthesis()) {
writer.append(LEFT_PARENTHESIS);
}
else if (expression.hasSpaceAfterIdentifier()) {
writer.append(SPACE);
}
toStringChildren(stateObject, true);
// ')'
if (shouldOutput(expression) || expression.hasRightParenthesis()) {
writer.append(RIGHT_PARENTHESIS);
}
}
}