Page MenuHomePhabricator

[keyserver] Parse JSON columns returned from MariaDB
ClosedPublic

Authored by ashoat on Jul 13 2022, 10:36 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 16, 12:21 AM
Unknown Object (File)
Mon, Dec 16, 12:20 AM
Unknown Object (File)
Sun, Dec 15, 7:27 AM
Unknown Object (File)
Sun, Dec 15, 7:27 AM
Unknown Object (File)
Sun, Dec 15, 7:26 AM
Unknown Object (File)
Sun, Dec 15, 7:22 AM
Unknown Object (File)
Sat, Dec 7, 3:12 PM
Unknown Object (File)
Thu, Dec 5, 6:24 AM

Details

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

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Jul 15 2022, 1:26 PM