aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/DB/MigratorExecuteSqlEvent.php
blob: 340cd63630093a4c4daeea04154370624e38a953 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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;
	}
}