Skip to content

Commit eb6f754

Browse files
Fix method resetSequence(). (#369)
* Fix method `resetSequence()`.
1 parent cec7b63 commit eb6f754

5 files changed

Lines changed: 11 additions & 11 deletions

File tree

src/Command/Command.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ public function dropView(string $viewName): static
326326
/**
327327
* @throws Exception|NotSupportedException
328328
*/
329-
public function executeResetSequence(string $table, array|int|string $value = null): static
329+
public function executeResetSequence(string $table, int|string $value = null): static
330330
{
331331
return $this->resetSequence($table, $value);
332332
}
@@ -524,7 +524,7 @@ public function renameTable(string $table, string $newName): static
524524
/**
525525
* @throws Exception|NotSupportedException
526526
*/
527-
public function resetSequence(string $table, array|int|string $value = null): static
527+
public function resetSequence(string $table, int|string $value = null): static
528528
{
529529
$sql = $this->queryBuilder()->resetSequence($table, $value);
530530
return $this->setSql($sql);

src/Command/CommandInterface.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -496,12 +496,12 @@ public function execute(): int;
496496
* maximum existing value +1.
497497
*
498498
* @param string $table The name of the table whose primary key sequence is reset.
499-
* @param array|int|string|null $value The value for the primary key of the next new row inserted. If this is not
500-
* set, the next new row's primary key will have the maximum existing value +1.
499+
* @param int|string|null $value The value for the primary key of the next new row inserted. If this is not set, the
500+
* next new row's primary key will have the maximum existing value +1.
501501
*
502502
* @return static
503503
*/
504-
public function executeResetSequence(string $table, array|int|string $value = null): static;
504+
public function executeResetSequence(string $table, int|string $value = null): static;
505505

506506
/**
507507
* Return the params used in the last query.
@@ -677,12 +677,12 @@ public function renameTable(string $table, string $newName): static;
677677
* or 1.
678678
*
679679
* @param string $table The name of the table whose primary key sequence will be reset.
680-
* @param array|int|string|null $value The value for the primary key of the next new row inserted. If this is not
680+
* @param int|string|null $value The value for the primary key of the next new row inserted. If this is not
681681
* set, the next new row's primary key will have a value 1.
682682
*
683683
* @return static
684684
*/
685-
public function resetSequence(string $table, array|int|string $value = null): static;
685+
public function resetSequence(string $table, int|string $value = null): static;
686686

687687
/**
688688
* Specifies the SQL statement to be executed. The SQL statement will not be modified in any way.

src/QueryBuilder/DMLQueryBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public function insertEx(string $table, QueryInterface|array $columns, array &$p
130130
/**
131131
* @throws NotSupportedException
132132
*/
133-
public function resetSequence(string $tableName, array|int|string|null $value = null): string
133+
public function resetSequence(string $tableName, int|string|null $value = null): string
134134
{
135135
throw new NotSupportedException(static::class . ' does not support resetting sequence.');
136136
}

src/QueryBuilder/DMLQueryBuilderInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,14 @@ public function insertEx(string $table, QueryInterface|array $columns, array &$p
109109
* or 1.
110110
*
111111
* @param string $tableName the name of the table whose primary key sequence will be reset.
112-
* @param array|int|string|null $value the value for the primary key of the next new row inserted. If this is not
112+
* @param int|string|null $value the value for the primary key of the next new row inserted. If this is not
113113
* set, the next new row's primary key will have a value 1.
114114
*
115115
* @throws Exception|NotSupportedException if this is not supported by the underlying DBMS.
116116
*
117117
* @return string the SQL statement for resetting sequence.
118118
*/
119-
public function resetSequence(string $tableName, array|int|string|null $value = null): string;
119+
public function resetSequence(string $tableName, int|string|null $value = null): string;
120120

121121
/**
122122
* Builds a SQL statement for truncating a DB table.

src/QueryBuilder/QueryBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ public function renameTable(string $oldName, string $newName): string
373373
return $this->ddlBuilder->renameTable($oldName, $newName);
374374
}
375375

376-
public function resetSequence(string $tableName, array|int|string|null $value = null): string
376+
public function resetSequence(string $tableName, int|string|null $value = null): string
377377
{
378378
return $this->dmlBuilder->resetSequence($tableName, $value);
379379
}

0 commit comments

Comments
 (0)