@@ -7,15 +7,16 @@ namespace dolphindb {
7
7
class DBConnectionPoolImpl {
8
8
public:
9
9
struct Task {
10
- Task (const std::string& sc = " " , int id = 0 , int pr = 4 , int pa = 2 , bool clearM = false )
11
- : script(sc), identity(id), priority(pr), parallelism(pa), clearMemory(clearM){}
12
- Task (const std::string& function, const std::vector<ConstantSP>& args, int id = 0 , int pr = 4 , int pa = 2 , bool clearM = false )
13
- : script(function), arguments(args), identity(id), priority(pr), parallelism(pa), clearMemory(clearM){ isFunc = true ; }
10
+ Task (const std::string& sc = " " , int id = 0 , int pr = 4 , int pa = 2 , int fetchSize = 0 , bool clearM = false )
11
+ : script(sc), identity(id), priority(pr), parallelism(pa), fetchSize(fetchSize), clearMemory(clearM) {}
12
+ Task (const std::string& function, const std::vector<ConstantSP>& args, int id = 0 , int pr = 4 , int pa = 2 , int fetchSize = 0 , bool clearM = false )
13
+ : script(function), arguments(args), identity(id), priority(pr), parallelism(pa), fetchSize(fetchSize), clearMemory(clearM){ isFunc = true ; }
14
14
std::string script;
15
15
std::vector<ConstantSP> arguments;
16
16
int identity;
17
17
int priority;
18
18
int parallelism;
19
+ int fetchSize;
19
20
bool clearMemory;
20
21
bool isFunc = false ;
21
22
};
@@ -33,12 +34,12 @@ class DBConnectionPoolImpl{
33
34
}
34
35
}
35
36
void run (const std::string& script, int identity, int priority=4 , int parallelism=64 , int fetchSize=0 , bool clearMemory = false ){
36
- queue_->push (Task (script, identity, priority, parallelism, clearMemory));
37
+ queue_->push (Task (script, identity, priority, parallelism, fetchSize, clearMemory));
37
38
taskStatus_.setResult (identity, TaskStatusMgmt::Result ());
38
39
}
39
40
40
41
void run (const std::string& functionName, const std::vector<ConstantSP>& args, int identity, int priority=4 , int parallelism=64 , int fetchSize=0 , bool clearMemory = false ){
41
- queue_->push (Task (functionName, args, identity, priority, parallelism, clearMemory));
42
+ queue_->push (Task (functionName, args, identity, priority, parallelism, fetchSize, clearMemory));
42
43
taskStatus_.setResult (identity, TaskStatusMgmt::Result ());
43
44
}
44
45
0 commit comments