Open Lazizbek97 opened 8 months ago
In your code, where does chatIds
come from? Was it a typo and chatIds
is meant to be currentUserChatIds
?
Could you confirm if the filter is not working when you use a hardcoded value like the following?
final messageStream = supabase
.from('chats')
.stream(primaryKey: ['id']).inFilter('id', ['hard-coded-uuid-value-from-chats']);
In your code, where does
chatIds
come from? Was it a typo andchatIds
is meant to becurrentUserChatIds
?Could you confirm if the filter is not working when you use a hardcoded value like the following?
final messageStream = supabase .from('chats') .stream(primaryKey: ['id']).inFilter('id', ['hard-coded-uuid-value-from-chats']);
Hi, I have the same issue with RealtimeChannel:
RealtimeChannel realtimeChannel = _db
.channel('ingredients')
.onPostgresChanges(
event: PostgresChangeEvent.delete,
schema: 'public',
table: 'ingredients,
filter: PostgresChangeFilter(
type: PostgresChangeFilterType.inFilter,
column: 'id',
value: [1,5,7],
),
callback: (payload) => log('deleted $payload'),
)
.subscribe();
id is int8, primary key and identity. it seems as if the filter is not being applied since it doesn't matter what I delete, I can even delete something with ID 1000 but I still get notified of the deletion, when I was only interested in those in the filter! How do I verify the name of the realtimechannel? thanks.
update: with .stream(primaryKey: ['id']).inFilter('id', ids) it works... but I need to listen for PostgresChangeEvent.delete only
@Dario-Ciceri That is a known limitation of Supabase realtime. https://github.com/supabase/realtime/issues/585
Should you guys update your docs then? The only inFilter example is with the primary id:
@fjnoyp inFilter on primary keys does work as expected. In my previous comment, I was talking about this behavior being a known behavior, which is documented here.
Describe the bug I have one table(chats) which has id auto generated when any items added. other table(chat_members) connected with this table's id field(foreign key pairs). when i listen this chats table, with following code:
it is not giving chats, where its id contains currentUserChatIds.
Expected behavior i want to filter chats where its id are in current user's chats id list.
Screenshots Here is chat table
Here is chat member table, where members added when user click on join button
Additional context flutter version: