@@ -1525,7 +1525,7 @@ private function execute_show_statement( WP_Parser_Node $node ): void {
15251525 sprintf (
15261526 'statement type: "%s" > "%s" ' ,
15271527 $ node ->rule_name ,
1528- $ keyword1 ->value
1528+ $ keyword1 ->get_value ()
15291529 )
15301530 );
15311531 }
@@ -2045,7 +2045,7 @@ private function execute_administration_statement( WP_Parser_Node $node ): void
20452045 sprintf (
20462046 'statement type: "%s" > "%s" ' ,
20472047 $ node ->rule_name ,
2048- $ first_token ->value
2048+ $ first_token ->get_value ()
20492049 )
20502050 );
20512051 }
@@ -2057,7 +2057,7 @@ private function execute_administration_statement( WP_Parser_Node $node ): void
20572057 }
20582058 }
20592059
2060- $ operation = strtolower ( $ first_token ->value );
2060+ $ operation = strtolower ( $ first_token ->get_value () );
20612061 foreach ( $ errors as $ error ) {
20622062 $ results [] = (object ) array (
20632063 'Table ' => $ this ->db_name . '. ' . $ table_name ,
@@ -2181,7 +2181,7 @@ private function translate( $node ): ?string {
21812181
21822182 // @TODO: Handle SET and JSON.
21832183 throw $ this ->new_not_supported_exception (
2184- sprintf ( 'data type: %s ' , $ child ->value )
2184+ sprintf ( 'data type: %s ' , $ child ->get_value () )
21852185 );
21862186 case 'fromClause ' :
21872187 // FROM DUAL is MySQL-specific syntax that means "FROM no tables"
@@ -2239,7 +2239,7 @@ private function translate( $node ): ?string {
22392239 '%s AS %s ' ,
22402240 $ value ,
22412241 $ this ->quote_sqlite_identifier (
2242- '@@ ' . ( $ type_token ? "$ type_token ->value . " : '' ) . $ original_name
2242+ '@@ ' . ( $ type_token ? "{ $ type_token ->get_value ()} . " : '' ) . $ original_name
22432243 )
22442244 );
22452245 case 'castType ' :
@@ -2290,7 +2290,7 @@ private function translate_token( WP_MySQL_Token $token ): ?string {
22902290 */
22912291 return null ;
22922292 default :
2293- return $ token ->value ;
2293+ return $ token ->get_value () ;
22942294 }
22952295 }
22962296
@@ -2333,8 +2333,8 @@ private function translate_string_literal( WP_Parser_Node $node ): string {
23332333 /*
23342334 * 1. Remove bounding quotes.
23352335 */
2336- $ quote = $ token ->value [0 ];
2337- $ value = substr ( $ token ->value , 1 , -1 );
2336+ $ quote = $ token ->get_value () [0 ];
2337+ $ value = substr ( $ token ->get_value () , 1 , -1 );
23382338
23392339 /*
23402340 * 2. Normalize escaping of "%" and "_" characters.
@@ -2420,13 +2420,13 @@ private function translate_pure_identifier( WP_Parser_Node $node ): string {
24202420 $ token = $ node ->get_first_child_token ();
24212421
24222422 if ( WP_MySQL_Lexer::DOUBLE_QUOTED_TEXT === $ token ->id ) {
2423- $ value = substr ( $ token ->value , 1 , -1 );
2423+ $ value = substr ( $ token ->get_value () , 1 , -1 );
24242424 $ value = str_replace ( '"" ' , '" ' , $ value );
24252425 } elseif ( WP_MySQL_Lexer::BACK_TICK_QUOTED_ID === $ token ->id ) {
2426- $ value = substr ( $ token ->value , 1 , -1 );
2426+ $ value = substr ( $ token ->get_value () , 1 , -1 );
24272427 $ value = str_replace ( '`` ' , '` ' , $ value );
24282428 } else {
2429- $ value = $ token ->value ;
2429+ $ value = $ token ->get_value () ;
24302430 }
24312431
24322432 return '` ' . str_replace ( '` ' , '`` ' , $ value ) . '` ' ;
0 commit comments