Skip to content

Commit 1aef9ab

Browse files
Created a test project to confirm that building works.
Also made minor modifications to the code of the main library so that it will build with Xcode 6.0 OK. This involved switching assertionFailures into printlns, but I added breakpoints for this.
1 parent fa3b435 commit 1aef9ab

File tree

14 files changed

+884
-3
lines changed

14 files changed

+884
-3
lines changed

SQLite Common/Database.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ public final class Database {
243243
///
244244
/// :returns: The last statement executed, successful or not.
245245
private func transaction(mode: TransactionMode, _ statements: [@autoclosure () -> Statement]) -> Statement {
246-
var transaction = run("BEGIN \(mode.rawValue) TRANSACTION")
246+
var transaction = run("BEGIN \(mode.toRaw()) TRANSACTION")
247247
// FIXME: rdar://18479820 // for statement in statements { transaction = transaction && statement() }
248248
for idx in 0..<statements.count { transaction = transaction && statements[idx]() }
249249
transaction = transaction && run("COMMIT TRANSACTION")
@@ -328,7 +328,9 @@ public final class Database {
328328
}
329329

330330
private func try(block: @autoclosure () -> Int32) {
331-
if block() != SQLITE_OK { assertionFailure("\(lastError)") }
331+
if block() != SQLITE_OK {
332+
println("\(lastError)")
333+
}
332334
}
333335

334336
}

SQLite Common/Statement.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ extension Statement: GeneratorType {
229229
case SQLITE_TEXT:
230230
row.append(String.fromCString(UnsafePointer<CChar>(sqlite3_column_text(handle, Int32(idx))))!)
231231
case let type:
232-
assertionFailure("unsupported column type: \(type)")
232+
println("unsupported column type: \(type)")
233233
}
234234
}
235235
return row
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDESourceControlProjectFavoriteDictionaryKey</key>
6+
<false/>
7+
<key>IDESourceControlProjectIdentifier</key>
8+
<string>8B1A5880-A98B-463F-9F07-4F9BA77AA3C8</string>
9+
<key>IDESourceControlProjectName</key>
10+
<string>SQLite</string>
11+
<key>IDESourceControlProjectOriginsDictionary</key>
12+
<dict>
13+
<key>3AE8ED2E684071AF4FB151FA51BF266B82FF45BD</key>
14+
<string>https://github.com/programmingthomas/SQLite.swift.git</string>
15+
</dict>
16+
<key>IDESourceControlProjectPath</key>
17+
<string>SQLite.xcodeproj</string>
18+
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
19+
<dict>
20+
<key>3AE8ED2E684071AF4FB151FA51BF266B82FF45BD</key>
21+
<string>../..</string>
22+
</dict>
23+
<key>IDESourceControlProjectURL</key>
24+
<string>https://github.com/programmingthomas/SQLite.swift.git</string>
25+
<key>IDESourceControlProjectVersion</key>
26+
<integer>111</integer>
27+
<key>IDESourceControlProjectWCCIdentifier</key>
28+
<string>3AE8ED2E684071AF4FB151FA51BF266B82FF45BD</string>
29+
<key>IDESourceControlProjectWCConfigurations</key>
30+
<array>
31+
<dict>
32+
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
33+
<string>public.vcs.git</string>
34+
<key>IDESourceControlWCCIdentifierKey</key>
35+
<string>3AE8ED2E684071AF4FB151FA51BF266B82FF45BD</string>
36+
<key>IDESourceControlWCCName</key>
37+
<string>SQLite.swift</string>
38+
</dict>
39+
</array>
40+
</dict>
41+
</plist>

0 commit comments

Comments
 (0)