1 /*
2  * Copyright 2015-2018 HuntLabs.cn
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 module hunt.sql.dialect.mysql.ast.statement.MySqlAlterTableAlterColumn;
17 
18 import hunt.sql.ast.SQLExpr;
19 import hunt.sql.ast.SQLName;
20 import hunt.sql.ast.statement.SQLAlterTableItem;
21 import hunt.sql.dialect.mysql.ast.MySqlObjectImpl;
22 import hunt.sql.dialect.mysql.visitor.MySqlASTVisitor;
23 
24 public class MySqlAlterTableAlterColumn : MySqlObjectImpl , SQLAlterTableItem {
25 
26     alias accept0 = MySqlObjectImpl.accept0;
27     
28     private SQLName column;
29 
30     private bool dropDefault = false;
31     private SQLExpr defaultExpr;
32 
33     override
34     public void accept0(MySqlASTVisitor visitor) {
35         if (visitor.visit(this)) {
36             acceptChild(visitor, column);
37             acceptChild(visitor, defaultExpr);
38         }
39         visitor.endVisit(this);
40     }
41 
42     public bool isDropDefault() {
43         return dropDefault;
44     }
45 
46     public void setDropDefault(bool dropDefault) {
47         this.dropDefault = dropDefault;
48     }
49 
50     public SQLExpr getDefaultExpr() {
51         return defaultExpr;
52     }
53 
54     public void setDefaultExpr(SQLExpr defaultExpr) {
55         this.defaultExpr = defaultExpr;
56     }
57 
58     public SQLName getColumn() {
59         return column;
60     }
61 
62     public void setColumn(SQLName column) {
63         this.column = column;
64     }
65 
66 }