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