stephencelis / SQLite.swift

A type-safe, Swift-language layer over SQLite3.
MIT License
9.57k stars 1.54k forks source link

Using FTS5 custom auxiliary functions with SQLite.swift #1189

Open venkr opened 1 year ago

venkr commented 1 year ago

FTS5 has a lot of exciting functionality (mostly BM-25), but removes some functionality I care about - the offsets and snippet functions.

I'm considering using Custom Auxiliary Functions to re-implement these pieces of functionality, and the docs suggest that this is achieved with FTS5 by calling xCreateFunction() on the fts5_api object.

I've found info re: SQL custom functions in the docs, but not mention of FTS5 custom auxiliary functions if they're supported. Is there any straightforward way to achieve this?