Skip to content

Instantly share code, notes, and snippets.

@amolloy
Created June 7, 2014 14:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amolloy/c6f0d577e8e8d1eaf0e3 to your computer and use it in GitHub Desktop.
Save amolloy/c6f0d577e8e8d1eaf0e3 to your computer and use it in GitHub Desktop.
Dealing with instancesOrderedBy: being missing in Swift
Model.inDatabaseSync() { (db) in
let rs = db.executeQuery("SELECT * FROM model ORDER BY foo”, withArgumentsInArray:[])
self.results = Model.instancesFromResultSet(rs)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment