QuoteDumpFormat
A format that prints one line per database row, formatting values as SQL literals.
struct QuoteDumpFormat
For example:
// 'Arthur',500
// 'Barbara',1000
// 'Craig',200
try db.dumpRequest(Player.all(), format: .quote())
A format that prints one line per database row, formatting values as SQL literals.
struct QuoteDumpFormat
For example:
// 'Arthur',500
// 'Barbara',1000
// 'Craig',200
try db.dumpRequest(Player.all(), format: .quote())
import GRDB
A toolkit for SQLite databases, with a focus on application development
struct DebugDumpFormat
A format that prints one line per database row, suitable for debugging.
struct JSONDumpFormat
A format that prints database rows as a JSON array.
struct LineDumpFormat
A format that prints one line per database value. All blob values are interpreted as strings.
struct ListDumpFormat
A format that prints one line per database row. All blob values are interpreted as strings.
struct DumpStream
A text output stream suited for printing database content.
protocol Copyable
A type whose values can be implicitly or explicitly copied.
protocol DumpFormat
A type that prints database rows.
protocol Escapable
protocol Sendable
init(header: Bool = false, separator: String = ",")
Creates a QuoteDumpFormat
.
var header: Bool
A boolean value indicating if column labels are printed as the first line of output.
var separator: String
The separator between values.
mutating func finalize(_ db: Database, statement: Statement, to stream: inout DumpStream)
mutating func writeRow(_ db: Database, statement: Statement, to stream: inout DumpStream)
static func quote(header: Bool = false, separator: String = ",") -> Self
A format that prints one line per database row, formatting values as SQL literals.