logoalt Hacker News

HexDecOctBinyesterday at 5:13 PM1 replyview on HN

I always wonder why SQLite didn't expose a programmatic way for creating a query (as opposed to parsing SQL statements). Given that it was designed to be embedded, it seems to me that it would have made far more sense to provide an API based interface. Then, for example, stored procedures would just be function pointers passed as callbacks.


Replies

theszyesterday at 10:54 PM

SQLite was a library for TCL, implementing "sqlite" command, and from TCL one can use it in a variety of interesting ways, approaching and even surpassing "stored procedures" concept.

For example, it is easy to create SQL function using TCL: https://sqlite.org/tclsqlite.html#the_function_method