
Wrapper’s Delight - AccordingDay
https://blog.trailofbits.com/2019/08/26/wrappers-delight/
======
pag
This is a really cool SQLite wrapper. One of these things this wrapper lets
you do is bind C++ functions/lambdas to ones in SQLite. You can use that
functionality in things like SQLite expression indexes, or for customizing a
full-text indexer.

One cool example of expression indexes is this: you want to store structured
data (e.g. a protobuf) 'natively' in an SQL database, but still give the
database visibility into the data stored in that serialized protobuf. You can
create an expression index with functions that can read into the protodbuf
data and give SQLite that visibility. Another benefit of things like
expression indexes is storing comrpessed data. E.g. you want to store a big
blob of compressed data, and give SQLite some access to it, but not access to
all of it.

In the near future, we'll be transitioning another open-source Trail of Bits
project, McSema [1], to using this wrapper. McSema currently stores lots of
data in protocol buffers, which isn't very convenient for some reasons.
Transitioning over to an SQLite database, hidden behind an API, is going to
make things a lot nicer.

[1]
[https://github.com/trailofbits/mcsema](https://github.com/trailofbits/mcsema)

