@@ -513,24 +513,23 @@ integrationSpec conn = do
513 # select @"name, email"
513 # select @"name, email"
514 # where_ @"age > $age"
514 # where_ @"age > $age"
515 # runQuery conn { age: 25 }
515 # runQuery conn { age: 25 }
516− Array.length rows `shouldEqual` 1
516+ rows `shouldEqual` [ { name: "Bob", email: "bob@example.com" } ]
517− (map _.name rows) `shouldEqual` [ "Bob" ]
519 it "select with alias" do
518 it "select with alias" do
520 rows <- from usersTable
519 rows <- from usersTable
521 # select @"name, email AS e"
520 # select @"name, email AS e"
522 # runQuery conn {}
521 # runQuery conn {}
523− Array.length rows `shouldEqual` 2
522+ rows `shouldEqual`
524− (map _.e rows) `shouldSatisfy` Array.elem "alice@example.com"
523+ [ { name: "Alice", e: "alice@example.com" }
524+ , { name: "Bob", e: "bob@example.com" }
526 it "runQueryOne returns Just for match" do
527 it "runQueryOne returns Just for match" do
527 result <- from usersTable
528 result <- from usersTable
528 # select @"name, email"
529 # select @"name, email"
529 # where_ @"name = $name"
530 # where_ @"name = $name"
530 # runQueryOne conn { name: "Alice" }
531 # runQueryOne conn { name: "Alice" }
532− Just r -> r.email `shouldEqual` "alice@example.com"
532+ result `shouldEqual` Just { name: "Alice", email: "alice@example.com" }
533− Nothing -> shouldEqual "found" "nothing"
535 it "runQueryOne returns Nothing for no match" do
534 it "runQueryOne returns Nothing for no match" do
536 result <- from usersTable
535 result <- from usersTable