fix query from integration_tests to make it compatible across SQL Dialects

This commit is contained in:
David Martos 2023-02-09 11:02:35 +01:00
parent fef15389e6
commit bfed38b806
2 changed files with 2 additions and 2 deletions

View File

@ -69,7 +69,7 @@ class PreferenceConverter extends NullAwareTypeConverter<Preferences, String> {
'ORDER BY (SELECT COUNT(*) FROM friendships '
'WHERE first_user = u.id OR second_user = u.id) DESC LIMIT :amount',
'amountOfGoodFriends': 'SELECT COUNT(*) FROM friendships f WHERE '
'f.really_good_friends = 1 AND '
'f.really_good_friends = TRUE AND '
'(f.first_user = :user OR f.second_user = :user)',
'friendshipsOf': ''' SELECT
f.really_good_friends, "user".**

View File

@ -555,7 +555,7 @@ abstract class _$Database extends GeneratedDatabase {
Selectable<int> amountOfGoodFriends(int user) {
return customSelect(
'SELECT COUNT(*) AS _c0 FROM friendships AS f WHERE f.really_good_friends = 1 AND(f.first_user = @1 OR f.second_user = @1)',
'SELECT COUNT(*) AS _c0 FROM friendships AS f WHERE f.really_good_friends = TRUE AND(f.first_user = @1 OR f.second_user = @1)',
variables: [
Variable<int>(user)
],