Auto-incrementing id

In comparing the record layer to a traditional relational database there is no mention of an incrementing id field. It seems like atomic operations on a counter are easily supported by foundationdb. Is this an anti-pattern? Could/should it be implemented using the record layer? It doesn’t seem to be mentioned in the docs and cloudkit uses a uuid for identifiers and relationships. Would be great to hear more about the downsides.

Ah, this clears it up for the most part: https://github.com/FoundationDB/fdb-record-layer/blob/master/docs/FAQ.md#are-record-types-tables

Aaaaaand right below that there’s an entire section about this question: https://github.com/FoundationDB/fdb-record-layer/blob/master/docs/FAQ.md#are-auto-incremented-primary-keys-supported

whoops

1 Like

Ah, nice. Happy to help if there are follow up questions from the answer in our FAQs.