Search in sources :

Example 1 with FastsqlException

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

the class SQLJoinTableSource method output.

public void output(Appendable buf) {
    try {
        this.left.output(buf);
        buf.append(' ');
        buf.append(JoinType.toString(this.joinType));
        buf.append(' ');
        this.right.output(buf);
        if (this.condition != null) {
            buf.append(" ON ");
            this.condition.output(buf);
        }
    } catch (IOException ex) {
        throw new FastsqlException("output error", ex);
    }
}
Also used : FastsqlException(com.alibaba.druid.FastsqlException) IOException(java.io.IOException)

Example 2 with FastsqlException

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

the class SQLUnionQueryTableSource method output.

public void output(Appendable buf) {
    try {
        buf.append("(");
        this.union.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 3 with FastsqlException

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

the class CalciteMySqlNodeVisitor method toSqlTypeName.

private SqlTypeName toSqlTypeName(SQLDataType dataType) {
    long nameHashCode64 = dataType.nameHashCode64();
    SqlTypeName sqlTypeName = nameHashCode64SqlTypeNameMapping.get(nameHashCode64);
    if (sqlTypeName != null) {
        return sqlTypeName;
    }
    throw new FastsqlException("TODO");
}
Also used : SqlTypeName(org.apache.calcite.sql.type.SqlTypeName) FastsqlException(com.alibaba.druid.FastsqlException)

Example 4 with FastsqlException

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

the class SQLServerObjectReferenceExpr method output.

public void output(Appendable buf) {
    try {
        boolean flag = false;
        if (server != null) {
            buf.append(server);
            flag = true;
        }
        if (flag) {
            buf.append('.');
        }
        if (database != null) {
            buf.append(database);
            flag = true;
        }
        if (flag) {
            buf.append('.');
        }
        if (schema != null) {
            buf.append(schema);
            flag = true;
        }
    } catch (IOException ex) {
        throw new FastsqlException("output error", ex);
    }
}
Also used : FastsqlException(com.alibaba.druid.FastsqlException) IOException(java.io.IOException)

Example 5 with FastsqlException

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

the class SQLBinaryExpr method output.

public void output(Appendable buf) {
    try {
        buf.append("b'");
        buf.append(text);
        buf.append('\'');
    } 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