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

jopen 10年前發布 | 17K 次閱讀 Camembert iOS開發 移動開發

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.baiduhome.net/lib/view/home/1416234257461

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!