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.MySqlChecksumTableStatement;
17 
18 import hunt.sql.ast.statement.SQLExprTableSource;
19 import hunt.sql.dialect.mysql.visitor.MySqlASTVisitor;
20 import hunt.sql.dialect.mysql.ast.statement.MySqlStatementImpl;
21 
22 
23 import hunt.collection;
24 import hunt.sql.ast.SQLObject;
25 
26 public class MySqlChecksumTableStatement : MySqlStatementImpl {
27 
28     alias accept0 = MySqlStatementImpl.accept0;
29     
30     private  List!(SQLExprTableSource) tables;
31 
32     private bool quick;
33     private bool extended;
34 
35     public this() {
36         tables = new ArrayList!(SQLExprTableSource)();
37     }
38 
39     public void addTable(SQLExprTableSource table) {
40         if (table is null) {
41             return;
42         }
43 
44         table.setParent(this);
45         tables.add(table);
46     }
47 
48     public List!(SQLExprTableSource) getTables() {
49         return tables;
50     }
51 
52     public bool isQuick() {
53         return quick;
54     }
55 
56     public void setQuick(bool quick) {
57         this.quick = quick;
58     }
59 
60     public bool isExtended() {
61         return extended;
62     }
63 
64     public void setExtended(bool extended) {
65         this.extended = extended;
66     }
67 
68     override public void accept0(MySqlASTVisitor visitor) {
69         if (visitor.visit(this)) {
70             acceptChild!SQLExprTableSource(visitor, tables);
71         }
72         visitor.endVisit(this);
73     }
74 }