Created
March 29, 2016 19:07
-
-
Save groue/b55210fe94e3594b7759dc204c09d261 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import GRDB | |
/// The shared database queue. | |
var dbQueue: DatabaseQueue! | |
func setupDatabase() { | |
let documentsPath = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true).first! as NSString | |
let databasePath = documentsPath.stringByAppendingPathComponent("db.sqlite") | |
dbQueue = try! DatabaseQueue(path: databasePath) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment