aboutsummaryrefslogtreecommitdiffstats
path: root/util/sqlite3.lua
Commit message (Collapse)AuthorAgeFilesLines
* util.sqlite3: Clean up unused variablesKim Alvefur2023-07-221-42/+6
| | | | | Many leftovers from the earlier version of util.sql this was based on and cleanup applied there since then.
* util.sqlite3: Don't cache prepared statements for one-off queriesKim Alvefur2023-06-101-10/+8
| | | | | | | | | 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.
* util.sqlite3: Deduplicate query methodsKim Alvefur2023-06-101-34/+27
| | | | | | | | | | | | | | 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.
* util.sqlite3: Fix indentationKim Alvefur2023-06-101-5/+7
|
* util: Prefix module imports with prosody namespaceKim Alvefur2023-03-171-2/+2
|
* mod_storage_sql: Record connection to database as module statusKim Alvefur2023-01-301-2/+6
| | | | | | Allows retrieving this in e.g. a health reporting module Thanks pfak
* util.sqlite3: Skip prepared statements when no parameters are givenKim Alvefur2022-08-011-0/+10
| | | | | Seems CREATE INDEX is unhappy as a prepared statement. Perhaps because the table has not been COMMIT-ed yet?
* util.sqlite3: Create util.error registry from headersKim Alvefur2021-10-011-35/+44
| | | | The 'type' fields are a first guess.
* util.sqlite3: SQLite3-only variant of util.sql using LuaSQLite3Kim Alvefur2022-08-011-0/+390
http://lua.sqlite.org/