Search in sources :

Example 6 with FastsqlException

use of com.alibaba.druid.FastsqlException in project druid by alibaba.

the class SQLMethodInvokeExpr method output.

public void output(Appendable buf) {
    try {
        if (this.owner != null) {
            this.owner.output(buf);
            buf.append(".");
        }
        buf.append(this.methodName);
        buf.append("(");
        for (int i = 0, size = this.arguments.size(); i < size; ++i) {
            if (i != 0) {
                buf.append(", ");
            }
            this.arguments.get(i).output(buf);
        }
        buf.append(")");
    } catch (IOException ex) {
        throw new FastsqlException("output error", ex);
    }
}
Also used : FastsqlException(com.alibaba.druid.FastsqlException) IOException(java.io.IOException)

Example 7 with FastsqlException

use of com.alibaba.druid.FastsqlException in project druid by alibaba.

the class SQLNotExpr method output.

@Override
public void output(Appendable buf) {
    try {
        buf.append(" NOT ");
        this.expr.output(buf);
    } catch (IOException ex) {
        throw new FastsqlException("output error", ex);
    }
}
Also used : FastsqlException(com.alibaba.druid.FastsqlException) IOException(java.io.IOException)

Example 8 with FastsqlException

use of com.alibaba.druid.FastsqlException in project druid by alibaba.

the class SQLCurrentOfCursorExpr method output.

@Override
public void output(Appendable buf) {
    try {
        buf.append("CURRENT OF ");
        cursorName.output(buf);
    } catch (IOException ex) {
        throw new FastsqlException("output error", ex);
    }
}
Also used : FastsqlException(com.alibaba.druid.FastsqlException) IOException(java.io.IOException)

Example 9 with FastsqlException

use of com.alibaba.druid.FastsqlException in project druid by alibaba.

the class SQLHexExpr method output.

public void output(Appendable buf) {
    try {
        buf.append("0x");
        buf.append(this.hex);
        String charset = (String) getAttribute("USING");
        if (charset != null) {
            buf.append(" USING ");
            buf.append(charset);
        }
    } catch (IOException ex) {
        throw new FastsqlException("output error", ex);
    }
}
Also used : FastsqlException(com.alibaba.druid.FastsqlException) IOException(java.io.IOException)

Example 10 with FastsqlException

use of com.alibaba.druid.FastsqlException in project druid by alibaba.

the class SQLIntervalExpr method output.

@Override
public void output(Appendable buf) {
    try {
        buf.append("INTERVAL ");
        value.output(buf);
        if (unit != null) {
            buf.append(' ');
            buf.append(unit.name());
        }
    } catch (IOException ex) {
        throw new FastsqlException("output error", ex);
    }
}
Also used : FastsqlException(com.alibaba.druid.FastsqlException) IOException(java.io.IOException)

Aggregations

FastsqlException (com.alibaba.druid.FastsqlException)22 IOException (java.io.IOException)16 DateString (org.apache.calcite.util.DateString)2 TimeString (org.apache.calcite.util.TimeString)2 TimestampString (org.apache.calcite.util.TimestampString)2 SQLCommentHint (com.alibaba.druid.sql.ast.SQLCommentHint)1 SQLName (com.alibaba.druid.sql.ast.SQLName)1 SQLObject (com.alibaba.druid.sql.ast.SQLObject)1 SQLStatement (com.alibaba.druid.sql.ast.SQLStatement)1 SQLColumnDefinition (com.alibaba.druid.sql.ast.statement.SQLColumnDefinition)1 SQLShowColumnsStatement (com.alibaba.druid.sql.ast.statement.SQLShowColumnsStatement)1 SQLShowCreateTableStatement (com.alibaba.druid.sql.ast.statement.SQLShowCreateTableStatement)1 MySqlCreateTableStatement (com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlCreateTableStatement)1 MySqlRenameTableStatement (com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlRenameTableStatement)1 SQLEvalVisitor (com.alibaba.druid.sql.visitor.SQLEvalVisitor)1 SqlTypeName (org.apache.calcite.sql.type.SqlTypeName)1