import Foundation /// A format that prints one line per database value. All blob values /// are interpreted as strings. /// /// For example: /// /// ```swift /// // name = Arthur /// // score = 500 /// // /// // name = Barbara /// // score = 1000 /// try db.dumpRequest(Player.all(), format: .line()) /// ``` public struct LineDumpFormat: Sendable { /// The string to print for NULL values. public var nullValue: String var firstRow = true /// Creates a `LineDumpFormat`. /// /// - Parameters: /// - nullValue: The string to print for NULL values. public init( nullValue: String = "") { self.nullValue = nullValue } } extension LineDumpFormat: DumpFormat { public mutating func writeRow( _ db: Database, statement: Statement, to stream: inout DumpStream) { var lines: [(column: String, value: String)] = [] let sqliteStatement = statement.sqliteStatement for index in 0.. Self { LineDumpFormat(nullValue: nullValue) } }