And here come some Official Answers!
- Under what circumstances would the row ID format (list of exactly two integers) change?
We make no promises about what format the ID is in for new rows. Don’t rely on it.
If you store the ID of a particular row (using get_id()
) and store it somewhere, then calling app_tables.my_table.get_row_by_id()
with that ID will always get you back the same row (unless you’ve deleted it).
- Is the row’s ID guaranteed to never be reused after a “delete”?
Yes, that is correct.
- Are there any database circumstances that would change a row ID?
No. Calling get_row_by_id()
with a row ID you’ve saved will always get you that row back (as long as it hasn’t been deleted, obviously). This remains true over migrations, backup/restore, etc. (Although obviously if you copy data around yourself, you’re creating new rows with new IDs.)