MCPcopy Index your code
hub / github.com/TanStack/db / constructor

Method constructor

packages/db/src/query/effect.ts:377–401  ·  view source on GitHub ↗
(config: EffectPipelineRunnerConfig<TRow, TKey>)

Source from the content-addressed store, hash-verified

375 private readonly onSourceError: (error: Error) => void
376
377 constructor(config: EffectPipelineRunnerConfig<TRow, TKey>) {
378 this.skipInitial = config.skipInitial
379 this.onBatchProcessed = config.onBatchProcessed
380 this.onSourceError = config.onSourceError
381
382 // Parse query
383 this.query = buildQueryFromConfig({ query: config.query })
384
385 // Extract source collections
386 this.collections = extractCollectionsFromQuery(this.query)
387 const aliasesById = extractCollectionAliases(this.query)
388
389 // Build alias → collection map
390 this.collectionByAlias = {}
391 for (const [collectionId, aliases] of aliasesById.entries()) {
392 const collection = this.collections[collectionId]
393 if (!collection) continue
394 for (const alias of aliases) {
395 this.collectionByAlias[alias] = collection
396 }
397 }
398
399 // Compile the pipeline
400 this.compilePipeline()
401 }
402
403 /** Compile the D2 graph and query pipeline */
404 private compilePipeline(): void {

Callers

nothing calls this directly

Calls 5

compilePipelineMethod · 0.95
buildQueryFromConfigFunction · 0.85
extractCollectionAliasesFunction · 0.85
entriesMethod · 0.45

Tested by

no test coverage detected