Search in sources :

Example 11 with SQLParameter

use of com.alibaba.druid.sql.ast.SQLParameter in project druid by alibaba.

the class SQLBlockStatement method clone.

public SQLBlockStatement clone() {
    SQLBlockStatement x = new SQLBlockStatement();
    x.labelName = labelName;
    x.endLabel = endLabel;
    for (SQLParameter p : parameters) {
        SQLParameter p2 = p.clone();
        p2.setParent(x);
        x.parameters.add(p2);
    }
    for (SQLStatement stmt : statementList) {
        SQLStatement stmt2 = stmt.clone();
        stmt2.setParent(x);
        x.statementList.add(stmt2);
    }
    if (exception != null) {
        x.setException(exception.clone());
    }
    return x;
}
Also used : SQLParameter(com.alibaba.druid.sql.ast.SQLParameter) SQLStatement(com.alibaba.druid.sql.ast.SQLStatement)

Aggregations

SQLParameter (com.alibaba.druid.sql.ast.SQLParameter)11 SQLDataTypeImpl (com.alibaba.druid.sql.ast.SQLDataTypeImpl)2 SQLQueryExpr (com.alibaba.druid.sql.ast.expr.SQLQueryExpr)2 SQLCommentHint (com.alibaba.druid.sql.ast.SQLCommentHint)1 SQLExpr (com.alibaba.druid.sql.ast.SQLExpr)1 SQLHint (com.alibaba.druid.sql.ast.SQLHint)1 SQLStatement (com.alibaba.druid.sql.ast.SQLStatement)1 MergeInsertClause (com.alibaba.druid.sql.ast.statement.SQLMergeStatement.MergeInsertClause)1 MergeUpdateClause (com.alibaba.druid.sql.ast.statement.SQLMergeStatement.MergeUpdateClause)1 MySqlForceIndexHint (com.alibaba.druid.sql.dialect.mysql.ast.MySqlForceIndexHint)1 MySqlIgnoreIndexHint (com.alibaba.druid.sql.dialect.mysql.ast.MySqlIgnoreIndexHint)1 MySqlUseIndexHint (com.alibaba.druid.sql.dialect.mysql.ast.MySqlUseIndexHint)1 OracleDataTypeIntervalDay (com.alibaba.druid.sql.dialect.oracle.ast.OracleDataTypeIntervalDay)1 OracleDataTypeIntervalYear (com.alibaba.druid.sql.dialect.oracle.ast.OracleDataTypeIntervalYear)1 ModelClause (com.alibaba.druid.sql.dialect.oracle.ast.clause.ModelClause)1 ConditionalInsertClause (com.alibaba.druid.sql.dialect.oracle.ast.stmt.OracleMultiInsertStatement.ConditionalInsertClause)1 ConditionalInsertClauseItem (com.alibaba.druid.sql.dialect.oracle.ast.stmt.OracleMultiInsertStatement.ConditionalInsertClauseItem)1 InsertIntoClause (com.alibaba.druid.sql.dialect.oracle.ast.stmt.OracleMultiInsertStatement.InsertIntoClause)1 CheckOption (com.alibaba.druid.sql.dialect.oracle.ast.stmt.OracleSelectRestriction.CheckOption)1 ReadOnly (com.alibaba.druid.sql.dialect.oracle.ast.stmt.OracleSelectRestriction.ReadOnly)1