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.MySqlShowVariantsStatement; 17 18 import hunt.sql.ast.SQLExpr; 19 import hunt.sql.dialect.mysql.visitor.MySqlASTVisitor; 20 import hunt.sql.dialect.mysql.ast.statement.MySqlStatementImpl; 21 import hunt.sql.dialect.mysql.ast.statement.MySqlShowStatement; 22 23 public class MySqlShowVariantsStatement : MySqlStatementImpl , MySqlShowStatement { 24 alias accept0 = MySqlStatementImpl.accept0; 25 private bool global = false; 26 private bool session = false; 27 28 private SQLExpr like; 29 private SQLExpr where; 30 31 public bool isGlobal() { 32 return global; 33 } 34 35 public void setGlobal(bool global) { 36 this.global = global; 37 } 38 39 public bool isSession() { 40 return session; 41 } 42 43 public void setSession(bool session) { 44 this.session = session; 45 } 46 47 public SQLExpr getLike() { 48 return like; 49 } 50 51 public void setLike(SQLExpr like) { 52 this.like = like; 53 } 54 55 public SQLExpr getWhere() { 56 return where; 57 } 58 59 public void setWhere(SQLExpr where) { 60 this.where = where; 61 } 62 63 override public void accept0(MySqlASTVisitor visitor) { 64 if (visitor.visit(this)) { 65 acceptChild(visitor, like); 66 acceptChild(visitor, where); 67 } 68 visitor.endVisit(this); 69 } 70 }