Skip to content

Support multiple in-memory databases

Pre-release
Pre-release
Compare
Choose a tag to compare
@tanner0101 tanner0101 released this 16 Jul 22:38
442968e
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.