Kim Alvefur <zash@zash.se> [Fri, 16 Jun 2023 13:03:34 +0200] rev 13158
mod_storage_sql: Enable UPSERT with PostgreSQL
Tested. Works.
Kim Alvefur <zash@zash.se> [Fri, 16 Jun 2023 13:02:35 +0200] rev 13157
doap: Fix typo in attribute name
Kim Alvefur <zash@zash.se> [Wed, 14 Jun 2023 13:39:39 +0200] rev 13156
util.pposix: Use Lua enum API for resource limit name argument
Because diffstat.
Kim Alvefur <zash@zash.se> [Sun, 11 Jun 2023 20:25:50 +0200] rev 13155
mod_storage_sql: Add some TODO comments for future UPSERT work
Kim Alvefur <zash@zash.se> [Sun, 11 Jun 2023 20:05:32 +0200] rev 13154
mod_storage_sql: Do not keep track of quota when no quota is set
No point in doing this expensive O(n) query if the result is not used
for anything.
Will still cache the total item count if an explicit query for this is
performed, then try to keep it updated with new items added. Will likely
forget eventually tho.
Kim Alvefur <zash@zash.se> [Sun, 11 Jun 2023 17:04:11 +0200] rev 13153
mod_storage_sql: Add setting to tune SQLite3 performance vs safety
Notably the default journal_mode of DELETE is somewhat slow, some users
might want to catch up to the amazing performance of internal storage.
Kim Alvefur <zash@zash.se> [Sat, 10 Jun 2023 14:01:56 +0200] rev 13152
mod_storage_sql: Record all SQLite3 compile options for potential use
Knowing what features are available could be useful for future
experiments. For example, with the JSON module or full text search.
Kim Alvefur <zash@zash.se> [Sat, 10 Jun 2023 22:20:26 +0200] rev 13151
util.sqlite3: Don't cache prepared statements for one-off queries
The :execute method is mainly used for one-off queries such as creating
tables and indices. There is no need to cache this prepared statement,
as those queries are only done on startup.
Further, prepared statements can't be reused without being reset, so
this was likely broken anyway.
Kim Alvefur <zash@zash.se> [Sat, 10 Jun 2023 22:02:15 +0200] rev 13150
util.sqlite3: Deduplicate query methods
There were 3 very similar methods:
- :execute()
- :execute_query()
- :execute_update()
The first one returns the prepared statement and is mainly used
internally in the library for CREATE statements.
The later two only really differ in how the results are returned.
Those two are one main method and one small one that only picks out the
iterator.
Kim Alvefur <zash@zash.se> [Sat, 10 Jun 2023 22:00:43 +0200] rev 13149
util.sqlite3: Fix indentation