sqlidity
sqlidity copied to clipboard
fix: Fix bug when delete multiply rows in one transaction
- Previously,
Next
after aDelete
opcode always end due to the cursor points to an empty node - According to https://www.sqlite.org/opcode.html#Delete, when encounter flag
OPFLAG_SAVEPOSITION
, should move cursor to next or previous record - Chosen to move to the previous record, and add a hidden node at the head of the rbtree to avoid complexity
Hi! I'm so glad to see such a project. When I was using it, I found some bugs and tried to fix them. Also, I think there should be some test methods to verify the correctness of the transaction results, besides only checking if the transaction executed successfully.
thank you, this project was an experiment and it is not maintained. feel free to do as you please
btw this project doesn't aim to maintain 1:1 compatibility. maybe at first but I realized this isn't reasonable in solidity/evm.
there are other interesting approaches to bring sql to blockchains and blockchains to sql.
btw this project doesn't aim to maintain 1:1 compatibility. maybe at first but I realized this isn't reasonable in solidity/evm.
Whatever, I think this pr is just to fix a bug to ensure the project functions as intended. Beyond that, what this project attracts me is exactly its compatibility, and its a good tutorial for learning bytecode of sqlite, while performance is not a primary concern in EVM.
@hananbeer why do you think this isn't reasonable in solity btw?
Aside from the fact that gas might be a lot?
@hananbeer why do you think this isn't reasonable in solity btw?
Aside from the fact that gas might be a lot?
just gas. if you want to be fully compatible with sqlite then it will cost even more gas, but I don't think this is the right approach. probably equivalency to some extent.
but good news, since then a few good opcodes have been introduced such as TLOAD/TSTORE and MCOPY as well as rollups becoming reality it is quite feasible. open to collab on this.
What are the right opcodes to be looking at // where did you learn about them?
Do think it's a pretty cool idea that should be unlock by L2/L3s
I think if we can get strings unlocked and joins, this is more than shippable as alpha software