UNPKG

@tanstack/db

Version:

A reactive client store for building super fast apps on sync

23 lines (22 loc) • 728 B
import { QueryIR } from '../ir.js'; import { CompilationResult } from './index.js'; /** * Cache for compiled subqueries to avoid duplicate compilation */ export type QueryCache = WeakMap<QueryIR, [ authoredRoot?: CompilationResult, published?: CompilationResult, source?: CompilationResult ]>; /** * Lineage from optimized queries back to their user-defined queries. * * When optimization only copies a query, its user-defined identity remains a * valid cache key. When optimization changes the query, compilation must use * the optimized IR so pushed predicates are not lost. */ export type QueryMapping = WeakMap<QueryIR, QueryIR>; export type WindowOptions = { offset?: number; limit?: number; };