@@ -139,9 +139,9 @@ public function executeChange(string $queryName, array $args = [], ?callable $on
139139 }
140140
141141 public function executeChangeRaw (array $ queries , array $ args = [], ?callable $ onSuccess = null , ?callable $ onError = null ) : void {
142- $ this ->executeImplRaw ($ queries , $ args , SqlThread::MODE_CHANGE , static function (SqlChangeResult $ result ) use ($ onSuccess ){
142+ $ this ->executeImplRaw ($ queries , $ args , SqlThread::MODE_CHANGE , static function (array $ results ) use ($ onSuccess ){
143143 if ($ onSuccess !== null ){
144- $ onSuccess ($ result ->getAffectedRows ());
144+ $ onSuccess (array_map ( fn ( $ result) => $ result ->getAffectedRows (), $ results ));
145145 }
146146 }, $ onError );
147147 }
@@ -155,9 +155,9 @@ public function executeInsert(string $queryName, array $args = [], ?callable $on
155155 }
156156
157157 public function executeInsertRaw (array $ queries , array $ args = [], ?callable $ onInserted = null , ?callable $ onError = null ) : void {
158- $ this ->executeImplRaw ($ queries , $ args , SqlThread::MODE_INSERT , static function (SqlInsertResult $ result ) use ($ onInserted ){
158+ $ this ->executeImplRaw ($ queries , $ args , SqlThread::MODE_INSERT , static function (array $ results ) use ($ onInserted ){
159159 if ($ onInserted !== null ){
160- $ onInserted ($ result ->getInsertId (), $ result ->getAffectedRows ());
160+ $ onInserted (array_map ( fn ( $ result) => $ result ->getInsertId (), $ result ->getAffectedRows (), $ results ));
161161 }
162162 }, $ onError );
163163 }
@@ -171,9 +171,9 @@ public function executeSelect(string $queryName, array $args = [], ?callable $on
171171 }
172172
173173 public function executeSelectRaw (array $ queries , array $ args = [], ?callable $ onSelect = null , ?callable $ onError = null ) : void {
174- $ this ->executeImplRaw ($ queries , $ args , SqlThread::MODE_SELECT , static function (SqlSelectResult $ result ) use ($ onSelect ){
174+ $ this ->executeImplRaw ($ queries , $ args , SqlThread::MODE_SELECT , static function (array $ results ) use ($ onSelect ){
175175 if ($ onSelect !== null ){
176- $ onSelect ($ result ->getRows (), $ result ->getColumnInfo ());
176+ $ onSelect (array_map ( fn ( $ result) => $ result ->getRows (), $ result ->getColumnInfo (), $ results ));
177177 }
178178 }, $ onError );
179179 }
0 commit comments