use of com.developmentontheedge.sql.model.AstConcatExpression in project be5 by DevelopmentOnTheEdge.
the class DB2Transformer method transformString.
@Override
protected void transformString(AstStringConstant string) {
for (AstStringPart child : string.children().select(AstStringPart.class)) {
String content = child.getContent().replace("\\'", "''");
child.setContent(string.isEscape() ? content.replaceAll("\\\\([^bfnrt])", "$1") : content, true);
}
if (string.isEscape()) {
string.setEscape(false);
AstConcatExpression concat = new AstConcatExpression(SqlParserTreeConstants.JJTCONCATEXPRESSION);
if (replacedEscapes(string, concat))
string.replaceWith(concat);
}
}
use of com.developmentontheedge.sql.model.AstConcatExpression in project be5 by DevelopmentOnTheEdge.
the class OracleTransformer method transformString.
@Override
protected void transformString(AstStringConstant string) {
for (AstStringPart child : string.children().select(AstStringPart.class)) {
String content = child.getContent().replace("\\'", "''");
child.setContent(string.isEscape() ? content.replaceAll("\\\\([^bfnrt])", "$1") : content, true);
}
if (string.isEscape()) {
string.setEscape(false);
AstConcatExpression concat = new AstConcatExpression(SqlParserTreeConstants.JJTCONCATEXPRESSION);
if (replacedEscapes(string, concat))
string.replaceWith(concat);
}
}
Aggregations