Ash FrameworkAF
Ash Frameworkโ€ข3y agoโ€ข
2 replies
Jmanda

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 counts, invoice_number counts, 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 AshSequence๐Ÿ˜„

Thank you in advance for your help!
Was this page helpful?