From 141dc247d6665c78fa09c3cf05734efdc5313b29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Wed, 21 Sep 2016 19:51:23 +0200 Subject: [PATCH] Playgrounds/MyPlayground.swift --- GRDB.xcworkspace/contents.xcworkspacedata | 3 +++ .../MyPlayground.playground/Contents.swift | 15 +++++++++++++++ .../MyPlayground.playground/contents.xcplayground | 4 ++++ 3 files changed, 22 insertions(+) create mode 100644 Playgrounds/MyPlayground.playground/Contents.swift create mode 100644 Playgrounds/MyPlayground.playground/contents.xcplayground diff --git a/GRDB.xcworkspace/contents.xcworkspacedata b/GRDB.xcworkspace/contents.xcworkspacedata index f4af6ae62..2ca194e1e 100644 --- a/GRDB.xcworkspace/contents.xcworkspacedata +++ b/GRDB.xcworkspace/contents.xcworkspacedata @@ -22,6 +22,9 @@ + + diff --git a/Playgrounds/MyPlayground.playground/Contents.swift b/Playgrounds/MyPlayground.playground/Contents.swift new file mode 100644 index 000000000..a0161407e --- /dev/null +++ b/Playgrounds/MyPlayground.playground/Contents.swift @@ -0,0 +1,15 @@ +// To run this playground, select and build the GRDBOSX scheme. + +import GRDB + +let path = "/tmp/database.sqlite" +var configuration = Configuration() +configuration.trace = { print($0) } +let dbQueue = try! DatabaseQueue(path: path, configuration: configuration) + +try! dbQueue.inDatabase { db in + try db.create(table: "persons", ifNotExists: true) { t in + t.column("id", .integer).primaryKey() + t.column("name", .text) + } +} diff --git a/Playgrounds/MyPlayground.playground/contents.xcplayground b/Playgrounds/MyPlayground.playground/contents.xcplayground new file mode 100644 index 000000000..63b6dd8df --- /dev/null +++ b/Playgrounds/MyPlayground.playground/contents.xcplayground @@ -0,0 +1,4 @@ + + + + \ No newline at end of file