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.SQLAlterFunctionStatement; 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 23 public class SQLAlterFunctionStatement : SQLStatementImpl { 24 private SQLName name; 25 26 private bool _debug; 27 private bool reuseSettings; 28 29 private SQLExpr comment; 30 private bool languageSql; 31 private bool containsSql; 32 private SQLExpr sqlSecurity; 33 34 public bool isDebug() { 35 return _debug; 36 } 37 38 public void setDebug(bool _debug) { 39 this._debug = _debug; 40 } 41 42 public SQLName getName() { 43 return name; 44 } 45 46 public void setName(SQLName name) { 47 if (name !is null) { 48 name.setParent(this); 49 } 50 this.name = name; 51 } 52 53 public SQLExpr getComment() { 54 return comment; 55 } 56 57 public void setComment(SQLExpr comment) { 58 if (comment !is null) { 59 comment.setParent(this); 60 } 61 this.comment = comment; 62 } 63 64 public bool isReuseSettings() { 65 return reuseSettings; 66 } 67 68 public void setReuseSettings(bool x) { 69 this.reuseSettings = x; 70 } 71 72 public bool isLanguageSql() { 73 return languageSql; 74 } 75 76 public void setLanguageSql(bool languageSql) { 77 this.languageSql = languageSql; 78 } 79 80 public bool isContainsSql() { 81 return containsSql; 82 } 83 84 public void setContainsSql(bool containsSql) { 85 this.containsSql = containsSql; 86 } 87 88 public SQLExpr getSqlSecurity() { 89 return sqlSecurity; 90 } 91 92 public void setSqlSecurity(SQLExpr sqlSecurity) { 93 if (sqlSecurity !is null) { 94 sqlSecurity.setParent(this); 95 } 96 this.sqlSecurity = sqlSecurity; 97 } 98 99 override protected void accept0(SQLASTVisitor visitor) { 100 if (visitor.visit(this)) { 101 acceptChild(visitor, name); 102 acceptChild(visitor, comment); 103 acceptChild(visitor, sqlSecurity); 104 } 105 visitor.endVisit(this); 106 } 107 }