diff options
Diffstat (limited to 'lib/private/DB/MigratorExecuteSqlEvent.php')
-rw-r--r-- | lib/private/DB/MigratorExecuteSqlEvent.php | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/lib/private/DB/MigratorExecuteSqlEvent.php b/lib/private/DB/MigratorExecuteSqlEvent.php new file mode 100644 index 00000000000..340cd636300 --- /dev/null +++ b/lib/private/DB/MigratorExecuteSqlEvent.php @@ -0,0 +1,39 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-only + */ +namespace OC\DB; + +use OCP\EventDispatcher\Event; + +class MigratorExecuteSqlEvent extends Event { + private string $sql; + private int $current; + private int $max; + + public function __construct( + string $sql, + int $current, + int $max, + ) { + $this->sql = $sql; + $this->current = $current; + $this->max = $max; + } + + public function getSql(): string { + return $this->sql; + } + + public function getCurrentStep(): int { + return $this->current; + } + + public function getMaxStep(): int { + return $this->max; + } +} |