SQLite.swift 是一个使用纯 Swift 语言封装 SQLite3 的操作框架。
特性:
- 简单的查询和参数绑定接口
- 安全、自动类型数据访问
- 隐式提交和回滚接口
- 开发者友好的错误处理和调试
- 文档完善
- 通过广泛测试
示例代码:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
|
安装
Note: SQLite.swift requires Swift 1.1 (available in Xcode 6.1).
To install SQLite.swift:
- Drag the SQLite.xcodeproj file into your own project. (Submodule, clone, or download the project first.)
- In your target’s Build Phases, add SQLite iOS (or SQLite Mac) to the Target Dependencies build phase.
- Add the appropriate SQLite.framework product to theLink Binary With Libraries build phase.
- Add the same SQLite.framework to a Copy Files build phase with aFrameworks destination. (Add a new build phase if need be.)
项目主页:http://www.open-open.com/lib/view/home/1412900499530