Remove unavailable method call

This commit is contained in:
Alexander Pankratov 2020-05-12 15:49:40 +03:00
parent 912577617e
commit 123e3fadfd
1 changed files with 5 additions and 5 deletions

View File

@ -74,10 +74,10 @@ class MysqlArray implements DbArray
foreach ((array) $value as $key => $item) {
$counter++;
if ($counter % 100 === 0) {
yield $instance->offsetSetAsync($key, $item);
yield from $instance->offsetSet($key, $item);
Logger::log("Converting database. $counter/$total", Logger::WARNING);
} else {
$instance->offsetSetAsync($key, $item);
$instance->offsetSet($key, $item);
}
}
@ -136,18 +136,18 @@ class MysqlArray implements DbArray
* </p>
* @param $value
*
* @return Promise
* @return void
* @throws \Throwable
*/
public function offsetSet($index, $value): void
public function offsetSet($index, $value)
{
if ($this->getCache($index) === $value) {
return;
}
$this->setCache($index, $value);
$this->request("
yield $this->request("
INSERT INTO `{$this->table}`
SET `key` = :index, `value` = :value
ON DUPLICATE KEY UPDATE `value` = :value