Skip to content

Commit 212ae72

Browse files
Remove src\TestSupport\TestQueryBuilderTrait::class from yiisoft\db. (#176)
* Remove src\TestSupport\TestQueryBuilderTrait::class from yiisoft\db.
1 parent c964807 commit 212ae72

6 files changed

Lines changed: 726 additions & 739 deletions

File tree

src/DDLQueryBuilder.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,11 @@ public function dropIndex(string $name, string $table): string
164164
return 'DROP INDEX ' . $this->quoter->quoteTableName($name);
165165
}
166166

167+
public function truncateTable(string $table): string
168+
{
169+
return 'TRUNCATE TABLE ' . $this->quoter->quoteTableName($table) . ' RESTART IDENTITY';
170+
}
171+
167172
public function renameTable(string $oldName, string $newName): string
168173
{
169174
return 'ALTER TABLE '

src/DMLQueryBuilder.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,17 +181,12 @@ public function resetSequence(string $tableName, int|string $value = null): stri
181181
}
182182

183183
if ($table === null) {
184-
throw new InvalidArgumentException("Table not found: $tableName");
184+
throw new InvalidArgumentException("Table not found: '$tableName'.");
185185
}
186186

187187
throw new InvalidArgumentException("There is not sequence associated with table '$tableName'.");
188188
}
189189

190-
public function truncateTable(string $table): string
191-
{
192-
return 'TRUNCATE TABLE ' . $this->quoter->quoteTableName($table) . ' RESTART IDENTITY';
193-
}
194-
195190
/**
196191
* Creates an UPDATE SQL statement.
197192
*

0 commit comments

Comments
 (0)