Custom / pluggable VDBE behavior?
(1) By anonymous on 2021-07-08 12:45:02 [link] [source]
After finishing one of my university projects that used SQLite I really started to perceive it as a serious tool. So I decided to make a deep dive into the code and what I would like to try is to change the behavior of VDBE (mainly adding some opcodes, maybe having some fun with the Parser and Code Generator in the future). Is it technically possible to somehow plug custom VDBE implementation (similar to what VFS is doing) without messing around with other pieces of code, like an extension?
Or the only way is to change vdbe*.c files and provide my own during compilation?
(2) By Richard Hipp (drh) on 2021-07-08 13:02:06 in reply to 1 [link] [source]
The only way is to change vdbe*.c and recompile.
We very deliberately do NOT make the bytecode an API. We want the freedom to change the bytecodes without breaking compatibility. And we use that freedom, quite often. Most releases of SQLite contain some change to the bytecode definitions.
(3) By anonymous on 2021-07-08 13:14:32 in reply to 2 [source]
I see. One of my thoughts was:
Hey, maybe SQLite is also a kind of framework that you can plug all the components you want and can create your own custom embedded dbms.
But your reply makes a lot of sense, now I understand the rationale behind this decision.
Thank you very much for the answer :) and also big kudos to you DRH and the whole SQLite team for sharing this amazing lib to the world.