feat: use postcard for redis serde (#6956)

* redo error handling in xredis

* give proper types to metadata fields

* add round-trip tests

* inline loader enum metadata fields

* postcard roundtrips

* prepare

* bump redis key version

* serde-binhum

* clippy

* fix

* fix frontend checking existence of component fields rather than non-null-ness

* prepare
This commit is contained in:
aecsocket
2026-08-05 10:36:05 +00:00
committed by GitHub
parent cc53d9a6f8
commit 5148e8ec35
70 changed files with 1713 additions and 646 deletions
+7 -4
View File
@@ -394,11 +394,13 @@ async fn build_search_documents(
let loader_field_enum_values: Vec<QueryLoaderFieldEnumValue> =
sqlx::query!(
"
SELECT DISTINCT id, enum_id, value, ordering, created, metadata
r#"
SELECT DISTINCT id, enum_id, value, ordering, created,
metadata->>'type' AS "ty?",
(metadata->>'major')::boolean AS "major?"
FROM loader_field_enum_values lfev
ORDER BY enum_id, ordering, created DESC
"
"#
)
.fetch(pool)
.map_ok(|m| QueryLoaderFieldEnumValue {
@@ -407,7 +409,8 @@ async fn build_search_documents(
value: m.value,
ordering: m.ordering,
created: m.created,
metadata: m.metadata,
ty: m.ty,
major: m.major,
})
.try_collect()
.await?;