Skip to content

Commit 1c60e5e

Browse files
committed
Show trigger comments for expanded statement tracing
1 parent 9f41e56 commit 1c60e5e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

GRDB/Core/Database.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2101,6 +2101,10 @@ extension Database {
21012101
/// information from leaking in unexpected locations, so use this
21022102
/// property with care.
21032103
public var expandedSQL: String {
2104+
if let unexpandedSQL {
2105+
let sql = String(cString: unexpandedSQL)
2106+
if sql.hasSuffix("--") { return sql }
2107+
}
21042108
guard let cString = sqlite3_expanded_sql(sqliteStatement) else {
21052109
return ""
21062110
}

0 commit comments

Comments
 (0)