Rank 1: Thread
Hi all!
Can I use ID.unique() for attributes?
it returns a string “unique()”, not a unique code
Thank you!
Votes
0
Replies
9
Participants
Unknown
Messages
10
Rank 1: Thread
Hi all!
Can I use ID.unique() for attributes?
it returns a string “unique()”, not a unique code
Thank you!
Can you provide some more details?
Without any of this info, all I can say is that if you are creating a new document with databases.createDocument(), you can use the ID.unique() method that comes with the Appwrite SDK to generate a string of unique and random characters for the documentId
Rank 1: Thread
@safwan hi, thank you for answer.
If i'm not wrong, you have to use ID.unique() for the web sdk
The function ID.unqiue() returns only the string
The generation of the unique id generation happens inside Appwrite in the server
You can look here for the actual code that generates the ID in Appwrite
https://github.com/utopia-php/database/blob/main/src/Database/Helpers/ID.php#L12
Rank 1: Thread
@Binyamin thank you for answer!
Rank 1: Thread
[SOLVED] ID.unique() use in attributes