November 2018
Intermediate to advanced
404 pages
10h 16m
English
You may follow the same steps for setting up a PostgreSQL database connection to create a SQLite database. All the setup for the SQLite database goes to the initializeJournalRoutes(app:) function in JournalRoutes.swift.
let pool = SQLiteConnection.createPool(filename: "sqlite.db", poolOptions: ConnectionPoolOptions(initialCapacity: 10, maxCapacity: 30, timeout: 10000)) Database.default = Database(pool)
ConnectionPool allows you to support multiple connections to your SQLite database. If you omit a filename, your database will be in-memory.
Read now
Unlock full access