add SQL DB access to everywhere we are using the DB, up to the "C" files

This commit is contained in:
2025-05-27 01:27:04 -06:00
parent 81d4f0c762
commit 7de4125eb7
24 changed files with 511 additions and 119 deletions

View File

@@ -1350,17 +1350,14 @@ export default class AccountViewView extends Vue {
* Processes the identity and updates the component's state.
*/
async processIdentity() {
let account: Account | undefined = undefined;
const platformService = PlatformServiceFactory.getInstance();
const dbAccount = await platformService.dbQuery(
"SELECT * FROM accounts WHERE did = ?",
[this.activeDid],
);
let account: Account | undefined = undefined;
if (dbAccount) {
account = databaseUtil.mapColumnsToValues(
dbAccount.columns,
dbAccount.values,
)[0] as Account;
account = databaseUtil.mapQueryResultToValues(dbAccount)[0] as Account;
}
if (USE_DEXIE_DB) {
account = await retrieveAccountMetadata(this.activeDid);