tursodatabase / tursodatabase/libsql

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

Open
#127 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.