0

I am trying to build a simple SQLite full text search (FTS4) for an iOS 9/Xcode 7 project w/ Swift 2.2. I am accessing the SQLite3 C API directly with Swift, I see no need to use a bloated wrapper library. I have the full text search working perfectly. Now I need to create a ranking function for the results. I already have the C code for the ranking function, the problem is I have no idea how to:

  1. Get the C source or compiled executable of the ranking function code into the compiled iOS project.
  2. Create or Load the ranking function within SQLite (sqlite3_create_function)
  3. Have SQLite recognize the created function

So basically, I have the C source code of the ranking function and have failed at every attempt to get SQLite to recognize the function.

Thanks for you help.

DropAcid
  • 61
  • 1
  • 6
  • What about looking at the code of one of those bloated wrapper libraries? You may learn something. – Gwendal Roué Apr 25 '16 at 12:46
  • I was able to code the entire Full Text Search with 30 lines of code. I did research wrappers libraries and they were no help to the above question. – DropAcid Apr 25 '16 at 15:12
  • But your question is not about Full Text Search, it is about custom SQL functions. There may be where they help you. – Gwendal Roué Apr 25 '16 at 15:53

0 Answers0