Support multiple in-memory databases
Pre-release
Pre-release
This patch was authored and released by @tanner0101.
Adds a new parameter identifier
to SQLiteConfiguration.Storage.memory
(#86, fixes #79).
This string uniquely identifies the in-memory database. Connections that use the same memory identifier share data.
let configuration = SQLiteConfiguration(storage: .memory(identifier: "foo"))
Using .memory
without specifying an identifier will generate a random value. Only connections using that specific configuration will share data. This means multiple connection sources can now be initialized with separate configuration structs in the same process.