fix: Revert "perf: Improve performance" (#21)

This reverts commit 3354b558a6.
This commit is contained in:
Jon Lee 2021-04-25 12:18:05 +08:00 committed by GitHub
parent 3354b558a6
commit 66a857628e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 2 deletions

View File

@ -154,7 +154,11 @@ class DatabaseAdapter implements DatabaseAdapterContract, BatchDatabaseAdapterCo
$instance->where('v'.strval($key), $value);
}
$instance->delete();
foreach ($instance->get() as $model) {
if ($model->delete()) {
++$count;
}
}
}
/**
@ -206,7 +210,11 @@ class DatabaseAdapter implements DatabaseAdapterContract, BatchDatabaseAdapterCo
}
}
$instance->delete();
foreach ($instance->get() as $model) {
if ($model->delete()) {
++$count;
}
}
}
/**