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.MySqlCreateAddLogFileGroupStatement;
17 
18 import hunt.sql.ast.SQLExpr;
19 import hunt.sql.ast.SQLName;
20 import hunt.sql.ast.statement.SQLAlterStatement;
21 import hunt.sql.dialect.mysql.visitor.MySqlASTVisitor;
22 import hunt.sql.dialect.mysql.ast.statement.MySqlStatementImpl;
23 
24 public class MySqlCreateAddLogFileGroupStatement : MySqlStatementImpl , SQLAlterStatement {
25 
26     alias accept0 = MySqlStatementImpl.accept0;
27     
28     private SQLName name;
29     private SQLExpr addUndoFile;
30     private SQLExpr initialSize;
31     private SQLExpr undoBufferSize;
32     private SQLExpr redoBufferSize;
33     private SQLExpr nodeGroup;
34     private bool wait;
35     private SQLExpr comment;
36     private SQLExpr engine;
37 
38     public SQLName getName() {
39         return name;
40     }
41 
42     public void setName(SQLName name) {
43         if (name !is null) {
44             name.setParent(this);
45         }
46         this.name = name;
47     }
48 
49     public SQLExpr getAddUndoFile() {
50         return addUndoFile;
51     }
52 
53     public void setAddUndoFile(SQLExpr x) {
54         if (x !is null) {
55             x.setParent(this);
56         }
57         this.addUndoFile = x;
58     }
59 
60     public SQLExpr getInitialSize() {
61         return initialSize;
62     }
63 
64     public void setInitialSize(SQLExpr x) {
65         if (x !is null) {
66             x.setParent(this);
67         }
68         this.initialSize = x;
69     }
70 
71     public SQLExpr getUndoBufferSize() {
72         return undoBufferSize;
73     }
74 
75     public void setUndoBufferSize(SQLExpr x) {
76         if (x !is null) {
77             x.setParent(this);
78         }
79         this.undoBufferSize = x;
80     }
81 
82     public SQLExpr getRedoBufferSize() {
83         return redoBufferSize;
84     }
85 
86     public void setRedoBufferSize(SQLExpr x) {
87         if (x !is null) {
88             x.setParent(this);
89         }
90         this.redoBufferSize = x;
91     }
92 
93     public bool isWait() {
94         return wait;
95     }
96 
97     public void setWait(bool wait) {
98         this.wait = wait;
99     }
100 
101     public SQLExpr getEngine() {
102         return engine;
103     }
104 
105     public void setEngine(SQLExpr engine) {
106         if (engine !is null) {
107             engine.setParent(this);
108         }
109         this.engine = engine;
110     }
111 
112     public SQLExpr getNodeGroup() {
113         return nodeGroup;
114     }
115 
116     public void setNodeGroup(SQLExpr x) {
117         if (x !is null) {
118             x.setParent(this);
119         }
120         this.nodeGroup = x;
121     }
122 
123     public SQLExpr getComment() {
124         return comment;
125     }
126 
127     public void setComment(SQLExpr x) {
128         if (x !is null) {
129             x.setParent(this);
130         }
131         this.comment = x;
132     }
133 
134     override public void accept0(MySqlASTVisitor visitor) {
135         if (visitor.visit(this)) {
136             acceptChild(visitor, name);
137             acceptChild(visitor, addUndoFile);
138             acceptChild(visitor, initialSize);
139             acceptChild(visitor, undoBufferSize);
140             acceptChild(visitor, redoBufferSize);
141             acceptChild(visitor, nodeGroup);
142             acceptChild(visitor, comment);
143             acceptChild(visitor, engine);
144         }
145         visitor.endVisit(this);
146     }
147 }