tursodatabase/libsql

Idea: dynamic table-valued functions, backed by WebAssembly user-defined functions

Open

#127 aperta il 3 feb 2023

Vedi su GitHub
 (2 commenti) (1 reazione) (0 assegnatari)C (490 fork)batch import
help wanted

Metriche repository

Star
 (16.744 star)
Metriche merge PR
 (Merge medio 23h 19m) (1 PR mergiata in 30 g)

Descrizione

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 :innocent:

Guida contributor