-
Notifications
You must be signed in to change notification settings - Fork 290
Add sqlcipher #202
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
Add sqlcipher #202
Conversation
看起来不错。iguana里有个文件做了修改是什么原因呢?即使要改,iguana是第三方库不要在ormpp里去改,在iguana项目里改。 |
还有个问题,能不能尽量兼容以前的sqlite 版本呢,默认兼容老版本,只有开启了ENABLE_SQLITE3_CODEC 才使用支持sqlcipher版本的sqlite,这样就能实现一个好的向前兼容性了。 |
This reverts commit 1709c29.
1、iguana里的修改是我发现本地的 macOS 上用 Clang 编译项目的时候 Clang 的检查机制比较严格,如果不写出尖括号会编译不通过。但其实CI 流程中并没有什么问题。我已经回退了这个修改。 2、根据 sqlcipher 官方的回答
就是说不开启 codec 的时候就是普通的 sqlite3。然后我的代码里面也用了条件编译和条件预定义宏,只要不开启ENABLE_SQLITE3_CODEC 应该就是完全兼容旧版 sqlite3 的。 3、clang-format 的 CI 过不了好像是因为 sqlite3.c 文件被换成了支持 sqcipher 的版本,文件太大 clang-format 检测这个文件的时候超时还是超资源了。暂时还没找到解决办法 |
将sqlit3.c文件替换为支持sqlcipher的版本
1、通过cmake中ENABLE_SQLITE3_CODEC配合ENABLE_SQLITE3启用sqlcipher。
2、如果不使用ENABLE_SQLITE3_CODEC,根据条件编译和原来的sqlite3版本没有区别。