Comparison

plugins/mod_storage_sql.lua @ 13661:5a7f042fe05d

mod_storage_sql: Fix tests for SQLite3 Tests does not run the code that initializes `sqlite_version`
author Kim Alvefur <zash@zash.se>
date Sat, 08 Feb 2025 12:55:40 +0100
parent 13634:7209769e88bc
comparison
equal deleted inserted replaced
13660:31f8fd2bcab9 13661:5a7f042fe05d
40 40
41 -- COMPAT Support for UPSERT is not in all versions of all compatible databases. 41 -- COMPAT Support for UPSERT is not in all versions of all compatible databases.
42 local function has_upsert(engine) 42 local function has_upsert(engine)
43 if engine.params.driver == "SQLite3" then 43 if engine.params.driver == "SQLite3" then
44 -- SQLite3 >= 3.24.0 44 -- SQLite3 >= 3.24.0
45 return (engine.sqlite_version[2] or 0) >= 24; 45 return engine.sqlite_version and (engine.sqlite_version[2] or 0) >= 24;
46 elseif engine.params.driver == "PostgreSQL" then 46 elseif engine.params.driver == "PostgreSQL" then
47 -- PostgreSQL >= 9.5 47 -- PostgreSQL >= 9.5
48 -- Versions without support have long since reached end of life. 48 -- Versions without support have long since reached end of life.
49 return true; 49 return true;
50 end 50 end