Search in sources :

Example 6 with LiteralString

use of com.alibaba.cobar.parser.ast.expression.primary.literal.LiteralString in project cobar by alibaba.

the class MySQLOutputASTVisitor method visit.

@Override
public void visit(LiteralString node) {
    String introducer = node.getIntroducer();
    if (introducer != null) {
        appendable.append(introducer);
    } else if (node.isNchars()) {
        appendable.append('N');
    }
    appendable.append('\'').append(node.getString()).append('\'');
}
Also used : LiteralString(com.alibaba.cobar.parser.ast.expression.primary.literal.LiteralString)

Aggregations

LiteralString (com.alibaba.cobar.parser.ast.expression.primary.literal.LiteralString)6 Expression (com.alibaba.cobar.parser.ast.expression.Expression)5 ArithmeticAddExpression (com.alibaba.cobar.parser.ast.expression.arithmeic.ArithmeticAddExpression)3 ArithmeticDivideExpression (com.alibaba.cobar.parser.ast.expression.arithmeic.ArithmeticDivideExpression)3 ArithmeticIntegerDivideExpression (com.alibaba.cobar.parser.ast.expression.arithmeic.ArithmeticIntegerDivideExpression)3 ArithmeticModExpression (com.alibaba.cobar.parser.ast.expression.arithmeic.ArithmeticModExpression)3 ArithmeticMultiplyExpression (com.alibaba.cobar.parser.ast.expression.arithmeic.ArithmeticMultiplyExpression)3 ArithmeticSubtractExpression (com.alibaba.cobar.parser.ast.expression.arithmeic.ArithmeticSubtractExpression)3 MinusExpression (com.alibaba.cobar.parser.ast.expression.arithmeic.MinusExpression)3 BitAndExpression (com.alibaba.cobar.parser.ast.expression.bit.BitAndExpression)3 BitInvertExpression (com.alibaba.cobar.parser.ast.expression.bit.BitInvertExpression)3 BitOrExpression (com.alibaba.cobar.parser.ast.expression.bit.BitOrExpression)3 BitShiftExpression (com.alibaba.cobar.parser.ast.expression.bit.BitShiftExpression)3 BitXORExpression (com.alibaba.cobar.parser.ast.expression.bit.BitXORExpression)3 BetweenAndExpression (com.alibaba.cobar.parser.ast.expression.comparison.BetweenAndExpression)3 ComparisionEqualsExpression (com.alibaba.cobar.parser.ast.expression.comparison.ComparisionEqualsExpression)3 ComparisionGreaterThanExpression (com.alibaba.cobar.parser.ast.expression.comparison.ComparisionGreaterThanExpression)3 ComparisionGreaterThanOrEqualsExpression (com.alibaba.cobar.parser.ast.expression.comparison.ComparisionGreaterThanOrEqualsExpression)3 ComparisionIsExpression (com.alibaba.cobar.parser.ast.expression.comparison.ComparisionIsExpression)3 ComparisionLessOrGreaterThanExpression (com.alibaba.cobar.parser.ast.expression.comparison.ComparisionLessOrGreaterThanExpression)3