virtual tables with zig-sqlite
Sep 22, 2022
Virtual tables let you expose almost anything as a SQL table: this is powerful because you can then use all the power of SQLite and SQL to exploit it. Ever wanted to join a CSV, a JSON file and a REST API? Virtual tables let you do that.
My goals for this feature were:
- providing a nice Zig API to implement a virtual table
- allow building a virtual table as a loadable extension
Today I want to talk about how I implemented it and I’ll also talk about a small demo I made.
The demo is a virtual table that actually hits an API instead of storing the data