classChecksumTable
final class ChecksumTable
implements Statement
uses Snapshot
Public API: explicitly declared with
@visibility public.CHECKSUM TABLE t, … [QUICK | EXTENDED]: a request to compute a checksum of the contents of tables.
Mirrors SQLCOM_CHECKSUM. Rule: MYSQL-CHECKSUM-TABLE-001. Each table resolves by MYSQL-SERVER-TABLES-001 and its resolution is the relation fact of its MaintainedTable; a table named twice is NonUniqueTable. TABLE and TABLES are synonyms; TABLE is written. The server returns one row per table and message; its columns are MYSQL-ADMIN-ROWS-001. Source: https://dev.mysql.com/doc/refman/8.4/en/checksum-table.html. Status: Implemented.
$statement = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('checksum table t extended');
[$statement->toString(), $statement->statement->mode === \SqlSemantics\Platform\MySql\Statement\Server\Maintenance\ChecksumMode::Extended] // => ['CHECKSUM TABLE t EXTENDED', true]Properties§
public list<MaintainedTable> $tablespublic ChecksumMode|null $mode = nullMethods§
public function __construct(
list<MaintainedTable> $tables,
public ChecksumMode|null $mode = null,
)Parameters
$tables | list<MaintainedTable> | The tables in written order; at least one |
$mode | ChecksumMode|null | QUICK or EXTENDED, when written |
Calls 2
- method-call MaintainedTables::checked() line 45
- new MaintainedTables line 45
public function deriveStatement(Derivation $derivation): voidRecords the resolution of each table, reports a table named twice, and records the result rows.
Parameters
$derivation | Derivation |
Calls 4
- method-call MaintainedTables::derive() line 54
- new MaintainedTables line 54
- method-call AdminRows::checksum() line 55
- new AdminRows line 55
public function render(Output $out): voidWrites the request.
Parameters
$out | Output |
Calls 3
- method-call MaintainedTables::render() line 63
- new MaintainedTables line 63
- method-call Output::keyword() line 65
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.