Support for UUID?
Options
![Joe Thong](https://us.v-cdn.net/6037124/user_avatars/1398509.jpg)
Joe Thong
Member ✭
Hi Why Xano does not have the UUID type that comes with PostgreSQL? Is this something that you will offer in the coming future? If not, why not?
Thanks
Joe
Thanks
Joe
Comments
-
Typically, incremental ID versus UUID/GUID is just about preference. We currently lock down and add a unique index to the incremental ID field to ensure data best practices.
We currently have support that allows you create your own GUIDs or 64bit UID, and if you wish, you can call them (or ANY other field for that matter) instead of the incremental ID... we will probably eventually offer support for users to choose their preference from the start but this hasn't really been requested yet. -
Thank you Michael! would like to see the option to let user choose between UUID or incremental ID at the onboarding sequence.
Is there a filter for UUID/GUID that we could use before saving the records into the tables? -
create_uid is a filter, so you could create a new field and apply that filter on the input line. Generate GUID is a function so you can run that function and apply the output to the input line of the field.
-
> you could create a new field and apply that filter on the input line
Nah, unfortunately this won't work. Filters on new records don't support create_uid[image.png]What's the argument against uids as the default? Don't they strictly dominate ids or is there some tradeoff I'm unaware of.
My primary reason for wanting it is to not leak information about the number of rows in my database -
the filter is applied in the function stack
-
Ah so no way to make my uuid autogenerate when adding a new row?
-
I think you are referring to when adding it manually in your database. The database spreadsheet view has no logic on it and is for raw data entry.
This process would be automated through the function stack when using the API. For example, a new user signs up to your app, you have the filter applied on that particular field in your Add Record function. The uid is automatically generated upon sign up for the user in the new user record -
2nd this. Would prefer users don't know size of tables/how many records.
-
Same. Integer ids are bad for plenty of use-cases.
Security-wise, it's almost always better to use uuid instead of sequential.
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback