Software /
code /
prosody
Changeset
13318:4a437dd62cc9
mod_storage_sql: Use UUIDv7 as keys
Potentially allows sorting on those directly as they will be in
increasing order.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 17 Jul 2023 04:30:35 +0200 |
parents | 13317:e6a5f196fc1f |
children | 13319:6d6291dfe735 |
files | plugins/mod_storage_sql.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_storage_sql.lua Sun Aug 15 14:44:21 2021 +0200 +++ b/plugins/mod_storage_sql.lua Mon Jul 17 04:30:35 2023 +0200 @@ -366,7 +366,7 @@ item_count = item_count - result:affected(); end else - key = uuid.generate(); + key = uuid.v7(); end local t, encoded_value = assert(serialize(value)); engine:insert(insert_sql, host, user or "", store, when, with, key, t, encoded_value);