简化 iOS 和 OS X 的 SQLite 3 使用:Camembert

jopen 10年前

Camembert 是一采用 Swift 编写的工具,用于简化 iOS 和 OS X 的 SQLite 3 使用,你可以用一种非常简单的方式存储所有数据。

Create a new element

var newBook = Book()  newBook.title = "La Fontaine : Fables"  newBook.numberPage = 544  newBook.currentPage = 43  newBook.push()

As you can see for creating a new element, you just need to create a new object, and call the push method. If the table doest not exist yet, it will be created automatly.

Update element

var newBook = Book()  newBook.title = "La Fontaine : Fables"  newBook.numberPage = 544  newBook.currentPage = 43  newBook.push()    //...    newBook.currentPage = 103  newBook.update()

项目主页:http://www.open-open.com/lib/view/home/1416234257461