In SQL, we have the RAND() function, is there an equivalent in Appwrite?
In my app, the user answers questions, which all have an Elo rating. I'm actually unfamiliar with how to choose which question next (matchmaking algorithms), but one way would be to choose a random value, I guess. If any of you guys have a better suggestion on how to tackle my specific problem, please let me know. Ideally, items would not repeat too much, and the range of question Elo should be similar to the user's.
Currently Nope. Either you would have to know the total ammount of docuements in your collection then use a random function to genarate some random offset then query using those random offset. Or you can fetch much docs See how much docs are there Then pick a random one. Btw There is a feature request of this issue https://github.com/appwrite/appwrite/issues/5205 You could show intrest in this 🤷♂️
Recommended threads
- Realtime for files() works almost well, ...
I have been trying to make use of realtime, today (14.03.26) I have pulled all the latest versions of docker images, and sdk available. Whats working: - Conn...
- Weird permission failure
when creating an account I use following methods: ``` Future<void> register(String email, String password, String username) async { final user = await accoun...
- Relation Question
How do I create a relation from table y to an others x.$id. in my example I have a users table where I use Appwrites unique User IDs and I want other tables fo...