Skip to content

Commit 8a6b40d

Browse files
committed
Some comments.
1 parent bf7fb60 commit 8a6b40d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

packages/sync-rules/src/SqlParameterQuery.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,6 @@ export class SqlParameterQuery
360360
}
361361

362362
createParameterLookupSource(params: CreateSourceParams): BucketParameterLookupSource {
363-
// FIXME: Use HydrationState for lookups.
364363
const hydrationState = resolveHydrationState(params);
365364
const lookupState = hydrationState.getParameterLookupScope(this);
366365
return {

packages/sync-rules/src/streams/parameter.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ export interface SubqueryEvaluator {
4141
parameterTable: TablePattern;
4242

4343
lookupSources(): BucketParameterLookupSourceDefinition[];
44+
// TODO: Is there a better design here?
45+
// This is used for parameter _queries_. But the queries need to know which lookup scopes to
46+
// use, and each querier may use multiple lookup sources, each with their own scope.
47+
// This implementation here does "hydration" on each subquery, which gives us hydrated function call.
48+
// Should this maybe be part of a higher-level class instead of just a function, i.e. a hydrated subquery?
4449
hydrateLookupsForRequest(hydrationState: HydrationState): (params: RequestParameters) => ParameterLookup[];
4550
}
4651

0 commit comments

Comments
 (0)