Comparison

plugins/mod_storage_sql.lua @ 7008:9beba2572e2b

mod_storage_sql: Fix use of SQLite3 in-memory database (no path expansion)
author Kim Alvefur <zash@zash.se>
date Tue, 15 Dec 2015 13:15:30 +0100
parent 6954:400badaf1fc7
child 7149:bb0fd02ae70f
comparison
equal deleted inserted replaced
7004:ddb03cc4ce04 7008:9beba2572e2b
415 return changes; 415 return changes;
416 end 416 end
417 417
418 local function normalize_params(params) 418 local function normalize_params(params)
419 if params.driver == "SQLite3" then 419 if params.driver == "SQLite3" then
420 params.database = resolve_relative_path(prosody.paths.data or ".", params.database or "prosody.sqlite"); 420 if params.database ~= ":memory:" then
421 params.database = resolve_relative_path(prosody.paths.data or ".", params.database or "prosody.sqlite");
422 end
421 end 423 end
422 assert(params.driver and params.database, "Configuration error: Both the SQL driver and the database need to be specified"); 424 assert(params.driver and params.database, "Configuration error: Both the SQL driver and the database need to be specified");
423 return params; 425 return params;
424 end 426 end
425 427