HomePhabricator
Diffusion Comm 6de6e0ea396a

Implement methods in SQLiteQueryExecutor and DatabaseQueryExecutor to store and…

Description

Implement methods in SQLiteQueryExecutor and DatabaseQueryExecutor to store and retrieve current_user_id from SQLite

Summary: This differential defines in DatabaseQueryExecutor abstract class and implements in SQLiteQueryExecutor methods that insert and retrieve id of currently logged user in metadata table in SQLite. The method to retrieve user id will return empty string if there is no such row in metadata table.

Test Plan: Place those functions somewhere in AppDelegate, and place breakpoints where they are called. Build the app with database encryption disabled. Launch the app in the debugger, look at the SQLite database (accessible from terminal if using iOS simulator) before setCurrentUserID is called and afterwards. Ensure metadata table changes.

Reviewers: tomek, jon

Reviewed By: tomek

Subscribers: ashoat, adrian, atul, abosh

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