Skip to content

Commit 8431ca3

Browse files
committed
Conform to Printable, not DebugPrintable
DebugPrintable provides valuable information for debugging when left to the defaults. Meanwhile, let Database/Statement be printable: - Database prints the path - Statement prints the raw SQL Signed-off-by: Stephen Celis <[email protected]>
1 parent e55fb57 commit 8431ca3

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

SQLite/Database.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -468,10 +468,11 @@ public final class Database {
468468

469469
}
470470

471-
extension Database: DebugPrintable {
471+
// MARK: - Printable
472+
extension Database: Printable {
472473

473-
public var debugDescription: String {
474-
return "Database(\(String.fromCString(sqlite3_db_filename(handle, nil))!))"
474+
public var description: String {
475+
return String.fromCString(sqlite3_db_filename(handle, nil))!
475476
}
476477

477478
}

SQLite/Statement.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,11 +207,11 @@ extension Statement: GeneratorType {
207207

208208
}
209209

210-
// MARK: - DebugPrintable
211-
extension Statement: DebugPrintable {
210+
// MARK: - Printable
211+
extension Statement: Printable {
212212

213-
public var debugDescription: String {
214-
return "Statement(\"\(String.fromCString(sqlite3_sql(handle))!)\")"
213+
public var description: String {
214+
return String.fromCString(sqlite3_sql(handle))!
215215
}
216216

217217
}

0 commit comments

Comments
 (0)