This repository has been archived by the owner on Jul 11, 2021. It is now read-only.
Multiple statements first prepare and then execute #55
Labels
enhancement
Good First Issue
PRO Version If Contribution
We will send you a PRO version if you contribute to this issue in a meaningful way.
RediSQL support multiple statements in the same "EXEC", hence it is possible and correct to do something like:
Which is quite convenient when mixed with BEGIN, COMMIT and ABORT instruction.
One problem is that all the statements are first prepared all together, and then executed, all together.
This works fine in the general case, but has some limitation when to prepare a statement is necessary to have execute the previous one.
This is the case for creating a table and then create an index on that table, or create a second table with references to the first one.
The fix would be to return an iterator when generating the statements, so that each statement is generate only when the previous one is already execute.
Roughly here: https://github.com/RedBeardLab/rediSQL/blob/master/redisql_lib/src/community_statement.rs#L70
However there may be concurrency issues that I have overlooked.
The text was updated successfully, but these errors were encountered: