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.MySqlCreateTableSpaceStatement;
17 
18 import hunt.sql.ast.SQLExpr;
19 import hunt.sql.ast.SQLName;
20 import hunt.sql.ast.statement.SQLCreateStatement;
21 import hunt.sql.dialect.mysql.visitor.MySqlASTVisitor;
22 import hunt.sql.dialect.mysql.ast.statement.MySqlStatementImpl;
23 
24 public class MySqlCreateTableSpaceStatement : MySqlStatementImpl , SQLCreateStatement {
25 
26     alias accept0 = MySqlStatementImpl.accept0;
27     
28     private SQLName name;
29     private SQLExpr addDataFile;
30     private SQLExpr initialSize;
31     private SQLExpr extentSize;
32     private SQLExpr autoExtentSize;
33     private SQLExpr fileBlockSize;
34     private SQLExpr logFileGroup;
35     private SQLExpr maxSize;
36     private SQLExpr nodeGroup;
37     private bool wait;
38     private SQLExpr comment;
39     private SQLExpr engine;
40 
41     override public void accept0(MySqlASTVisitor visitor) {
42         if (visitor.visit(this)) {
43             acceptChild(visitor, name);
44             acceptChild(visitor, addDataFile);
45             acceptChild(visitor, initialSize);
46             acceptChild(visitor, extentSize);
47             acceptChild(visitor, autoExtentSize);
48             acceptChild(visitor, fileBlockSize);
49             acceptChild(visitor, logFileGroup);
50             acceptChild(visitor, maxSize);
51             acceptChild(visitor, nodeGroup);
52             acceptChild(visitor, comment);
53             acceptChild(visitor, engine);
54         }
55         visitor.endVisit(this);
56     }
57 
58     public SQLName getName() {
59         return name;
60     }
61 
62     public void setName(SQLName x) {
63         if (x !is null) {
64             x.setParent(this);
65         }
66         this.name = x;
67     }
68 
69     public SQLExpr getAddDataFile() {
70         return addDataFile;
71     }
72 
73     public void setAddDataFile(SQLExpr x) {
74         if (x !is null) {
75             x.setParent(this);
76         }
77         this.addDataFile = addDataFile;
78     }
79 
80     public SQLExpr getInitialSize() {
81         return initialSize;
82     }
83 
84     public void setInitialSize(SQLExpr x) {
85         if (x !is null) {
86             x.setParent(this);
87         }
88         this.initialSize = x;
89     }
90 
91     public SQLExpr getFileBlockSize() {
92         return fileBlockSize;
93     }
94 
95     public void setFileBlockSize(SQLExpr x) {
96         if (x !is null) {
97             x.setParent(this);
98         }
99         this.fileBlockSize = x;
100     }
101 
102     public bool isWait() {
103         return wait;
104     }
105 
106     public void setWait(bool wait) {
107         this.wait = wait;
108     }
109 
110     public SQLExpr getEngine() {
111         return engine;
112     }
113 
114     public void setEngine(SQLExpr x) {
115         if (x !is null) {
116             x.setParent(this);
117         }
118         this.engine = engine;
119     }
120 
121     public SQLExpr getLogFileGroup() {
122         return logFileGroup;
123     }
124 
125     public void setLogFileGroup(SQLExpr x) {
126         if (x !is null) {
127             x.setParent(this);
128         }
129         this.logFileGroup = x;
130     }
131 
132     public SQLExpr getExtentSize() {
133         return extentSize;
134     }
135 
136     public void setExtentSize(SQLExpr x) {
137         if (x !is null) {
138             x.setParent(this);
139         }
140         this.extentSize = x;
141     }
142 
143     public SQLExpr getAutoExtentSize() {
144         return autoExtentSize;
145     }
146 
147     public void setAutoExtentSize(SQLExpr x) {
148         if (x !is null) {
149             x.setParent(this);
150         }
151         this.autoExtentSize = x;
152     }
153 
154     public SQLExpr getMaxSize() {
155         return maxSize;
156     }
157 
158     public void setMaxSize(SQLExpr x) {
159         if (x !is null) {
160             x.setParent(this);
161         }
162         this.maxSize = x;
163     }
164 
165     public SQLExpr getNodeGroup() {
166         return nodeGroup;
167     }
168 
169     public void setNodeGroup(SQLExpr x) {
170         if (x !is null) {
171             x.setParent(this);
172         }
173         this.nodeGroup = x;
174     }
175 
176     public SQLExpr getComment() {
177         return comment;
178     }
179 
180     public void setComment(SQLExpr x) {
181         if (x !is null) {
182             x.setParent(this);
183         }
184         this.comment = x;
185     }
186 }