Open
Description
Blocks on #789
After an operation that potentially modifies the stored bso data, the meta data information should be updated after the status is returned to the client.
An example SQL function may be:
UPDATE user_collections SET count=(
SELECT COUNT(*) FROM BSOS WHERE
FXA_UID="000148c5a52fda4e413625bd0287b6aec7f509f48717bc8de9f8df58308accfc" and
FXA_KID="31008d7c3f916aaf744dbe4121dc5d0e"
and collection_id=7
), total_bytes = (
SELECT sum(byte_length(payload)) from BSOS WHERE
FXA_UID="000148c5a52fda4e413625bd0287b6aec7f509f48717bc8de9f8df58308accfc" and
FXA_KID="31008d7c3f916aaf744dbe4121dc5d0e"
and collection_id=7
)
where
FXA_UID="000148c5a52fda4e413625bd0287b6aec7f509f48717bc8de9f8df58308accfc" and
FXA_KID="31008d7c3f916aaf744dbe4121dc5d0e"
and collection_id=7
(Example is illustrative. Some optimization may be required.)