1 /*
2  * Copyright (C) 2019, HuntLabs
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  */
17 
18 module hunt.database.base.impl.command.ExtendedBatchQueryCommand;
19 
20 import hunt.database.base.impl.command.ExtendedQueryCommandBase;
21 
22 import hunt.database.base.Row;
23 import hunt.database.base.Tuple;
24 import hunt.database.base.impl.PreparedStatement;
25 import hunt.database.base.impl.QueryResultHandler;
26 
27 import hunt.collection;
28 
29 class ExtendedBatchQueryCommand(T) : ExtendedQueryCommandBase!(T) {
30 
31     private List!(Tuple) _params;
32 
33     this(PreparedStatement ps,
34             List!(Tuple) params,
35             bool singleton,
36             // Collector<Row, ?, T> collector,
37             QueryResultHandler!(T) resultHandler) {
38         this(ps, params, 0, null, false, singleton, resultHandler); // collector, 
39     }
40 
41     private this(PreparedStatement ps,
42                 List!(Tuple) params,
43                 int fetch,
44                 string cursorId,
45                 bool suspended,
46                 bool singleton,
47                 // Collector<Row, ?, T> collector,
48                 QueryResultHandler!(T) resultHandler) {
49         super(ps, fetch, cursorId, suspended, singleton, resultHandler); // collector, 
50         this._params = params;
51     }
52 
53     List!(Tuple) params() {
54         return _params;
55     }
56 
57 }