Sqlite message encryption #17

Closed mrry.band
targeting main
Closed opened by and assigned to mrry.band
targeting main

When I went to implement storing/retrieving encryption in SQLite, I had to change a bunch of very similar queries over and over. Missing any of them would have been a bug. So I decided to go back and do a refactor first to extract the common elements so that when I go back to adding the encryption column there's fewer changes to make.

messageColumns is a function because the exact columns do vary from query to query, while still generally having the same base set of columns. Therefore the function allows adding extra columns and replacing columns (e.g. sort_id). I probably got a little carried away here, but I did have fun writing this. And that's what we're here for, right? Or is it providing value to the shareholders, I can never remember.

I could do something different with messageColumns if there are strong feelings about it.

versionedMessageColumns is just a string because it has no required variations, so there was no need to get fancy, even though I wanted to a little bit.

This pull request has no versions submitted yet.