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.SQLFetchStatement;
17 
18 
19 import hunt.collection;
20 
21 import hunt.sql.ast.SQLExpr;
22 import hunt.sql.ast.SQLName;
23 import hunt.sql.ast.SQLStatementImpl;
24 import hunt.sql.visitor.SQLASTVisitor;
25 import hunt.sql.ast.SQLObject;
26 
27 public class SQLFetchStatement : SQLStatementImpl {
28 
29     private SQLName       cursorName;
30 
31     private bool       bulkCollect;
32 
33     private List!SQLExpr into;
34 
35     this()
36     {
37         into = new ArrayList!SQLExpr();
38     }
39 
40     
41     override  protected void accept0(SQLASTVisitor visitor) {
42         if (visitor.visit(this)) {
43             acceptChild(visitor, cursorName);
44             acceptChild!SQLExpr(visitor, into);
45         }
46         visitor.endVisit(this);
47     }
48 
49     public SQLName getCursorName() {
50         return cursorName;
51     }
52 
53     public void setCursorName(SQLName cursorName) {
54         this.cursorName = cursorName;
55     }
56 
57     public List!SQLExpr getInto() {
58         return into;
59     }
60 
61     public void setInto(List!SQLExpr into) {
62         this.into = into;
63     }
64 
65     public bool isBulkCollect() {
66         return bulkCollect;
67     }
68 
69     public void setBulkCollect(bool bulkCollect) {
70         this.bulkCollect = bulkCollect;
71     }
72 }