Support for UUID?

Options
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

Comments

  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options
    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. 
  • Joe Thong
    Joe Thong Member
    Options
    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? 
  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options
    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.
  • Connor McCormick
    Options
    > 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 
  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options
     the filter is applied in the function stack
  • Connor McCormick
    Options
     Ah so no way to make my uuid autogenerate when adding a new row? 
  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options
     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
  • Kevin Wasie
    Kevin Wasie Member
    Options
    2nd this. Would prefer users don't know size of tables/how many records. 
  • Ambroise
    Ambroise Member
    Options

    Same. Integer ids are bad for plenty of use-cases.

    Security-wise, it's almost always better to use uuid instead of sequential.