Automattic\WooCommerce\Internal\Utilities

DatabaseUtil::get_missing_tables()publicWC 1.0

Given a set of table creation SQL statements, check which of the tables are currently missing in the database.

{} Это метод класса: DatabaseUtil{}

Хуков нет.

Возвращает

Массив. An array containing the names of the tables that currently don't exist in the database.

Использование

$DatabaseUtil = new DatabaseUtil();
$DatabaseUtil->get_missing_tables( $creation_queries ): array;
$creation_queries(строка) (обязательный)
The SQL queries to execute ("CREATE TABLE" statements, same format as for dbDelta).

Код DatabaseUtil::get_missing_tables() WC 6.6.1

public function get_missing_tables( string $creation_queries ): array {
	$dbdelta_output = $this->dbdelta( $creation_queries, false );
	$parsed_output  = $this->parse_dbdelta_output( $dbdelta_output );
	return $parsed_output['created_tables'];
}