(rowKey: string | number, hashedQuerKey: string)
| 700 | |
| 701 | // Helper function to remove a row from the internal state |
| 702 | const removeRow = (rowKey: string | number, hashedQuerKey: string) => { |
| 703 | const rowToQueriesSet = rowToQueries.get(rowKey) || new Set() |
| 704 | rowToQueriesSet.delete(hashedQuerKey) |
| 705 | rowToQueries.set(rowKey, rowToQueriesSet) |
| 706 | |
| 707 | const queryToRowsSet = queryToRows.get(hashedQuerKey) || new Set() |
| 708 | queryToRowsSet.delete(rowKey) |
| 709 | queryToRows.set(hashedQuerKey, queryToRowsSet) |
| 710 | |
| 711 | return rowToQueriesSet.size === 0 |
| 712 | } |
| 713 | |
| 714 | const internalSync: SyncConfig<any>[`sync`] = (params) => { |
| 715 | const { begin, write, commit, markReady, collection, metadata } = params |
no test coverage detected