(rootRowId: Id)
| 695 | synchronizeTransactions(queryId, rootStore, selectJoinWhereStore); |
| 696 | |
| 697 | const writeSelectRow = (rootRowId: Id) => { |
| 698 | const getJoinCell = (arg1: Id | true, arg2?: Id, arg3?: Id) => { |
| 699 | const joinedTableId = isTrue(arg1) ? arg2 : arg1; |
| 700 | const joinedCellId = isTrue(arg1) ? arg3 : arg2; |
| 701 | if (isUndefined(joinedCellId)) { |
| 702 | return rootStore.getCell(tableId, rootRowId, arg1 as Id); |
| 703 | } |
| 704 | if (joinedTableId === tableId && !isTrue(arg1)) { |
| 705 | return rootStore.getCell(tableId, rootRowId, joinedCellId); |
| 706 | } |
| 707 | const join = mapGet(joins, joinedTableId as Id) as JoinClause; |
| 708 | return isUndefined(join) |
| 709 | ? undefined |
| 710 | : join[5].getCell( |
| 711 | join[0], |
| 712 | mapGet(join[4], rootRowId)?.[0] as Id, |
| 713 | joinedCellId, |
| 714 | ); |
| 715 | }; |
| 716 | selectJoinWhereStore.transaction(() => |
| 717 | arrayEvery(wheres, (where) => where(getJoinCell)) |
| 718 | ? mapForEach(selects, (asCellId, tableCellGetter) => |
| 719 | (selectJoinWhereStore as ProtectedStore)._[5]( |
| 720 | queryId, |
| 721 | rootRowId, |
| 722 | asCellId, |
| 723 | tableCellGetter(getJoinCell, rootRowId), |
| 724 | ), |
| 725 | ) |
| 726 | : selectJoinWhereStore.delRow(queryId, rootRowId), |
| 727 | ); |
| 728 | }; |
| 729 | |
| 730 | const listenToTable = ( |
| 731 | rootRowId: Id, |
no test coverage detected
searching dependent graphs…