4 ms·
Awesome work! A killer feature of sqlite that I would love to see in pglite would be javascript window functions.
by makkesk8 2y ago
Awesome work! A killer feature of sqlite that I would love to see in pglite would be javascript window functions.
- isoprophlex 2y agoHuh, can you do that? I can't google anything just now, got a link to some docs about js window functions in sqlite?! Sounds very powerful
- AlexErrant 2y agoMaybe they're talking about https://www.sqlite.org/appfunc.html https://www.sqlite.org/appfunc.html where you can define a window fn in the (perhaps JS) app via `sqlite3_create_window_function()`.
- samwillis 2y agoThis is high on my list, I have a few ideas how to do it, one being a "PL/JS" extension that calls out to the host JS environment to run JS functions.
- isoprophlex 2y agoI think PG is relatively ideal for that. In a classical data warehousing/ETL context, I've called python directly from inside PG, which has its quirks but is pretty doable, all in all... https://www.postgresql.org/docs/current/plpython.html https://www.postgresql.org/docs/current/plpython.html
- AlexErrant 2y agoFYI Turso does it with WASM https://turso.tech/blog/webassembly-functions-for-your-sqlite-compatible-database-7e1ad95a2aa7 https://turso.tech/blog/webassembly-functions-for-your-sqlit...