首页 > 沙子 > 启用FTS编译sqlite并用update更新列值

启用FTS编译sqlite并用update更新列值

2012年3月16日 发表评论 阅读评论

今天,折腾sqlite,需要update一个数据库,发现可以用下面的命令:

UPDATE <table> SET  <col=new_val> WHERE <oth_col=val>

但是,在ubuntu里面用apt-get安装sqlite后,直接执行上面的语句,会报“no such module:FTS3”,因为默认sqlite编译是没有启用FTS3的。因此,需要自己下源码编译,手动编译是加入以下编译选项:

-DSQLITE_ENABLE_FTS3 
-DSQLITE_ENABLE_FTS3_PARENTHESIS

用autoconf版本的话,在configure时,加入:

CPPFLAGS= "-DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS "/configure <options>

上面两种方法的目的都是一样的,就是在编译时定义SQLITE_ENABLE_FTS3 和SQLITE_ENABLE_FTS3_PARENTHESIS宏。

参考资料:http://www.sqlite.org/fts3.html



本文作者: Sigma    在新浪微博关注SigmaSigmaWeibo    RSS订阅本博客
本文链接: http://www.sigma.me/2012/03/16/sqlite-enable-fts-update.html
本博客采用知识共享署名—非商业性-禁止演绎使用3.0协议进行许可,转载请保留作者和原文链接。

分类: 沙子 标签: ,

  1. 2019年1月9日10:53 | #1

    I wanted to create you a very small word so as to say thank you once again regarding the amazing thoughts you’ve shared on this website. This is certainly unbelievably generous of people like you to present openly what many of us might have sold for an ebook to get some cash for themselves, certainly considering that you could possibly have tried it if you considered necessary. These concepts likewise acted to provide a good way to understand that other individuals have the same zeal like my personal own to know very much more pertaining to this issue. Certainly there are several more pleasurable occasions ahead for those who check out your website.

  2. 2019年1月10日07:50 | #2

    Thanks for your whole labor on this web site. My aunt loves setting aside time for investigation and it’s simple to grasp why. A number of us notice all regarding the dynamic means you deliver both interesting and useful tactics via the web blog and as well encourage response from some others on the issue while our favorite girl is certainly studying a whole lot. Have fun with the remaining portion of the year. You’re doing a fabulous job.

  3. 2019年1月11日03:59 | #3

    I want to show some appreciation to this writer just for rescuing me from this situation. Right after looking out through the online world and getting thoughts which are not helpful, I believed my entire life was done. Existing minus the strategies to the problems you’ve fixed all through the site is a crucial case, and the kind which might have badly affected my entire career if I had not noticed the blog. Your understanding and kindness in playing with everything was precious. I don’t know what I would have done if I hadn’t encountered such a thing like this. I can also at this moment relish my future. Thank you so much for the professional and results-oriented help. I won’t think twice to endorse the sites to anybody who will need counselling on this subject matter.

  4. 2019年1月11日18:37 | #4

    I want to show appreciation to the writer just for rescuing me from this incident. Because of scouting through the search engines and seeing views which were not pleasant, I assumed my life was gone. Existing without the presence of approaches to the issues you have resolved by means of the guide is a serious case, as well as ones which might have badly affected my entire career if I had not come across your blog post. Your main understanding and kindness in touching every part was vital. I am not sure what I would’ve done if I had not encountered such a thing like this. It’s possible to now look ahead to my future. Thanks for your time very much for this expert and result oriented help. I will not be reluctant to endorse your blog to anybody who should get tips on this situation.

  5. 2019年1月11日22:50 | #5

    I enjoy you because of your entire labor on this site. My aunt really likes engaging in research and it’s easy to understand why. My partner and i notice all concerning the compelling form you create practical tips by means of this web blog and as well as boost participation from people on this point so our favorite princess is certainly understanding a great deal. Have fun with the rest of the new year. You are conducting a really good job.

  6. 2019年1月12日15:13 | #6

    My wife and i ended up being really ecstatic when Raymond could complete his research through the entire precious recommendations he discovered using your web page. It’s not at all simplistic to simply continually be handing out guides which usually people have been selling. And now we understand we have got you to appreciate for that. The explanations you made, the straightforward blog navigation, the relationships you can make it easier to instill – it is all fabulous, and it’s facilitating our son and the family consider that this theme is awesome, which is certainly really essential. Many thanks for everything!

  7. 2019年1月13日10:42 | #7

    I precisely wanted to appreciate you once again. I’m not certain what I could possibly have followed in the absence of the actual techniques contributed by you on such a area of interest. It was a real alarming condition in my circumstances, however , considering this professional approach you solved the issue forced me to leap for contentment. I will be grateful for your support and pray you realize what a great job your are carrying out instructing many others through a blog. Probably you have never met any of us.

  1. 本文目前尚无任何 trackbacks 和 pingbacks.

无觅相关文章插件,快速提升流量