Kim Alvefur
65a654d726
mod_storage_sql: Add index covering sort_id to improve performance ( fixes #1505 )
6 years ago
Matthew Wild
cb6148d155
storagemanager, mod_storage_sql: Rename methods to :get_all() and :delete_all()
6 years ago
Matthew Wild
33b9b2b91e
mod_storage_sql: Add map_store:find_key() and map_store:delete_key() (+ tests)
6 years ago
Kim Alvefur
6e53a3a601
mod_storage_sql: Move update limit check back one step, fixes traceback
...
0c00274528a4 moved it one step too far, so the check was performed
before connecting to the database instead of after.
6 years ago
Kim Alvefur
84e0c87b7e
mod_storage_sql: Fix check for deletion limits ( fixes #1494 )
...
The check was only performed if sql_manage_tables was set to true (the default)
It should always be performed
6 years ago
Kim Alvefur
96c1406bcd
mod_storage_sql: Remove unused and not actually returned return value [luacheck]
...
The :delete throws an error, it does not return one like this.
6 years ago
Kim Alvefur
e5423a5f05
mod_storage_sql: Handle SQLite DELETE with LIMIT being optional ( fixes #1359 )
7 years ago
Kim Alvefur
e54ee56ed1
mod_storage_sql: Move code out of if-else chain
7 years ago
Kim Alvefur
9d5e31fd48
mod_storage_*: Also include timestmap of first message in :summary API
...
For completeness along with most recent timestamp. Might be nice to be
able to order by oldest unread message.
6 years ago
Kim Alvefur
d3c559bcc8
mod_storage_*: Include timestamp of latest message in :summary API
...
Clients may want to show a list of conversations ordered by how
timestamp of most recent message.
The counts allow a badge with unread message counter.
6 years ago
Kim Alvefur
39cb87a158
mod_storage_*: Tweak :summary API to allow future expansion with more fields
...
Eg might want to include last message, timestamp, chat state or other info.
6 years ago
Kim Alvefur
2a65eae651
mod_storage_sql: Ignore shadowed error variable [luacheck]
7 years ago
Kim Alvefur
7b63f8d95d
mod_storage_sql: Fix to use correct arguments to archive id lookup
7 years ago
Kim Alvefur
5a2a81bfe9
mod_storage_sql: Correctly return item-not-found error
...
`return ok, err` comes out as `transaction_ok, ok, err`
7 years ago
Kim Alvefur
a770a84306
mod_storage_sql: Look up archive IDs in separate queries ( fixes #1325 )
...
This is probably not good for performance.
7 years ago
Kim Alvefur
40040cdfbc
mod_storage_sql: Add support for iterating over users in archive stores
7 years ago
Matthew Wild
813f69fd2b
mod_storage_sql: Catch errors during schema upgrade (thanks Nothing4You)
7 years ago
Kim Alvefur
c5d487e42d
mod_storage_sql: Handle Lua 5.3 move of unpack function
7 years ago
Matthew Wild
fcdc8d9ff1
mod_storage_sql: Fix issue number in comment that was fixed by 55b40f3fa659 ( fixes #1073 )
7 years ago
Matthew Wild
1faf1773a3
mod_storage_sql: Keep prosodyarchive_index unique constraint on non-MySQL DBs
7 years ago
Matthew Wild
06cdd9edcd
mod_storage_sql: Change prosodyarchive_index to be non-unique ( fixes #1087 )
...
MySQL requires that the first 20 bytes are unique, even if they differ after
the first 20 bytes. This breaks e.g. pubsub/PEP nodes longer than 20 characters
that have common prefixes.
7 years ago
Matthew Wild
9423dbfdb3
mod_storage_sql: Have :users() throw an error on failure instead of returning non-iterator values
7 years ago
Matthew Wild
21e358c847
mod_storage_sql: Workaround MySQL not supporting LIMIT subquery in archive truncate operations, fixes #1200
7 years ago
Kim Alvefur
c7ef245c0b
mod_storage_sql: Remove unused function argument [luacheck]
...
What was the intent of this argument anyways?
7 years ago
Kim Alvefur
cf3af7a85c
mod_storage_sql: Index over contact and timestamp (happy now Ge0rg?)
8 years ago
Kim Alvefur
a7693939d4
mod_storage_sql: Add indices that include the with and when columns of archives
8 years ago
Kim Alvefur
ce996cdb1c
mod_storage_sql: Also clear the prosodyarchive table when an user is deleted ( fixes #1009 )
8 years ago
Kim Alvefur
50611461f2
mod_storage_sql: Remove return values from purge method
8 years ago
Matthew Wild
4812b7e07c
mod_storage_sql: Fix logic error introduced by variable rename in aa9f198cb3c9 (thanks waqas)
9 years ago
Kim Alvefur
caf3175a5f
mod_storage_sql: Limit encoding check to current database
9 years ago
Kim Alvefur
8aaba12933
mod_storage_sql: Break long lines
9 years ago
Kim Alvefur
d938b42d8f
mod_storage_sql: Pass charset and collation names via variable binding
9 years ago
Kim Alvefur
a03638bd16
mod_storage_sql: Quote some field names
9 years ago
Kim Alvefur
c49d0d5b77
mod_storage_sql: Raise error if encoding check query fails
9 years ago
Kim Alvefur
91baabfede
SQL: Use standard quotes for columns and other identifiers, rewrite to grave accents for MySQL only ( fixes #885 )
9 years ago
Kim Alvefur
32e5f29192
mod_storage_sql: Fix to use correct SQL query (thanks carlos)
9 years ago
Kim Alvefur
67572368f2
mod_storage_sql: Remove unused return values (should those actually be used?)
9 years ago
Kim Alvefur
dd86b147bf
mod_storage_sql: Ignore name clash [luacheck]
9 years ago
Kim Alvefur
ee705afbef
mod_storage_sql: Split long lines [luacheck]
9 years ago
Kim Alvefur
d5205416d5
mod_storage_sql: Ignore name clash [luacheck]
9 years ago
Kim Alvefur
29c30180ee
mod_storage_sql: Pass SQL engine as an argument to upgrade and table creator functions
9 years ago
Kim Alvefur
61d955084f
mod_storage_sql: Move SQL queries into multiline strings for readability [luacheck]
9 years ago
Kim Alvefur
fbd4f04b73
mod_storage_sql: Rename variables to avoid name clashes [luacheck]
9 years ago
Kim Alvefur
b33ad7f001
mod_storage_sql: Sensible defaults for 'when' and 'with' arguments
9 years ago
Kim Alvefur
1113bbdf22
mod_storage_sql: Remove compat for argument order change
9 years ago
Kim Alvefur
18b6b5c90b
mod_storage_sql: Catch and report value deserialization errors
8 years ago
Kim Alvefur
852564c14e
mod_storage_sql: Remove ability to override name of key-value table (unreachable and would not work)
8 years ago
Kim Alvefur
01d628a547
mod_storage_sql: Add support for truncating deletion
8 years ago
Kim Alvefur
10bc92f25d
mod_storage_sql: Make archive:append() to return the id (or key) as first return value
9 years ago
Kim Alvefur
1d99ff3da6
mod_storage_sql: Fix to use correct order for return values from transaction (thanks postblue)
9 years ago