sqlite3在我的Mac终端中使用fts3创建表,以及如何在iphone xcode项目中使用它? [英] sqlite3 using fts3 create table in my mac terminal and how to use it in iphone xcode project?
问题描述
我试图在我的sqlite数据库中使用fts,我创建了一个数据库并插入了所有记录,在我的mac终端中使用sqlite查询,并将其用于我的iPhone xcode项目中,效果很好.
I am trying to use fts in my sqlite database, i have created a database and inserted ,all the records ,using sqlite query in my mac terminal, and used it in my iphone xcode project ,its worked fine.
现在我正在尝试使用链接集成fts3
now i am trying to integrate fts3 using the links
http://pp.hillrippers.ch/blog/2009/08/08/Static+SQLite+Library+with+Unicode+Support+for+the+iPhone/
http://regularrateandrhythm.com/regular- rate-rhythm-blog/sqlite3-fts-in-IOS4.html
http://answers .oreilly.com/topic/1955-how-to-use-full-text-search-in-sqlite/
如果我尝试创建sqlite fts查询,则根据这些链接
according to these links if i try to create a sqlite fts query
我无法在Mac终端中执行此查询
i cannot execture this query in mac terminal
使用FTS3创建虚拟表table_name(col1);
CREATE VIRTUAL TABLE table_name USING FTS3 ( col1);
能不能给我一个很好的教程链接或解决方案,如何处理这些问题.
can any please give me a good tutorial link, or solutions, how to deal with these fts.
预先感谢
推荐答案
您可能正在台式机上使用未启用FTS3编译的Sqlite版本.您需要在开发计算机上编译本地版本,才能创建FTS.
You are probably using a version of Sqlite on your desktop machine that is not compiled with FTS3 enabled. You need to compile a local version on your development machine to enable you to create the FTS.
Long Weekend网站上的说明还说明了在打开FTS3模块的情况下如何在桌面上构建sqlite的方法:
The instructions on the Long Weekend website also explain how to build sqlite on your desktop with the FTS3 module turned on :
我为iPhone创建FTS文件的工作流程如下:
My workflow for creating FTS files for iPhone is as follows:
- 在OS X开发人员计算机上安装带有FTS3的sqlite
- 通过sqlite的命令行界面执行FTS创建命令等
- 将现成的DB文件移动到我的Xcode项目中
- 使用静态链接的sqlite二进制文件在模拟器或设备上运行
就是这样. Long Weekend网站上的说明应按描述的那样工作,它们对我有用,这就是为什么我用 grin
That's it. The instructions on the Long Weekend website should work as described, they did for me, which is why I wrote em that way grin
这篇关于sqlite3在我的Mac终端中使用fts3创建表,以及如何在iphone xcode项目中使用它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!