Using FTS5 custom auxiliary functions with SQLite.swift

Open
#1,189 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
sqlite, swift
Domain
database

Research direction

Start by reviewing SQLite.swift's existing support for SQL custom functions and the SQLite FTS5 documentation for the fts5_api xCreateFunction() entry point. Determine whether FTS5 custom auxiliary functions can be exposed through SQLite.swift and document the supported approach or required scope.

Written by the indexing model from the issue text.

Description

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?

Dominant language
Swift
Stars
10.2k
Forks
1.6k
Avg merge
6d 2h
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from stephencelis/SQLite.swift

All issues in stephencelis/SQLite.swift

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.