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.SQLCreateUserStatement;
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 SQLCreateUserStatement : SQLStatementImpl {
24     private SQLName user;
25     private SQLExpr password;
26 
27     // oracle
28     private SQLName defaultTableSpace;
29 
30     public this() {
31 
32     }
33 
34     public SQLName getUser() {
35         return user;
36     }
37 
38     public void setUser(SQLName user) {
39         if (user !is null) {
40             user.setParent(this);
41         }
42         this.user = user;
43     }
44 
45     public SQLExpr getPassword() {
46         return password;
47     }
48 
49     public void setPassword(SQLExpr password) {
50         if (password !is null) {
51             password.setParent(this);
52         }
53         this.password = password;
54     }
55 
56     
57     override  protected void accept0(SQLASTVisitor visitor) {
58         if (visitor.visit(this)) {
59             acceptChild(visitor, user);
60             acceptChild(visitor, password);
61         }
62         visitor.endVisit(this);
63     }
64 }