Instance Methodgrdb 7.1.0GRDB

dumpSchema(to:)

Prints the schema of the database.

DatabaseReader+dump.swift:165
func dumpSchema(to stream: (any TextOutputStream)? = nil) throws

Parameters

stream

A stream for text output, which directs output to the console by default.

For example:

try dbQueue.dumpSchema()

This prints the database schema. For example:

sqlite_master
CREATE TABLE player (id INTEGER PRIMARY KEY, name TEXT, score INTEGER)