Load ALL table rows for a workspace (for sending to server).
(workspaceId: string)
| 215 | |
| 216 | /** Load ALL table rows for a workspace (for sending to server). */ |
| 217 | async loadAll(workspaceId: string): Promise<{ name: string; rows: any[] }[]> { |
| 218 | const db = await openDB(); |
| 219 | try { |
| 220 | const store = txStore(db, 'readonly', STORE_TABLE_DATA); |
| 221 | const index = store.index('workspaceId'); |
| 222 | const entries: TableDataEntry[] = await reqToPromise(index.getAll(workspaceId)); |
| 223 | return entries.map(e => ({ name: e.tableId, rows: e.rows })); |
| 224 | } finally { |
| 225 | db.close(); |
| 226 | } |
| 227 | }, |
| 228 | |
| 229 | /** Delete one table's data. */ |
| 230 | async delete(workspaceId: string, tableId: string): Promise<void> { |
nothing calls this directly
no test coverage detected