Does Xojo's SQLite implementation support this?

I want to add support for embeddings to my open source LLM module (AIKit). This would make it easier for Xojo programmers to use RAG (retrieval augmented generation) with LLMs.

To do this, I need a database that supports vector searching. For maximum simplicity of use, it would be awesome if I could use SQLite.

From my research, it looks like SQLite doesn’t natively support vector search but there are many extensions to SQLite that do, for example:

Is there a way to enable third party extensions to SQLite?

I recall you would have to make your own sqlite plugin for that to work …

I recall that I have done this with the MBS version of the SQLite plugin before Christian added that to the plugin with LoadICU. Thomas Tempelmann has a blog article on his blog for loading extensions. See Views of a Coder: Xojo SQLite databases: Enabling ICU for full Unicode support and adding custom functions . Not sure if this is still relevant.

2 Likes

https://documentation.xojo.com/api/databases/sqlitedatabase.html#sqlitedatabase-loadextensions

Example extension loading:

2 Likes

It was nearly 10 years ago.

How is this still relevant (if this is the case) ?

Seems likely. You can load extensions into the SQLite libary at runtime, but there is no Xojo method to do that (AFAIK), and also missing would be the required interface to the extension, callable from Xojo.

Um…

If the extension just extends the sql language, it should work just fine.

2 Likes

Ah yes, I missed that (I was looking under Methods).

Now, can the options listed here Database Connection Configuration Options be configured?

I don’t see why the pragmas wouldn’t work, but that page is about constants that are in the SQLite C code, so it depends what you’re talking about.

Yes, so I’d be surprised.