perf: Improve performance

Co-authored-by: Donjan <Donjan@cqbaobao.cn>
This commit is contained in:
Donjan 2021-04-25 11:30:01 +08:00 committed by GitHub
parent be8f70909b
commit 3354b558a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 10 deletions

View File

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