Implementating auto-incrementing/sequence fields in Ash Resources
I'm working on a project and I need to implement auto-incrementing fields, for example an Issue Number, Invoice Number, Service Number etc.
I was thinking of creating a sequence table to keep track of multiple auto-increment field counts.
issue_number
issue_number
counts,
invoice_number
invoice_number
counts,
service_number
service_number
counts, etc.
I want to make sure that the implementation is consistent and that the sequence table will not leave gaps, as some database implementations leave gaps when a transaction fails.
I want to hear your ideas on the best way to implement in Ash, and it would be cool if there was an extension for this, like
The Elixir backend framework for unparalleled productivity. Declarative tools that let you stop wasting time. Use with Phoenix LiveView or build APIs in minutes for your front-end of choice.