@@ -750,55 +750,55 @@ mod tests {
750750
751751 pool. execute ( setup) . await . unwrap ( ) ;
752752
753- // assert_complete_results(
754- // format!(
755- // "select name from instruments where {} ",
756- // QueryWithCursorPosition::cursor_marker()
757- // )
758- // .as_str(),
759- // vec![
760- // CompletionAssertion::Label("created_at".into()),
761- // CompletionAssertion::Label("id".into()),
762- // CompletionAssertion::Label("name".into()),
763- // CompletionAssertion::Label("z".into()),
764- // ],
765- // None,
766- // &pool,
767- // )
768- // .await;
769-
770- // assert_complete_results(
771- // format!(
772- // "select name from instruments where z = 'something' and created_at > {}",
773- // QueryWithCursorPosition::cursor_marker()
774- // )
775- // .as_str(),
776- // // simply do not complete columns + schemas; functions etc. are ok
777- // vec![
778- // CompletionAssertion::KindNotExists(CompletionItemKind::Column),
779- // CompletionAssertion::KindNotExists(CompletionItemKind::Schema),
780- // ],
781- // None,
782- // &pool,
783- // )
784- // .await;
785-
786- // // prefers not mentioned columns
787- // assert_complete_results(
788- // format!(
789- // "select name from instruments where id = 'something' and {}",
790- // QueryWithCursorPosition::cursor_marker()
791- // )
792- // .as_str(),
793- // vec![
794- // CompletionAssertion::Label("created_at".into()),
795- // CompletionAssertion::Label("name".into()),
796- // CompletionAssertion::Label("z".into()),
797- // ],
798- // None,
799- // &pool,
800- // )
801- // .await;
753+ assert_complete_results (
754+ format ! (
755+ "select name from instruments where {} " ,
756+ QueryWithCursorPosition :: cursor_marker( )
757+ )
758+ . as_str ( ) ,
759+ vec ! [
760+ CompletionAssertion :: Label ( "created_at" . into( ) ) ,
761+ CompletionAssertion :: Label ( "id" . into( ) ) ,
762+ CompletionAssertion :: Label ( "name" . into( ) ) ,
763+ CompletionAssertion :: Label ( "z" . into( ) ) ,
764+ ] ,
765+ None ,
766+ & pool,
767+ )
768+ . await ;
769+
770+ assert_complete_results (
771+ format ! (
772+ "select name from instruments where z = 'something' and created_at > {}" ,
773+ QueryWithCursorPosition :: cursor_marker( )
774+ )
775+ . as_str ( ) ,
776+ // simply do not complete columns + schemas; functions etc. are ok
777+ vec ! [
778+ CompletionAssertion :: KindNotExists ( CompletionItemKind :: Column ) ,
779+ CompletionAssertion :: KindNotExists ( CompletionItemKind :: Schema ) ,
780+ ] ,
781+ None ,
782+ & pool,
783+ )
784+ . await ;
785+
786+ // prefers not mentioned columns
787+ assert_complete_results (
788+ format ! (
789+ "select name from instruments where id = 'something' and {}" ,
790+ QueryWithCursorPosition :: cursor_marker( )
791+ )
792+ . as_str ( ) ,
793+ vec ! [
794+ CompletionAssertion :: Label ( "created_at" . into( ) ) ,
795+ CompletionAssertion :: Label ( "name" . into( ) ) ,
796+ CompletionAssertion :: Label ( "z" . into( ) ) ,
797+ ] ,
798+ None ,
799+ & pool,
800+ )
801+ . await ;
802802
803803 // uses aliases
804804 assert_complete_results (
0 commit comments