init(path:configuration:)
Opens or creates an SQLite database.
init(path: String, configuration: Configuration = Configuration()) throws
Parameters
- path
The path to the database file.
- configuration
A configuration.
Throws
A DatabaseError
whenever an SQLite error occurs.
For example:
let dbQueue = try DatabaseQueue(path: "/path/to/database.sqlite")
The SQLite connection is closed when the database queue gets deallocated.