MCPcopy Index your code
hub / github.com/tinyplex/tinybase / setQueryDefinition

Function setQueryDefinition

docs/pseudo.esm.sh/tinybase@9.0.0/index.js:3355–3376  ·  view source on GitHub ↗
(queryId, tableIdOrAsQuery, tableIdOrBuild, buildOrParamValues, paramValuesIfSourceIsQuery = {})

Source from the content-addressed store, hash-verified

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);

Callers

nothing calls this directly

Calls 6

isTrueFunction · 0.70
setDefinitionFunction · 0.70
setQueryDefinitionImplFunction · 0.70
setOrDelParamValuesFunction · 0.70
delListenerMethod · 0.65
addRowListenerMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…