'How to develop a storage engine for sqlite3

Recently I want to parse and reconstruct SQLite so that I could deepen my understanding of it. But when I tried to manually modify the underlying storage engine, which is btree, I found that it was tightly coupled with other modules (such as the pager and vdbe modules), which made it hard to separate.

I am asking this question because I am not sure if there is a common internal storage engine interface. The first step of my project was separate the btree engine, and then manually write another version of it. Now I noticed that there are a bunch of assert statements inside every function to check the integrity of the whole database, is it possible to call some of the internal functions without opening a database connection?

I noticed a project: sqlite4, which was no longer matained. It mentioned interchangeable storage engines. So at this moment is it possible to develop my own storage engine for sqlite3?

The version of the source code was the latest one, which was 3.38.2



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source