@@ -4570,7 +4570,7 @@ function ( $column ) use ( $is_strict_mode, $insert_map ) {
45704570 // When a column value is included, we need to apply type casting.
45714571 $ position = array_search ( $ column ['COLUMN_NAME ' ], $ insert_list , true );
45724572 $ identifier = $ this ->quote_sqlite_identifier ( $ select_list [ $ position ] );
4573- $ fragment .= $ this ->cast_value_for_insert_or_update ( $ column ['DATA_TYPE ' ], $ identifier );
4573+ $ fragment .= $ this ->cast_value_for_saving ( $ column ['DATA_TYPE ' ], $ identifier );
45744574 }
45754575 }
45764576
@@ -4704,7 +4704,7 @@ private function translate_update_list( string $table_name, WP_Parser_Node $node
47044704 }
47054705
47064706 // Apply type casting.
4707- $ value = $ this ->cast_value_for_insert_or_update ( $ data_type , $ value );
4707+ $ value = $ this ->cast_value_for_saving ( $ data_type , $ value );
47084708
47094709 // In MySQL non-STRICT mode, when a column is declared as NOT NULL,
47104710 // updating to a NULL value saves an IMPLICIT DEFAULT value instead.
@@ -5009,13 +5009,14 @@ private function create_table_reference_map( WP_Parser_Node $node ): array {
50095009 }
50105010
50115011 /**
5012- * Emulate MySQL type casting for INSERT or UPDATE values.
5012+ * Emulate MySQL type casting for values to be saved to the database
5013+ * using INSERT, REPLACE, or UPDATE statements.
50135014 *
50145015 * @param string $mysql_data_type The MySQL data type.
50155016 * @param string $translated_value The original translated value.
50165017 * @return string The translated value.
50175018 */
5018- private function cast_value_for_insert_or_update (
5019+ private function cast_value_for_saving (
50195020 string $ mysql_data_type ,
50205021 string $ translated_value
50215022 ): string {
0 commit comments