Primary key or 'don't create if already exists?'
It's about the primary key this time.Â
The database is storing accounts data, it is something like this
login; password;email
I am creating the accounts with API POST call, and the logic is that if login already exists - don't create a new record. I always used to do it by setting the login as PRIMARY key, and there would be an error when trying to create a new entry with same login.
Right now I can't find anywhere in xano where to add the primary key, OR some kind of a logic when receiving the POST request, like search the database for a record with X email - if it doesn't exist then create it, seems pretty basic but I just can't find any examples 🤯
Thank you
Other
5 replies