tursodatabase / tursodatabase/libsql
Idea: dynamic table-valued functions, backed by WebAssembly user-defined functions
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 17.2k
- Forks
- 531
- Avg merge
- 1h 12m
- Merged PRs (30d)
- 1
Description
Table-valued functions are described here: https://www.sqlite.org/vtab.html#tabfunc2
Now that we support dynamic user-defined functions in WebAssembly, we should consider going a step further and allowing users to dynamically create table-valued functions, using (and maybe extending) the existing CREATE VIRTUAL TABLE interface. The rough idea is to simply have a functor that keeps its state in a virtual table, and uses a user-defined function to generate data.
Tribute to @fire for coming up with the idea and patiently explaining it to me multiple times until I grasped it 😇
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the SQLite table-valued function documentation at https://www.sqlite.org/vtab.html#tabfunc2 and the existing dynamic WebAssembly user-defined function support. Define the virtual-table and function interface, state handling, and expected behavior before implementation; done should mean a documented, working way to create dynamic table-valued functions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- wasm
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100