Skip to content

Case

SQLiteConfiguration.Storage.memory(identifier:)

Specify an SQLite database stored in memory, using a given identifier string.
case memory(identifier: String)

Parameters

identifier

Uniquely identifies the in-memory storage. Multiple connections may use this identifier to connect to the same in-memory storage for the duration of its lifetime. The identifer has no predefined format or restrictions on its content.

Discussion

An in-memory database persists only until the last connection to it is closed. If a new connection is opened after that point, even using the same identifier, a new, empty database is created.