58 public function tableName( $name, $format =
'quoted' );
115 callable $lineCallback =
null,
116 callable $resultCallback =
null,
118 callable $inputCallback =
null
136 callable $lineCallback =
null,
137 callable $resultCallback =
null,
139 callable $inputCallback =
null
159 public function dropTable( $table, $fname = __METHOD__ );
169 public function truncate( $tables, $fname = __METHOD__ );
206 public function listViews( $prefix =
null, $fname = __METHOD__ );
224 $oldName, $newName, $temporary =
false, $fname = __METHOD__
280 public function lockTables( array $read, array $write, $method );
302 public function listTables( $prefix =
null, $fname = __METHOD__ );
313 public function indexUnique( $table, $index, $fname = __METHOD__ );
327class_alias( IMaintainableDatabase::class,
'IMaintainableDatabase' );
Advanced database interface for IDatabase handles that include maintenance methods.
tableName( $name, $format='quoted')
Format a table name ready for use in constructing an SQL query.
tableNamesN(... $tables)
Fetch a number of table names into an zero-indexed numerical array This is handy when you need to con...
indexUnique( $table, $index, $fname=__METHOD__)
Determines if a given index is unique.
truncate( $tables, $fname=__METHOD__)
Delete all data in a table(s) and reset any sequences owned by that table(s)
fieldInfo( $table, $field)
mysql_fetch_field() wrapper Returns false if the field doesn't exist
streamStatementEnd(&$sql, &$newLine)
Called by sourceStream() to check if we've reached a statement end.
listViews( $prefix=null, $fname=__METHOD__)
Lists all the VIEWs in the database.
listTables( $prefix=null, $fname=__METHOD__)
List all tables on the database.
textFieldSize( $table, $field)
Returns the size of a text field, or -1 for "unlimited".
tableNames(... $tables)
Fetch a number of table names into an array This is handy when you need to construct SQL for joins.
dropTable( $table, $fname=__METHOD__)
Delete a table.
deadlockLoop(... $args)
Perform a deadlock-prone transaction.
unlockTables( $method)
Unlock all tables locked via lockTables()
lockTables(array $read, array $write, $method)
Lock specific tables.
sourceFile( $filename, callable $lineCallback=null, callable $resultCallback=null, $fname=false, callable $inputCallback=null)
Read and execute SQL commands from a file.
tableLocksHaveTransactionScope()
Checks if table locks acquired by lockTables() are transaction-bound in their scope.
sourceStream( $fp, callable $lineCallback=null, callable $resultCallback=null, $fname=__METHOD__, callable $inputCallback=null)
Read and execute commands from an open file handle.
duplicateTableStructure( $oldName, $newName, $temporary=false, $fname=__METHOD__)
Creates a new table with structure copied from existing table.