mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-28 04:24:20 +00:00
Show trigger comments for expanded statement tracing
This commit is contained in:
1 parent
9f41e56c32
commit
1c60e5ef42
1 file changed
+4
@@ -2101,6 +2101,10 @@ extension Database {
|
||||
/// information from leaking in unexpected locations, so use this
|
||||
/// property with care.
|
||||
public var expandedSQL: String {
|
||||
if let unexpandedSQL {
|
||||
let sql = String(cString: unexpandedSQL)
|
||||
if sql.hasSuffix("--") { return sql }
|
||||
}
|
||||
guard let cString = sqlite3_expanded_sql(sqliteStatement) else {
|
||||
return ""
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user