(queryId, tableIdOrAsQuery, tableIdOrBuild, buildOrParamValues, paramValuesIfSourceIsQuery = {})
| 3353 | return listenerId; |
| 3354 | }; |
| 3355 | const setQueryDefinition = (queryId, tableIdOrAsQuery, tableIdOrBuild, buildOrParamValues, paramValuesIfSourceIsQuery = {}) => { |
| 3356 | const [tableId, build, sourceIsQuery, paramValues] = isTrue( |
| 3357 | tableIdOrAsQuery |
| 3358 | ) ? [tableIdOrBuild, buildOrParamValues, 1, paramValuesIfSourceIsQuery] : [tableIdOrAsQuery, tableIdOrBuild, 0, buildOrParamValues ?? {}]; |
| 3359 | ifNotUndefined( |
| 3360 | getQueryArgs(queryId), |
| 3361 | ([, listenerId]) => paramStore.delListener(listenerId) |
| 3362 | ); |
| 3363 | setDefinition(queryId, tableId); |
| 3364 | setQueryArgs(queryId, [ |
| 3365 | build, |
| 3366 | paramStore.addRowListener( |
| 3367 | PARAMS_TABLE, |
| 3368 | queryId, |
| 3369 | () => setQueryDefinitionImpl(queryId) |
| 3370 | ), |
| 3371 | sourceIsQuery |
| 3372 | ]); |
| 3373 | setOrDelParamValues(queryId, paramValues); |
| 3374 | setQueryDefinitionImpl(queryId); |
| 3375 | return queries; |
| 3376 | }; |
| 3377 | const setQueryDefinitionImpl = (queryId) => getResultStore(queryId).transaction( |
| 3378 | () => ifNotUndefined(getQueryArgs(queryId), ([build, , sourceIsQuery]) => { |
| 3379 | const tableId = getTableId(queryId); |
nothing calls this directly
no test coverage detected
searching dependent graphs…