Automattic\WooCommerce\Database\Migrations

MigrationHelper::generate_on_duplicate_statement_clause()public staticWC 1.0

Generates ON DUPLICATE KEY UPDATE clause to be used in migration.

{} It's a method of the class: MigrationHelper{}

No Hooks.

Return

String. SQL clause for INSERT...ON DUPLICATE KEY UPDATE

Usage

$result = MigrationHelper::generate_on_duplicate_statement_clause( $columns ): string;
$columns(array) (required)
List of column names.

Code of MigrationHelper::generate_on_duplicate_statement_clause() WC 7.1.0

public static function generate_on_duplicate_statement_clause( array $columns ): string {
	$db_util = wc_get_container()->get( DatabaseUtil::class );
	return $db_util->generate_on_duplicate_statement_clause( $columns );
}