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.SQLAlterTypeStatement; 17 18 import hunt.sql.ast.SQLName; 19 import hunt.sql.ast.SQLObject; 20 import hunt.sql.ast.SQLStatementImpl; 21 import hunt.sql.visitor.SQLASTVisitor; 22 23 import hunt.collection; 24 25 public class SQLAlterTypeStatement : SQLStatementImpl { 26 private SQLName name; 27 28 private bool compile; 29 private bool _debug; 30 private bool body; 31 private bool reuseSettings; 32 33 public SQLName getName() { 34 return name; 35 } 36 37 public void setName(SQLName name) { 38 if (name !is null) { 39 name.setParent(this); 40 } 41 this.name = name; 42 } 43 44 public bool isCompile() { 45 return compile; 46 } 47 48 public void setCompile(bool compile) { 49 this.compile = compile; 50 } 51 52 public bool isDebug() { 53 return _debug; 54 } 55 56 public void setDebug(bool _debug) { 57 this._debug = _debug; 58 } 59 60 public bool isBody() { 61 return body; 62 } 63 64 public void setBody(bool body) { 65 this.body = body; 66 } 67 68 public bool isReuseSettings() { 69 return reuseSettings; 70 } 71 72 public void setReuseSettings(bool reuseSettings) { 73 this.reuseSettings = reuseSettings; 74 } 75 76 override protected void accept0(SQLASTVisitor visitor) { 77 if (visitor.visit(this)) { 78 acceptChild(visitor, name); 79 } 80 visitor.endVisit(this); 81 } 82 83 override 84 public List!SQLObject getChildren() { 85 return Collections.singletonList!SQLObject(this.name); 86 } 87 }