HomePhabricator
Diffusion Comm 8439faf9c44e

[keyserver] Parse JSON columns returned from MariaDB

Description

[keyserver] Parse JSON columns returned from MariaDB

Summary:
One difference between MySQL and MariaDB is that MySQL has a JSON column type and MariaDB doesn't.

When using MySQL, the mysql2 npm library that we use would detect the column types and if the column has type JSON, it would automatically JSON.parse the result before returning.

This isn't possible with MariaDB, so we have to manually run JSON.parse in our keyserver code.

More details in the Linear issue.

Depends on D4520

Test Plan: I ran the web application and clicked around a bunch. Full test plan will come later

Reviewers: jonringer-comm, atul, palys-swm

Reviewed By: atul

Subscribers: Adrian, yayabosh

Differential Revision: https://phab.comm.dev/D4521

Details

Provenance
ashoatAuthored on Jul 13 2022, 9:53 AM
Reviewer
atul
Differential Revision
D4521: [keyserver] Parse JSON columns returned from MariaDB
Parents
rCOMMc9c5ad27ff0b: [keyserver] Make mediaFromRow return a Promise
Branches
Unknown
Tags
Unknown