How do I make the following query in supabase on a stream listening for changes:
select * from public.messages where "to" IS NOT NULL;
From the documentation the closest, I could get was doing the filtering with an "equal to" expression. As captured below:
_messagesStream = supabase
.from('messages:to=eq.123')
.stream(['id'])
.order('created_at')
.execute()
.map((maps) => maps
.map((map) => Message.fromMap(map: map, myUserId: myUserId))
.toList());
But what I need is a query with "IS NOT NULL". A work around I found was to handle complex queries in a view, but the issue here is, I cannot listen for events on view.
Kindly assist.