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.MySqlCreateServerStatement; 17 18 import hunt.sql.ast.SQLExpr; 19 import hunt.sql.ast.SQLName; 20 import hunt.sql.ast.statement.SQLAlterStatement; 21 import hunt.sql.ast.statement.SQLCreateStatement; 22 import hunt.sql.dialect.mysql.visitor.MySqlASTVisitor; 23 import hunt.sql.dialect.mysql.ast.statement.MySqlStatementImpl; 24 25 public class MySqlCreateServerStatement : MySqlStatementImpl , SQLCreateStatement { 26 27 alias accept0 = MySqlStatementImpl.accept0; 28 29 private SQLName name; 30 private SQLName foreignDataWrapper; 31 private SQLExpr host; 32 private SQLExpr database; 33 private SQLExpr user; 34 private SQLExpr password; 35 private SQLExpr socket; 36 private SQLExpr owner; 37 private SQLExpr port; 38 39 public SQLName getName() { 40 return name; 41 } 42 43 public void setName(SQLName x) { 44 if (x !is null) { 45 x.setParent(this); 46 } 47 this.name = x; 48 } 49 50 public SQLName getForeignDataWrapper() { 51 return foreignDataWrapper; 52 } 53 54 public void setForeignDataWrapper(SQLName x) { 55 if (x !is null) { 56 x.setParent(this); 57 } 58 this.foreignDataWrapper = x; 59 } 60 61 public SQLExpr getHost() { 62 return host; 63 } 64 65 public void setHost(SQLExpr x) { 66 if (x !is null) { 67 x.setParent(this); 68 } 69 this.host = x; 70 } 71 72 public SQLExpr getDatabase() { 73 return database; 74 } 75 76 public void setDatabase(SQLExpr x) { 77 if (x !is null) { 78 x.setParent(this); 79 } 80 this.database = x; 81 } 82 83 public SQLExpr getUser() { 84 return user; 85 } 86 87 public void setUser(SQLExpr x) { 88 if (x !is null) { 89 x.setParent(this); 90 } 91 this.user = x; 92 } 93 94 public SQLExpr getPassword() { 95 return password; 96 } 97 98 public void setPassword(SQLExpr x) { 99 if (x !is null) { 100 x.setParent(this); 101 } 102 this.password = x; 103 } 104 105 public SQLExpr getSocket() { 106 return socket; 107 } 108 109 public void setSocket(SQLExpr x) { 110 if (x !is null) { 111 x.setParent(this); 112 } 113 this.socket = x; 114 } 115 116 public SQLExpr getOwner() { 117 return owner; 118 } 119 120 public void setOwner(SQLExpr x) { 121 if (x !is null) { 122 x.setParent(this); 123 } 124 this.owner = x; 125 } 126 127 public SQLExpr getPort() { 128 return port; 129 } 130 131 public void setPort(SQLExpr x) { 132 if (x !is null) { 133 x.setParent(this); 134 } 135 this.port = x; 136 } 137 138 override public void accept0(MySqlASTVisitor visitor) { 139 if (visitor.visit(this)) { 140 acceptChild(visitor, name); 141 acceptChild(visitor, foreignDataWrapper); 142 acceptChild(visitor, host); 143 acceptChild(visitor, database); 144 acceptChild(visitor, user); 145 acceptChild(visitor, password); 146 acceptChild(visitor, socket); 147 acceptChild(visitor, owner); 148 acceptChild(visitor, port); 149 } 150 visitor.endVisit(this); 151 } 152 }