添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Hello!

I’m currently dealing with a large dataset comprising 10,000 rows from the Supabase DB. Clearly, it’s not practical to filter all this information in front-end with filters. Therefore, I’m looking to implement backend filtering.

The idea is that users can select filters, and based on their choices, the system will fetch the relevant data from the Supabase DB. However, I’ve encountered an issue where no variables are being displayed when attempting to create backend filters. I’m unsure if this is a bug or if I might be overlooking something in the process. Can you provide any insights or guidance on this matter?

@Broberto Deam, you’re right. My bad.

When I try to bind it to my variable, it shows this error:
name: “Error”
code: “22P02”
details: “Token “X” is invalid.”
hint: null
message: “invalid input syntax for type json”

Everything works when I filter the exact way in front-end, instead of collection.

Tried it without variable, still doesnt work.


Variable: Multiselect has value of array.


This works completely fine, when I filter the collection in the front-end, but I can’t do that.

@david

This works for me actually. I assume that your database field ‘product’ is an array of texts? I have a field which is an array of texts and I’m using exactly the same method as you and it is working perfectly.
The error suggests this is a Supabase (PostgreSQL) error not WeWeb.

Supabase plugin filers items on back-end so double check your ‘products’ definition. The error suggests that PostgreSQL is receiving wrong datatype,

I even checked with 'X / Twitter" and it still works :slight_smile:


The collection is empty as I do not have “X / Twitter” item…

I also had an issue in the past using the same stack.
I was using a JSON col in supabase but I had trouble using the arrays operators in the collection configuration in WeWeb.

I changed from a JSON type to an TEXT type to represent a real array and it works fine now.
It might be a trick and maybe the front should be updated to better operate on JSON.

BUT : HOPE guys. The new version of the supabase SDK is being implemented and should soon be available to us.

Yup, it helped to change to Text, instead of JSON in supabase side, but still having some problems.

“Ignore if empty” doesn’t work. @Matthieu did you also ran some problems with this? Building a directory with bunch of filters, that should fetch collections.

Fixed it by creating custom “ignore if empty” and fetched all the time something changes.