Comment

Comment by ricg

How do you handle primary keys? Wouldn't auto-incrementing integers lead to duplicate keys since clients are not aware of each other?

For the To Do app example, let's say two clients start with an empty database and each creates a new todo:

Client A creates [id:1, todo:"Buy milk"]

Client B creates [id:1, todo:"Buy cheese"]

parent ricg 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton