“No such function: REGEXP” in sqlite3 on iOS

爷,独闯天下 提交于 2019-12-22 07:50:32

问题


Is it possible to rebuild libsqlite3.dylib with the regexp function added? Or use create_sqlite_function to do it?


回答1:


As the SQLite documentation says:

If a application-defined SQL function named "regexp" is added at run-time, that function will be called in order to implement the REGEXP operator.

so you should be able to use create_sqlite_function like you already suggested yourself.




回答2:


create a regex function and then create sqlite function in your run time and pass the address of regex function and db instance in create sqlite function and enjoy querying regex in runtime to sqlite. I have also done that it works fine



来源:https://stackoverflow.com/questions/9312994/no-such-function-regexp-in-sqlite3-on-ios

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!