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.ast.statement.SQLDropTableSpaceStatement;
17 
18 import hunt.sql.ast.SQLExpr;
19 import hunt.sql.ast.SQLName;
20 import hunt.sql.ast.SQLStatementImpl;
21 import hunt.sql.visitor.SQLASTVisitor;
22 import hunt.sql.ast.statement.SQLDropStatement;
23 
24 public class SQLDropTableSpaceStatement : SQLStatementImpl , SQLDropStatement {
25 
26     private SQLName name;
27     private bool ifExists;
28     private SQLExpr engine;
29     
30     public this() {
31         
32     }
33     
34     public this(string dbType) {
35         super (dbType);
36     }
37 
38     
39     override  protected void accept0(SQLASTVisitor visitor) {
40         if (visitor.visit(this)) {
41             acceptChild(visitor, name);
42         }
43         visitor.endVisit(this);
44     }
45 
46     public SQLName getName() {
47         return name;
48     }
49 
50     public void setName(SQLName x) {
51         if (x !is null) {
52             x.setParent(this);
53         }
54         this.name = x;
55     }
56 
57     public SQLExpr getEngine() {
58         return engine;
59     }
60 
61     public void setEngine(SQLExpr x) {
62         if (x !is null) {
63             x.setParent(this);
64         }
65         this.engine = x;
66     }
67 
68     public bool isIfExists() {
69         return ifExists;
70     }
71 
72     public void setIfExists(bool ifExists) {
73         this.ifExists = ifExists;
74     }
75 
76 }