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.MySqlAlterTableOption;
17 
18 import hunt.sql.ast.SQLObject;
19 import hunt.sql.ast.expr.SQLIdentifierExpr;
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 MySqlAlterTableOption : MySqlObjectImpl , SQLAlterTableItem {
25 
26     alias accept0 = MySqlObjectImpl.accept0; 
27     
28     private string name;
29     private SQLObject value;
30 
31     public this(string name, string value){
32         this(name, new SQLIdentifierExpr(value));
33     }
34 
35     public this(string name, SQLObject value){
36         this.name = name;
37         this.setValue(value);
38     }
39 
40     public this(){
41     }
42 
43     override
44     public void accept0(MySqlASTVisitor visitor) {
45         visitor.visit(this);
46         visitor.endVisit(this);
47     }
48 
49     public string getName() {
50         return name;
51     }
52 
53     public void setName(string name) {
54         this.name = name;
55     }
56 
57     public SQLObject getValue() {
58         return value;
59     }
60 
61     public void setValue(SQLObject value) {
62         this.value = value;
63     }
64 
65 }