Back

How use IN query

  • 0
  • Flutter
Khushal@2303
30 May, 2023, 13:01

I want use IN query which will check in multiple object. Like I have list of ids [1,2,3,4,5], I want to check [1,2,3,4,5].in[5] then I should return me one row.

TL;DR
The user wants to know how to use the IN query with an array attribute in the Appwrite database. Another user suggested using code in Flutter to achieve the desired result. There is no direct solution provided in the thread.
Binyamin
30 May, 2023, 13:03

In your Appwrite database? Or you wanna check array includes some object in flutter?

Khushal@2303
30 May, 2023, 13:05

I have Appwrite database and in database I have attribute which take array type argument.

Binyamin
30 May, 2023, 13:10

I'm afraid you'll have to do in the flutter side, something like this.

TypeScript
final list = [1,2,3,4];
  
final item = list.contains(2) ? list[list.indexOf(2)] : 0;
Drake
30 May, 2023, 13:33

You might want to 👍 and join in on this conversation: https://github.com/appwrite/appwrite/issues/2838

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more