Lisp中的SQLITE用户定义函数

时间:2022-08-25 12:56:42

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中,可以相对容易地在(扩展)语言(如C,Perl,Python等)中创建用户定义的函数和聚合。是否还有使用common-lisp作为SQLITE语言扩展的可能性?我知道有像cl-sqlite和plain-odbc这样的库,但它们似乎没有提供这种可能性。

1 个解决方案

#1


6  

When I wrote cl-sqlite, I hadn't thought about user-defined functions.

当我写cl-sqlite时,我没有想过用户定义的函数。

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.

但它实际上非常简单。它只需要定义回调,外部函数并将它们包装在lispy接口中。我想我很快就会把这个功能添加到cl-sqlite中。

#1


6  

When I wrote cl-sqlite, I hadn't thought about user-defined functions.

当我写cl-sqlite时,我没有想过用户定义的函数。

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.

但它实际上非常简单。它只需要定义回调,外部函数并将它们包装在lispy接口中。我想我很快就会把这个功能添加到cl-sqlite中。