But I've never seen a need to access DB in the middle of a turn. And I can't imagine any reason to do so.
I can, because I DO have quite a few mechanisms requiring DB access in the middle of a turn. Three simple scenarios.
Scenario 1: You, the active player, take your turn. During that turn, you have a battle, which generates Favor (PlayerFavor and CityFavor, for BOTH players involved). You then save your game at the end of your turn, because really, who wants to redo an entire turn's actions if the game crashes or something during the AI's movement?
With the table save only happening at the start of each turn, that Favor you generated in battle would be lost, even though the game would still record the combat as occurring. I'd need to do the full table save after each combat to ensure this didn't happen, including any combats during the AIs' turns.
Scenario 2: During your turn, you notice that you have enough Favor to add a new minor god. So, you do so, selecting a new minor deity for your pantheon. (This modifies the Minors and NumMinors tables, and then modifies the Levels and CityFavor tables when the free Shrine is added to one city.)
Again, if the game was only saving at the start of each turn, then this choice would be lost. Granted, adding an extra save command on this sort of event wouldn't be hard, but then you get into the secondary effects; maybe that free Shrine unlocked a new Myth unit, and you set the city to build that unit. If the game can't remember you had that shrine, what happens to the under-construction unit when you reload your game?
Or what happens if, now that you've unlocked a focus, you then rush-buy the corresponding Myth unit in that city, but then reload and pick a different minor god? Obviously, this sort of abuse is pointless since you can always just use FireTuner to give whatever units you want, but it CAN happen accidentally, and it's possible that an event during that turn could have altered your alignment enough to make your previous choice unavailable.
Scenario 3: An Event happens. Besides the obvious instantaneous effects on units, yields, etc. (including a couple events that add Favor, requiring updates for the PlayerFavor and CityFavor tables at the very least), you have an alignment shift, which'd require updating the LawChaos and MatEphem tables.
-----------
The fact is, if table storage requires an explicit save command, then I either need to use that command every time I alter the contents of the table (which is often, in the case of the seven tables mentioned above), OR force the players to only save his game at the exact time I'm using the save function (i.e., at the start of their turns), and even that wouldn't work for the Events (since they happen after any start-of-turn serial events, but before you'd have a chance to save your game). If the game had an explicit OnSave Lua event trigger, then it'd obviously be trivial to deal with this, and your table saver would work perfectly since the data would always be saved to the savefile at the same time as the rest of the data.
But without that, I'm running into these situations where it's just not quite filling the role I need, while the older SaveUtils functions would. The issue is just that your Favor, unlike normal Civ5 yields, can be generated during your turn AND during your opponents' turns due to the battle favor mechanism. Normal yields don't increment until the end of your turn, and never increase during an opponent's turn, so it's normally not an issue of when you decide to save.
And no, there's no "legacy code" problem here. The entire logic is compartmentalized through a series of utility save/load functions (in MythUtils.lua) for exactly this reason; changing between two different save mechanisms is trivial because of how I designed the process. The only issue is whether these mechanisms fill all of roles I need; yours comes close, but the SaveUtils come closer.