rdbms: remove IMaintainableDatabase::truncate() method

Bug: T363839
Change-Id: I79b7a2d1c65a38c200e84b479222052ff0ba5092
This commit is contained in:
Aaron Schulz 2024-04-11 12:20:41 -07:00 committed by Ladsgroup
parent b988ca576d
commit 80b71dd7aa
4 changed files with 1 additions and 24 deletions

View file

@ -241,6 +241,7 @@ because of Phabricator reports.
* DummyLinker has been removed. The former DummyLinker parameter
to the 'ImageBeforeProduceHTML' hook is now null.
* IMaintainableDatabase::listViews(), deprecated since 1.42, has been removed.
* IMaintainableDatabase::truncate(), deprecated since 1.42, has been removed.
* …
=== Deprecations in 1.43 ===

View file

@ -829,12 +829,6 @@ class DBConnRef implements IMaintainableDatabase, IDatabaseForOwner {
return $this->__call( __FUNCTION__, func_get_args() );
}
public function truncate( $tables, $fname = __METHOD__ ) {
$this->assertRoleAllowsWrites();
return $this->__call( __FUNCTION__, func_get_args() );
}
public function textFieldSize( $table, $field ) {
return $this->__call( __FUNCTION__, func_get_args() );
}

View file

@ -3003,13 +3003,6 @@ abstract class Database implements IDatabaseForOwner, IMaintainableDatabase, Log
$this->query( $query, $fname );
}
public function truncate( $tables, $fname = __METHOD__ ) {
$tables = is_array( $tables ) ? $tables : [ $tables ];
foreach ( $tables as $table ) {
$this->truncateTable( $table, $fname );
}
}
public function isReadOnly() {
return ( $this->getReadOnlyReason() !== null );
}

View file

@ -116,17 +116,6 @@ interface IMaintainableDatabase extends IDatabase {
*/
public function truncateTable( $table, $fname = __METHOD__ );
/**
* Delete all data in a table(s) and reset any sequences owned by that table(s)
*
* @param string|string[] $tables
* @param string $fname
* @throws DBError If an error occurs
* @since 1.35
* @deprecated Since 1.42; use truncateTable() instead
*/
public function truncate( $tables, $fname = __METHOD__ );
/**
* Creates a new table with structure copied from existing table
*