@@ -7,15 +7,16 @@ namespace dolphindb {
77class DBConnectionPoolImpl {
88public:
99 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 ; }
1414 std::string script;
1515 std::vector<ConstantSP> arguments;
1616 int identity;
1717 int priority;
1818 int parallelism;
19+ int fetchSize;
1920 bool clearMemory;
2021 bool isFunc = false ;
2122 };
@@ -33,12 +34,12 @@ class DBConnectionPoolImpl{
3334 }
3435 }
3536 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));
3738 taskStatus_.setResult (identity, TaskStatusMgmt::Result ());
3839 }
3940
4041 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));
4243 taskStatus_.setResult (identity, TaskStatusMgmt::Result ());
4344 }
4445
0 commit comments