-
-
Notifications
You must be signed in to change notification settings - Fork 722
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enabling FTS5 #518
Comments
Hello @gennaios!
All right, let's check this out.
Your Podfile looks correct. I'm sorry you stumbled on
I can't afford providing Carthage support on my free time. You may have to look for other Carthage experts.
As far as a Google search for "FTS5 error in tokenizer constructor" can tell, it looks like FTS5 was well enabled, but there is a tokenizer problem. I don't know how your Do you happen to use a custom tokenizer? If so, make sure it is added every time you open your database connection (and not only when the table is created).
I admit the documentation has several layers, which reflect several years of continuous development and evolving practices 😅. I'll try to provide some guidance in another comment. |
Hello @groue, thank you so very much for the assistance. It's only in the past few months that I have become somewhat familiar with SQLite and having switched over one database to it, trying to convert my macOS app that uses the same db – an app that I haven't looked at in years –, it's been a bit as one could say chaotic trying to refamiliarize myself with it as well as learning GRDB, how to use CocoaPods, etc.
Terrific. As I was before less familiar with CocoaPods, I wasn't sure if the integration was correct and had experimented with putting the post_install outside or inside of target without being sure it was properly integrated.
When using
Your question helped me very much immediately find the answer. :) As over the last week I have been looking over the GRDB docs, figuring out various aspects, trying to refamiliarize myself with my app, etc., I was a bit lost and did not think carefully if the tokenizer error might be in fact the FTS5 tokenizer. Indeed I was using
A bit of guidance would be much appreciated. I think for what is in my app so far – before using Realm –, any |
Hello, I think I've been able to get all that I want working. It was merely the first step of being unsure of proper enabling of FTS5 that made me not able to think of the why of my intial problems. Loading of 20,000 records is very fast, as well as filtering and sorting. Eventually I'll look at better performance such as testing your example of RestrictedPlayer that doesn't load all table columns. Unsure if in that case FetchedRecordsController will still be notified of changes to Player, or File in my case. I just need to try and then I'll know. It seems FetchedRecordsController requires loading all columns but with some more experimentation, I'll figure it out. Very much enjoying this so nicely designed library. Thank you. You can close this issue. |
Hello @gennaios, OK, I'll close this issue. It looks like you are discovering the benefits of Rubber duck debugging, where one moves towards a solution by putting words on the problem to solve. Many words are needed, sometimes 😉 Who cares, as long as it works? Happy GRDB! |
What did you do?
Hello. Thank you for this wonderful framework. I'm in the process of trying to migrate a macOS app from Realm to GRDB. As I have learned of SQLite and its FTS5 capabilities, I have started to use FTS5 in another app w/o issues. Now trying to integrate GRDB into project, I have some questions and an issue.
What did you expect to happen?
I am unsure of the enabling FTS5 instructions. My Podfile is as such :
The instructions don't specify
use_frameworks!
but if I leave that out, I get the warning[!] Using Swift static libraries with custom module maps is currently not supported. Please build
GRDB.swiftas a framework or remove the custom module map.
Otherwise I get this error frompod install
:I am not very experienced with macOS development and perhaps it is from some other setting due to using other frameworks with Carthage. I have tried to look for
OTHER_LDFLAGS
w/o success. Perhaps that's an unrelated issue.What happened instead?
Perhaps the integration is not correct. Upon trying to run a FTS5 query, I get the following error :
I have tried using sql arguments with and without specifying single quotes after MATCH.
My code looks like the following. Using an NSTableView, results are refetched upon change in a text field :
As I am just getting started, there remains some confusion of using
Codable
,FetchableRecord
,TableRecord
, andMutablePersistableRecord
. PerhapsTableRecord
isn't needed though I saw it as the only place to specify a SQLite table name (files
rather thanfile
). I am also unsure when to useenum CodingKeys
orenum Columns
– I have been able to get a NSTableView to load all data, though as I add other queries I'll figure it out –, and as such I have so far specified both. Perhaps that is part of the problem.The documentation is terrific although I think there remains a bit of ambiguity, as I have hinted at above. Help would be much appreciated. Mille mercis.
Environment
GRDB flavor(s): GRDB
GRDB version: GRDB-4.0 branch
Installation method: CocoaPods
Xcode version: 10.2
Swift version: 4.2
Platform(s) running GRDB: macOS
macOS version running Xcode: 10.14
The text was updated successfully, but these errors were encountered: