From 75cc1dcc2730cd06c43e36adb7e2023f7e8bd4c9 Mon Sep 17 00:00:00 2001 From: Vincent Cloutier Date: Sun, 19 Mar 2023 10:23:08 -0400 Subject: [PATCH] sql query tweak --- .../DataAccessLayers/FollowersPostgresDal.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DataAccessLayers/BirdsiteLive.DAL.Postgres/DataAccessLayers/FollowersPostgresDal.cs b/src/DataAccessLayers/BirdsiteLive.DAL.Postgres/DataAccessLayers/FollowersPostgresDal.cs index eff4c12..9bb99db 100644 --- a/src/DataAccessLayers/BirdsiteLive.DAL.Postgres/DataAccessLayers/FollowersPostgresDal.cs +++ b/src/DataAccessLayers/BirdsiteLive.DAL.Postgres/DataAccessLayers/FollowersPostgresDal.cs @@ -99,7 +99,7 @@ namespace BirdsiteLive.DAL.Postgres.DataAccessLayers { if (followedUserId == default) throw new ArgumentException("followedUserId"); - var query = $"SELECT * FROM {_settings.FollowersTableName} WHERE $1=ANY(followings)"; + var query = $"SELECT * FROM {_settings.FollowersTableName} WHERE followings @> ARRAY[$1]"; await using var connection = DataSource.CreateConnection(); await connection.OpenAsync();