aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/DB/ConnectionAdapter.php
diff options
context:
space:
mode:
authorVarun Patil <varunpatil@ucla.edu>2025-03-02 10:30:17 -0800
committerVarun Patil <varunpatil@ucla.edu>2025-03-02 10:36:13 -0800
commitc414ddee54a401e70f14a06e5456c09a3a7a9b93 (patch)
treec0188573cb9c2800f58171845af192392ca01616 /lib/private/DB/ConnectionAdapter.php
parent07174125a84e7eff56cfcdefa64eb77539985c75 (diff)
downloadnextcloud-server-pulsejet/truncate-1.tar.gz
nextcloud-server-pulsejet/truncate-1.zip
feat(db): add truncateTable methodpulsejet/truncate-1
Signed-off-by: Varun Patil <varunpatil@ucla.edu>
Diffstat (limited to 'lib/private/DB/ConnectionAdapter.php')
-rw-r--r--lib/private/DB/ConnectionAdapter.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/private/DB/ConnectionAdapter.php b/lib/private/DB/ConnectionAdapter.php
index 2baeda9cfb7..ba3bf90c2e8 100644
--- a/lib/private/DB/ConnectionAdapter.php
+++ b/lib/private/DB/ConnectionAdapter.php
@@ -189,6 +189,14 @@ class ConnectionAdapter implements IDBConnection {
}
}
+ public function truncateTable(string $table, bool $cascade): void {
+ try {
+ $this->inner->truncateTable($table, $cascade);
+ } catch (Exception $e) {
+ throw DbalException::wrap($e);
+ }
+ }
+
public function tableExists(string $table): bool {
try {
return $this->inner->tableExists($table);