In SQLITE there is a possibility to relatively easily create User-Defined Functions and Aggregates in (extension) languages such as C, Perl, Python and others. Is there also such possibility using common-lisp as SQLITE language extension? I know there are libraries like cl-sqlite and plain-odbc but they don't seem to offer this possibility.
SQLite does not directly support user-defined functions. Sure, one can write a function in C or Python and register it within SQLite. But not in SQL itself.
Executive Summary. Applications that use SQLite can define custom SQL functions that call back into application code to compute their results. The custom SQL function implementations can be embedded in the application code itself, or can be loadable extensions.
When I wrote cl-sqlite, I hadn't thought about user-defined functions.
But it's actually pretty easy. It just takes to define callbacks, foreign functions and wrap them in lispy interface. I guess I'll add this feature to cl-sqlite soon.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With