Add support for in-memory database

Set "Database" parameter in config to ":memory:" to enable.