@@ -560,3 +560,44 @@ async fn hover_type_in_select_clause(test_db: PgPool) {
560560
561561 test_hover_at_cursor ( "hover_type_in_select_clause" , query, Some ( setup) , & test_db) . await ;
562562}
563+
564+ #[ sqlx:: test( migrator = "pgt_test_utils::MIGRATIONS" ) ]
565+ async fn no_hover_results_over_params ( test_db : PgPool ) {
566+ let setup = r#"
567+ create table users (
568+ id serial primary key,
569+ name text
570+ );
571+ "# ;
572+
573+ test_db. execute ( setup) . await . unwrap ( ) ;
574+
575+ {
576+ let query = format ! (
577+ "select * from users where name = $n{}ame;" ,
578+ QueryWithCursorPosition :: cursor_marker( )
579+ ) ;
580+ test_hover_at_cursor ( "dollar-param" , query, None , & test_db) . await ;
581+ }
582+ {
583+ let query = format ! (
584+ "select * from users where name = :n{}ame;" ,
585+ QueryWithCursorPosition :: cursor_marker( )
586+ ) ;
587+ test_hover_at_cursor ( "colon-param" , query, None , & test_db) . await ;
588+ }
589+ {
590+ let query = format ! (
591+ "select * from users where name = @n{}ame;" ,
592+ QueryWithCursorPosition :: cursor_marker( )
593+ ) ;
594+ test_hover_at_cursor ( "at-param" , query, None , & test_db) . await ;
595+ }
596+ {
597+ let query = format ! (
598+ "select * from users where name = ?n{}ame;" ,
599+ QueryWithCursorPosition :: cursor_marker( )
600+ ) ;
601+ test_hover_at_cursor ( "questionmark-param" , query, None , & test_db) . await ;
602+ }
603+ }
0 commit comments