SQLite.swift
- 授权协议: MIT
- 开发语言: Swift
- 操作系统: iOS
- 软件首页: https://github.com/stephencelis/SQLite.swift
- 软件文档: https://github.com/stephencelis/SQLite.swift
软件介绍
SQLite.swift 是一个使用纯 Swift 语言封装 SQLite3 的操作框架。
特性:
简单的查询和参数绑定接口
安全、自动类型数据访问
隐式提交和回滚接口
开发者友好的错误处理和调试
文档完善
通过广泛测试
示例代码:
import SQLite
let db = Database("path/to/db.sqlite3")
db.execute(
"CREATE TABLE users (" +
"id INTEGER PRIMARY KEY, " +
"email TEXT NOT NULL UNIQUE, " +
"manager_id INTEGER, " +
"FOREIGN KEY(manager_id) REFERENCES users(id)" +
")"
)
let stmt = db.prepare("INSERT INTO users (email) VALUES (?)")
for email in ["alice@example.com", "betsy@example.com"] {
stmt.run(email)
}
db.totalChanges // 2
db.lastChanges // {Some 1}
db.lastID // {Some 2}
for row in db.prepare("SELECT id, email FROM users") {
println(row)
// [Optional(1), Optional("betsy@example.com")]
// [Optional(2), Optional("alice@example.com")]
}
db.scalar("SELECT count(*) FROM users") // {Some 2}
let jr = db.prepare("INSERT INTO users (email, manager_id) VALUES (? ?)")
db.transaction(
stmt.run("dolly@example.com"),
jr.run("emery@example.com", db.lastID)
)
Spring Boot实战
[美]克雷格·沃斯 / 丁雪丰 / 人民邮电出版社 / 2016-9 / 59.00元
本书以Spring应用程序开发为中心,全面讲解如何运用Spring Boot提高效率,使应用程序的开发和管理更加轻松有趣。作者行文亲切流畅,以大量示例讲解了Spring Boot在各类情境中的应用,内容涵盖起步依赖、Spring Boot CLI、Groovy、Grails、Actuator。对于Spring Boot开发应用中较为繁琐的内容,附录奉上整理完毕的表格,一目了然,方便读者查阅。一起来看看 《Spring Boot实战》 这本书的介绍吧!
