HomePhabricator
Diffusion Comm 66b8401f6f21

[native][web] Add fts5 extension to SQLite

Description

[native][web] Add fts5 extension to SQLite

Summary:
issue: ENG-8784
FTS5 docs: https://www.sqlite.org/fts5.html
To add fts5 we need to add a compile flag to SQLite. We need to do this on web, iOS and Android.
For iOS I had to add patch to our SQLCipher amalgamation

Test Plan:
Before leaving, @kamil instructed me to verify the .wasm size changes caused by adding the library.
I did the following:
1.Checked size of web/shared-worker/_generated/comm_query_executor.wasm
2.Added -DSQLITE_ENABLE_FTS5 flag to SQLITE_COMPILATION_FLAGS in web/scripts/run_emscripten.sh
3.Ran yarn cleaninstall
4.Ran yarn build-db-wasm
5.Checked the size again

The first size was 2 233 808 bytes, the second 2 334 379 bytes. That doesn't seem too bad.

I also added code that creates a virtual fts5 table (next diff) and run web, iOS and Andorid. Checked that no errors are shown.

Reviewers: marcin, tomek, kamil

Reviewed By: marcin, kamil

Subscribers: ashoat, kamil

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

Details

Provenance
inkaAuthored on Jul 8 2024, 6:56 AM
Reviewer
marcin
Differential Revision
D12693: [native][web] Add fts5 extension to SQLite
Parents
rCOMM139ef005b33b: [terraform] Avoid including Terraform *.tfstate.backup in keyserver docker…
Branches
Unknown
Tags
Unknown