HomePhabricator
Diffusion Comm bd523b2a5403

[web-db] add function for parsing SQLite query

Description

[web-db] add function for parsing SQLite query

Summary:
Function will help work with query results.
For this table:

idx|text
1|test1
2|test2

sql.js result is:

[
  {
    columns: ['idx', 'text'],
    values: [
      [1, 'test1'],
      [2, 'test2'],
    ],
  },
];

This function converts this into:

[
   { idx: 1, text: 'test1' },
   { idx: 2, text: 'test2' },
]

Test Plan: Run tests from D7119

Reviewers: michal, tomek, ashoat

Reviewed By: ashoat

Subscribers: ashoat, atul

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

Details

Provenance
kamilAuthored on Mar 21 2023, 3:50 AM
Reviewer
ashoat
Differential Revision
D7118: [web-db] add function for parsing SQLite query
Parents
rCOMM83b3550cd01b: [web-db] add unit tests for worker crypto utils
Branches
Unknown
Tags
Unknown