diff --git a/Playgrounds/Tour.playground/Contents.swift b/Playgrounds/Tour.playground/Contents.swift index 29522bce4..0bc4a80c3 100644 --- a/Playgrounds/Tour.playground/Contents.swift +++ b/Playgrounds/Tour.playground/Contents.swift @@ -29,10 +29,11 @@ try dbQueue.inDatabase { db in "longitude DOUBLE NOT NULL" + ")") - let parisId = try db.execute( + try db.execute( "INSERT INTO pointOfInterests (title, favorite, latitude, longitude) " + "VALUES (?, ?, ?, ?)", - arguments: ["Paris", true, 48.85341, 2.3488]).insertedRowID! + arguments: ["Paris", true, 48.85341, 2.3488]) + let parisId = db.lastInsertedRowID } @@ -126,4 +127,4 @@ try dbQueue.inDatabase { db in .filter(favorite) .order(title) .fetchAll(db) -} \ No newline at end of file +}