SwiftFFDB is a Object/Relational Mapping (ORM) support to iOS and Perfect-Server library.Since SwiftFFDB is build on top of FMDB. if you use Objective-C,you can use FFDB
var person = Person()
person.name = "fidetro"
person.insert()
Select
// find all Object
Person.select(where: nil)
// find name is 'fidetro'
Person.select(where: "name = 'fidetro'")
Update
// update name is 'fidetro' to 'ffdb'
Person.update(set: "name = ?", where: "name = ?", values: ["ffdb","fidetro"])
Delete
// find name is 'fidetro'
let personList = Person.select(where: "name = 'fidetro'")
for (let person in personList){
// delete this person in database
person.delete()
}
SwiftFFDB
中文文档
SwiftFFDB is a Object/Relational Mapping (ORM) support to iOS and Perfect-Server library.Since SwiftFFDB is build on top of FMDB.
if you use Objective-C,you can use FFDB
Wiki
More examples of usage in the wiki(unfinished)
Requirements
iOS
Installing
CocoaPod
SwiftFFDB can be installed using CocoaPod
Then,edit the Podfile,add SwiftFFDB:
Useage
Setting
You can check out the example project if you use in iOS:
Create
create table model would you look like this:
Insert
Select
Update
Delete
also you can:
Architecture
Support
SwiftFFDB
is a personal open source project,but I happy to answer questions in Issues or email to zykzzzz@hotmail.com