Support MS SQL server
Would it be possible to make this gem compatible with MS SQL server using the READPAST hint and UPDLOCK?
https://www.reddit.com/r/SQL/comments/17thq2b/for_update_skip_locked_equivalent_for_ms_sql/ https://learn.microsoft.com/en-us/sql/t-sql/queries/hints-transact-sql-table?view=sql-server-ver16
Hey @erlingur, great suggestion. I'll add this one to the list of improvements/enhancements we want to ship in the short term. It might take a bit because I don't have experience with MS SQL server. If you'd like to take a stab at it, please feel free. I'd like to detect the RDMS and version when starting, and decide what to use (no SKIP LOCKED at all, SKIP LOCKED...) so maybe this would be done at the same time 🤔
I put together a small spike as I'm also very interested in this. Unfortunately, there's a few issues besides the READPAST hint that would need to be resolved (see details in comment):
https://github.com/jonahgeorge/solid_queue/pull/1