[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-tanstack-svelte-db":3,"mdc--q4e4ui-key":31,"related-repo-tanstack-svelte-db":2742,"related-org-tanstack-svelte-db":2835},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":20,"repoUrl":21,"updatedAt":22,"license":23,"forks":24,"topics":25,"repo":26,"sourceUrl":29,"mdContent":30},"svelte-db","build reactive databases with Svelte 5","Svelte 5 bindings for TanStack DB. useLiveQuery with Svelte 5 runes ($state, $derived, $effect). Dependency arrays use getter functions (() => value) for reactive props. Direct destructuring breaks reactivity — use dot notation or wrap with $derived. Conditional queries via returning undefined\u002Fnull. Import from @tanstack\u002Fsvelte-db (re-exports all of @tanstack\u002Fdb).\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},"tanstack","TanStack","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Ftanstack.png",[12,16,19],{"name":13,"slug":14,"type":15},"Svelte","svelte","tag",{"name":17,"slug":18,"type":15},"Database","database",{"name":9,"slug":8,"type":15},3811,"https:\u002F\u002Fgithub.com\u002FTanStack\u002Fdb","2026-07-16T06:04:32.876279",null,245,[],{"repoUrl":21,"stars":20,"forks":24,"topics":27,"description":28},[],"The reactive client store for your API.","https:\u002F\u002Fgithub.com\u002FTanStack\u002Fdb\u002Ftree\u002FHEAD\u002Fpackages\u002Fsvelte-db\u002Fskills\u002Fsvelte-db","---\nname: svelte-db\ndescription: >\n  Svelte 5 bindings for TanStack DB. useLiveQuery with Svelte 5 runes\n  ($state, $derived, $effect). Dependency arrays use getter functions\n  (() => value) for reactive props. Direct destructuring breaks reactivity —\n  use dot notation or wrap with $derived. Conditional queries via returning\n  undefined\u002Fnull. Import from @tanstack\u002Fsvelte-db (re-exports all of\n  @tanstack\u002Fdb).\ntype: framework\nlibrary: db\nframework: svelte\nlibrary_version: '0.6.0'\nrequires:\n  - db-core\nsources:\n  - 'TanStack\u002Fdb:docs\u002Fframework\u002Fsvelte\u002Foverview.md'\n  - 'TanStack\u002Fdb:packages\u002Fsvelte-db\u002Fsrc\u002FuseLiveQuery.svelte.ts'\n---\n\nThis skill builds on db-core. Read it first for collection setup, query builder, and mutation patterns.\n\n# TanStack DB — Svelte 5\n\n## Setup\n\n```svelte\n\u003Cscript lang=\"ts\">\nimport { useLiveQuery, eq, not } from \"@tanstack\u002Fsvelte-db\"\n\nconst todosQuery = useLiveQuery((q) =>\n  q\n    .from({ todo: todoCollection })\n    .where(({ todo }) => not(todo.completed))\n    .orderBy(({ todo }) => todo.created_at, \"asc\")\n)\n\u003C\u002Fscript>\n\n{#if todosQuery.isLoading}\n  \u003Cdiv>Loading...\u003C\u002Fdiv>\n{:else}\n  \u003Cul>\n    {#each todosQuery.data as todo (todo.id)}\n      \u003Cli>{todo.text}\u003C\u002Fli>\n    {\u002Feach}\n  \u003C\u002Ful>\n{\u002Fif}\n```\n\n`@tanstack\u002Fsvelte-db` re-exports everything from `@tanstack\u002Fdb`.\n\n## Hook\n\n### useLiveQuery\n\nReturns a reactive object with getter properties:\n\n```ts\n\u002F\u002F Query function — access via dot notation\nconst query = useLiveQuery((q) => q.from({ todo: todoCollection }))\n\u002F\u002F query.data, query.isLoading, query.status, etc.\n\n\u002F\u002F With reactive deps — use GETTER FUNCTIONS\nlet minPriority = $state(5)\nconst query = useLiveQuery(\n  (q) =>\n    q\n      .from({ todo: todoCollection })\n      .where(({ todo }) => gt(todo.priority, minPriority)),\n  [() => minPriority],\n)\n\n\u002F\u002F Config object\nconst query = useLiveQuery({\n  query: (q) => q.from({ todo: todoCollection }),\n  gcTime: 60000,\n})\n\n\u002F\u002F Pre-created collection\nconst query = useLiveQuery(preloadedCollection)\n```\n\n## Svelte-Specific Patterns\n\n### Destructuring with $derived\n\n```ts\n\u002F\u002F WRONG — breaks reactivity\nconst { data, isLoading } = useLiveQuery(...)\n\n\u002F\u002F CORRECT — use dot notation\nconst query = useLiveQuery(...)\n\u002F\u002F Access: query.data, query.isLoading\n\n\u002F\u002F CORRECT — wrap with $derived if you need destructuring\nconst query = useLiveQuery(...)\nconst { data, isLoading } = $derived(query)\n```\n\n### Props in dependency arrays\n\n```svelte\n\u003Cscript lang=\"ts\">\n  let { userId }: { userId: number } = $props()\n\n  const todosQuery = useLiveQuery(\n    (q) => q.from({ todo: todoCollection })\n             .where(({ todo }) => eq(todo.userId, userId)),\n    [() => userId]\n  )\n\u003C\u002Fscript>\n```\n\n## Includes (Hierarchical Data)\n\nWhen a query uses includes (subqueries in `select`), each child field is a live `Collection` by default. Subscribe to it with `useLiveQuery` in a subcomponent:\n\n```svelte\n\u003C!-- ProjectList.svelte -->\n\u003Cscript lang=\"ts\">\nimport { useLiveQuery, eq } from \"@tanstack\u002Fsvelte-db\"\nimport IssueList from \".\u002FIssueList.svelte\"\n\nconst projectsQuery = useLiveQuery((q) =>\n  q.from({ p: projectsCollection }).select(({ p }) => ({\n    id: p.id,\n    name: p.name,\n    issues: q\n      .from({ i: issuesCollection })\n      .where(({ i }) => eq(i.projectId, p.id))\n      .select(({ i }) => ({ id: i.id, title: i.title })),\n  }))\n)\n\u003C\u002Fscript>\n\n{#each projectsQuery.data as project (project.id)}\n  \u003Cdiv>\n    {project.name}\n    \u003CIssueList issuesCollection={project.issues} \u002F>\n  \u003C\u002Fdiv>\n{\u002Feach}\n```\n\n```svelte\n\u003C!-- IssueList.svelte — subscribes to the child Collection -->\n\u003Cscript lang=\"ts\">\nimport { useLiveQuery } from \"@tanstack\u002Fsvelte-db\"\n\nlet { issuesCollection } = $props()\nconst issuesQuery = useLiveQuery(issuesCollection)\n\u003C\u002Fscript>\n\n{#each issuesQuery.data as issue (issue.id)}\n  \u003Cli>{issue.title}\u003C\u002Fli>\n{\u002Feach}\n```\n\nWith `toArray()`, child results are plain arrays and the parent re-emits on child changes:\n\n```ts\nimport { toArray, eq } from '@tanstack\u002Fsvelte-db'\n\nconst projectsQuery = useLiveQuery((q) =>\n  q.from({ p: projectsCollection }).select(({ p }) => ({\n    id: p.id,\n    name: p.name,\n    issues: toArray(\n      q\n        .from({ i: issuesCollection })\n        .where(({ i }) => eq(i.projectId, p.id))\n        .select(({ i }) => ({ id: i.id, title: i.title })),\n    ),\n  })),\n)\n\u002F\u002F project.issues is a plain array — no subcomponent needed\n```\n\nSee db-core\u002Flive-queries\u002FSKILL.md for full includes rules (correlation conditions, nested includes, aggregates).\n\n## Common Mistakes\n\n### CRITICAL Passing values instead of getter functions in deps\n\nWrong:\n\n```ts\nlet filter = $state('active')\nconst query = useLiveQuery(\n  (q) =>\n    q\n      .from({ todo: todoCollection })\n      .where(({ todo }) => eq(todo.status, filter)),\n  [filter],\n)\n```\n\nCorrect:\n\n```ts\nlet filter = $state('active')\nconst query = useLiveQuery(\n  (q) =>\n    q\n      .from({ todo: todoCollection })\n      .where(({ todo }) => eq(todo.status, filter)),\n  [() => filter],\n)\n```\n\nIn Svelte 5, deps must be getter functions. Passing values directly captures them at creation time — changes won't trigger re-execution.\n\nSource: docs\u002Fframework\u002Fsvelte\u002Foverview.md\n\n### HIGH Direct destructuring breaks reactivity\n\nWrong:\n\n```ts\nconst { data, isLoading } = useLiveQuery((q) =>\n  q.from({ todo: todoCollection }),\n)\n```\n\nCorrect:\n\n```ts\nconst query = useLiveQuery((q) => q.from({ todo: todoCollection }))\n\u002F\u002F Use query.data, query.isLoading\n```\n\nDirect destructuring captures values at creation time. Use dot notation or wrap with `$derived`.\n\nSource: packages\u002Fsvelte-db\u002Fsrc\u002FuseLiveQuery.svelte.ts\n\nSee also: db-core\u002Flive-queries\u002FSKILL.md — for query builder API.\n\nSee also: db-core\u002Fmutations-optimistic\u002FSKILL.md — for mutation patterns.\n",{"data":32,"body":41},{"name":4,"description":6,"type":33,"library":34,"framework":14,"library_version":35,"requires":36,"sources":38},"framework","db","0.6.0",[37],"db-core",[39,40],"TanStack\u002Fdb:docs\u002Fframework\u002Fsvelte\u002Foverview.md","TanStack\u002Fdb:packages\u002Fsvelte-db\u002Fsrc\u002FuseLiveQuery.svelte.ts",{"type":42,"children":43},"root",[44,52,59,66,259,278,284,291,296,857,863,869,1077,1083,1159,1165,1193,1380,1470,1483,2007,2012,2018,2024,2029,2246,2251,2475,2480,2485,2491,2495,2611,2615,2709,2721,2726,2731,2736],{"type":45,"tag":46,"props":47,"children":48},"element","p",{},[49],{"type":50,"value":51},"text","This skill builds on db-core. Read it first for collection setup, query builder, and mutation patterns.",{"type":45,"tag":53,"props":54,"children":56},"h1",{"id":55},"tanstack-db-svelte-5",[57],{"type":50,"value":58},"TanStack DB — Svelte 5",{"type":45,"tag":60,"props":61,"children":63},"h2",{"id":62},"setup",[64],{"type":50,"value":65},"Setup",{"type":45,"tag":67,"props":68,"children":72},"pre",{"className":69,"code":70,"language":14,"meta":71,"style":71},"language-svelte shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u003Cscript lang=\"ts\">\nimport { useLiveQuery, eq, not } from \"@tanstack\u002Fsvelte-db\"\n\nconst todosQuery = useLiveQuery((q) =>\n  q\n    .from({ todo: todoCollection })\n    .where(({ todo }) => not(todo.completed))\n    .orderBy(({ todo }) => todo.created_at, \"asc\")\n)\n\u003C\u002Fscript>\n\n{#if todosQuery.isLoading}\n  \u003Cdiv>Loading...\u003C\u002Fdiv>\n{:else}\n  \u003Cul>\n    {#each todosQuery.data as todo (todo.id)}\n      \u003Cli>{todo.text}\u003C\u002Fli>\n    {\u002Feach}\n  \u003C\u002Ful>\n{\u002Fif}\n","",[73],{"type":45,"tag":74,"props":75,"children":76},"code",{"__ignoreMap":71},[77,88,97,107,116,125,134,143,152,161,170,178,187,196,205,214,223,232,241,250],{"type":45,"tag":78,"props":79,"children":82},"span",{"class":80,"line":81},"line",1,[83],{"type":45,"tag":78,"props":84,"children":85},{},[86],{"type":50,"value":87},"\u003Cscript lang=\"ts\">\n",{"type":45,"tag":78,"props":89,"children":91},{"class":80,"line":90},2,[92],{"type":45,"tag":78,"props":93,"children":94},{},[95],{"type":50,"value":96},"import { useLiveQuery, eq, not } from \"@tanstack\u002Fsvelte-db\"\n",{"type":45,"tag":78,"props":98,"children":100},{"class":80,"line":99},3,[101],{"type":45,"tag":78,"props":102,"children":104},{"emptyLinePlaceholder":103},true,[105],{"type":50,"value":106},"\n",{"type":45,"tag":78,"props":108,"children":110},{"class":80,"line":109},4,[111],{"type":45,"tag":78,"props":112,"children":113},{},[114],{"type":50,"value":115},"const todosQuery = useLiveQuery((q) =>\n",{"type":45,"tag":78,"props":117,"children":119},{"class":80,"line":118},5,[120],{"type":45,"tag":78,"props":121,"children":122},{},[123],{"type":50,"value":124},"  q\n",{"type":45,"tag":78,"props":126,"children":128},{"class":80,"line":127},6,[129],{"type":45,"tag":78,"props":130,"children":131},{},[132],{"type":50,"value":133},"    .from({ todo: todoCollection })\n",{"type":45,"tag":78,"props":135,"children":137},{"class":80,"line":136},7,[138],{"type":45,"tag":78,"props":139,"children":140},{},[141],{"type":50,"value":142},"    .where(({ todo }) => not(todo.completed))\n",{"type":45,"tag":78,"props":144,"children":146},{"class":80,"line":145},8,[147],{"type":45,"tag":78,"props":148,"children":149},{},[150],{"type":50,"value":151},"    .orderBy(({ todo }) => todo.created_at, \"asc\")\n",{"type":45,"tag":78,"props":153,"children":155},{"class":80,"line":154},9,[156],{"type":45,"tag":78,"props":157,"children":158},{},[159],{"type":50,"value":160},")\n",{"type":45,"tag":78,"props":162,"children":164},{"class":80,"line":163},10,[165],{"type":45,"tag":78,"props":166,"children":167},{},[168],{"type":50,"value":169},"\u003C\u002Fscript>\n",{"type":45,"tag":78,"props":171,"children":173},{"class":80,"line":172},11,[174],{"type":45,"tag":78,"props":175,"children":176},{"emptyLinePlaceholder":103},[177],{"type":50,"value":106},{"type":45,"tag":78,"props":179,"children":181},{"class":80,"line":180},12,[182],{"type":45,"tag":78,"props":183,"children":184},{},[185],{"type":50,"value":186},"{#if todosQuery.isLoading}\n",{"type":45,"tag":78,"props":188,"children":190},{"class":80,"line":189},13,[191],{"type":45,"tag":78,"props":192,"children":193},{},[194],{"type":50,"value":195},"  \u003Cdiv>Loading...\u003C\u002Fdiv>\n",{"type":45,"tag":78,"props":197,"children":199},{"class":80,"line":198},14,[200],{"type":45,"tag":78,"props":201,"children":202},{},[203],{"type":50,"value":204},"{:else}\n",{"type":45,"tag":78,"props":206,"children":208},{"class":80,"line":207},15,[209],{"type":45,"tag":78,"props":210,"children":211},{},[212],{"type":50,"value":213},"  \u003Cul>\n",{"type":45,"tag":78,"props":215,"children":217},{"class":80,"line":216},16,[218],{"type":45,"tag":78,"props":219,"children":220},{},[221],{"type":50,"value":222},"    {#each todosQuery.data as todo (todo.id)}\n",{"type":45,"tag":78,"props":224,"children":226},{"class":80,"line":225},17,[227],{"type":45,"tag":78,"props":228,"children":229},{},[230],{"type":50,"value":231},"      \u003Cli>{todo.text}\u003C\u002Fli>\n",{"type":45,"tag":78,"props":233,"children":235},{"class":80,"line":234},18,[236],{"type":45,"tag":78,"props":237,"children":238},{},[239],{"type":50,"value":240},"    {\u002Feach}\n",{"type":45,"tag":78,"props":242,"children":244},{"class":80,"line":243},19,[245],{"type":45,"tag":78,"props":246,"children":247},{},[248],{"type":50,"value":249},"  \u003C\u002Ful>\n",{"type":45,"tag":78,"props":251,"children":253},{"class":80,"line":252},20,[254],{"type":45,"tag":78,"props":255,"children":256},{},[257],{"type":50,"value":258},"{\u002Fif}\n",{"type":45,"tag":46,"props":260,"children":261},{},[262,268,270,276],{"type":45,"tag":74,"props":263,"children":265},{"className":264},[],[266],{"type":50,"value":267},"@tanstack\u002Fsvelte-db",{"type":50,"value":269}," re-exports everything from ",{"type":45,"tag":74,"props":271,"children":273},{"className":272},[],[274],{"type":50,"value":275},"@tanstack\u002Fdb",{"type":50,"value":277},".",{"type":45,"tag":60,"props":279,"children":281},{"id":280},"hook",[282],{"type":50,"value":283},"Hook",{"type":45,"tag":285,"props":286,"children":288},"h3",{"id":287},"uselivequery",[289],{"type":50,"value":290},"useLiveQuery",{"type":45,"tag":46,"props":292,"children":293},{},[294],{"type":50,"value":295},"Returns a reactive object with getter properties:",{"type":45,"tag":67,"props":297,"children":301},{"className":298,"code":299,"language":300,"meta":71,"style":71},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F Query function — access via dot notation\nconst query = useLiveQuery((q) => q.from({ todo: todoCollection }))\n\u002F\u002F query.data, query.isLoading, query.status, etc.\n\n\u002F\u002F With reactive deps — use GETTER FUNCTIONS\nlet minPriority = $state(5)\nconst query = useLiveQuery(\n  (q) =>\n    q\n      .from({ todo: todoCollection })\n      .where(({ todo }) => gt(todo.priority, minPriority)),\n  [() => minPriority],\n)\n\n\u002F\u002F Config object\nconst query = useLiveQuery({\n  query: (q) => q.from({ todo: todoCollection }),\n  gcTime: 60000,\n})\n\n\u002F\u002F Pre-created collection\nconst query = useLiveQuery(preloadedCollection)\n","ts",[302],{"type":45,"tag":74,"props":303,"children":304},{"__ignoreMap":71},[305,314,415,423,430,438,474,498,519,527,567,635,661,668,675,683,711,784,805,816,823,832],{"type":45,"tag":78,"props":306,"children":307},{"class":80,"line":81},[308],{"type":45,"tag":78,"props":309,"children":311},{"style":310},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[312],{"type":50,"value":313},"\u002F\u002F Query function — access via dot notation\n",{"type":45,"tag":78,"props":315,"children":316},{"class":80,"line":90},[317,323,329,335,341,346,350,356,361,366,371,375,380,384,389,395,400,405,410],{"type":45,"tag":78,"props":318,"children":320},{"style":319},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[321],{"type":50,"value":322},"const",{"type":45,"tag":78,"props":324,"children":326},{"style":325},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[327],{"type":50,"value":328}," query ",{"type":45,"tag":78,"props":330,"children":332},{"style":331},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[333],{"type":50,"value":334},"=",{"type":45,"tag":78,"props":336,"children":338},{"style":337},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[339],{"type":50,"value":340}," useLiveQuery",{"type":45,"tag":78,"props":342,"children":343},{"style":325},[344],{"type":50,"value":345},"(",{"type":45,"tag":78,"props":347,"children":348},{"style":331},[349],{"type":50,"value":345},{"type":45,"tag":78,"props":351,"children":353},{"style":352},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[354],{"type":50,"value":355},"q",{"type":45,"tag":78,"props":357,"children":358},{"style":331},[359],{"type":50,"value":360},")",{"type":45,"tag":78,"props":362,"children":363},{"style":319},[364],{"type":50,"value":365}," =>",{"type":45,"tag":78,"props":367,"children":368},{"style":325},[369],{"type":50,"value":370}," q",{"type":45,"tag":78,"props":372,"children":373},{"style":331},[374],{"type":50,"value":277},{"type":45,"tag":78,"props":376,"children":377},{"style":337},[378],{"type":50,"value":379},"from",{"type":45,"tag":78,"props":381,"children":382},{"style":325},[383],{"type":50,"value":345},{"type":45,"tag":78,"props":385,"children":386},{"style":331},[387],{"type":50,"value":388},"{",{"type":45,"tag":78,"props":390,"children":392},{"style":391},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[393],{"type":50,"value":394}," todo",{"type":45,"tag":78,"props":396,"children":397},{"style":331},[398],{"type":50,"value":399},":",{"type":45,"tag":78,"props":401,"children":402},{"style":325},[403],{"type":50,"value":404}," todoCollection ",{"type":45,"tag":78,"props":406,"children":407},{"style":331},[408],{"type":50,"value":409},"}",{"type":45,"tag":78,"props":411,"children":412},{"style":325},[413],{"type":50,"value":414},"))\n",{"type":45,"tag":78,"props":416,"children":417},{"class":80,"line":99},[418],{"type":45,"tag":78,"props":419,"children":420},{"style":310},[421],{"type":50,"value":422},"\u002F\u002F query.data, query.isLoading, query.status, etc.\n",{"type":45,"tag":78,"props":424,"children":425},{"class":80,"line":109},[426],{"type":45,"tag":78,"props":427,"children":428},{"emptyLinePlaceholder":103},[429],{"type":50,"value":106},{"type":45,"tag":78,"props":431,"children":432},{"class":80,"line":118},[433],{"type":45,"tag":78,"props":434,"children":435},{"style":310},[436],{"type":50,"value":437},"\u002F\u002F With reactive deps — use GETTER FUNCTIONS\n",{"type":45,"tag":78,"props":439,"children":440},{"class":80,"line":127},[441,446,451,455,460,464,470],{"type":45,"tag":78,"props":442,"children":443},{"style":319},[444],{"type":50,"value":445},"let",{"type":45,"tag":78,"props":447,"children":448},{"style":325},[449],{"type":50,"value":450}," minPriority ",{"type":45,"tag":78,"props":452,"children":453},{"style":331},[454],{"type":50,"value":334},{"type":45,"tag":78,"props":456,"children":457},{"style":337},[458],{"type":50,"value":459}," $state",{"type":45,"tag":78,"props":461,"children":462},{"style":325},[463],{"type":50,"value":345},{"type":45,"tag":78,"props":465,"children":467},{"style":466},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[468],{"type":50,"value":469},"5",{"type":45,"tag":78,"props":471,"children":472},{"style":325},[473],{"type":50,"value":160},{"type":45,"tag":78,"props":475,"children":476},{"class":80,"line":136},[477,481,485,489,493],{"type":45,"tag":78,"props":478,"children":479},{"style":319},[480],{"type":50,"value":322},{"type":45,"tag":78,"props":482,"children":483},{"style":325},[484],{"type":50,"value":328},{"type":45,"tag":78,"props":486,"children":487},{"style":331},[488],{"type":50,"value":334},{"type":45,"tag":78,"props":490,"children":491},{"style":337},[492],{"type":50,"value":340},{"type":45,"tag":78,"props":494,"children":495},{"style":325},[496],{"type":50,"value":497},"(\n",{"type":45,"tag":78,"props":499,"children":500},{"class":80,"line":145},[501,506,510,514],{"type":45,"tag":78,"props":502,"children":503},{"style":331},[504],{"type":50,"value":505},"  (",{"type":45,"tag":78,"props":507,"children":508},{"style":352},[509],{"type":50,"value":355},{"type":45,"tag":78,"props":511,"children":512},{"style":331},[513],{"type":50,"value":360},{"type":45,"tag":78,"props":515,"children":516},{"style":319},[517],{"type":50,"value":518}," =>\n",{"type":45,"tag":78,"props":520,"children":521},{"class":80,"line":154},[522],{"type":45,"tag":78,"props":523,"children":524},{"style":325},[525],{"type":50,"value":526},"    q\n",{"type":45,"tag":78,"props":528,"children":529},{"class":80,"line":163},[530,535,539,543,547,551,555,559,563],{"type":45,"tag":78,"props":531,"children":532},{"style":331},[533],{"type":50,"value":534},"      .",{"type":45,"tag":78,"props":536,"children":537},{"style":337},[538],{"type":50,"value":379},{"type":45,"tag":78,"props":540,"children":541},{"style":325},[542],{"type":50,"value":345},{"type":45,"tag":78,"props":544,"children":545},{"style":331},[546],{"type":50,"value":388},{"type":45,"tag":78,"props":548,"children":549},{"style":391},[550],{"type":50,"value":394},{"type":45,"tag":78,"props":552,"children":553},{"style":331},[554],{"type":50,"value":399},{"type":45,"tag":78,"props":556,"children":557},{"style":325},[558],{"type":50,"value":404},{"type":45,"tag":78,"props":560,"children":561},{"style":331},[562],{"type":50,"value":409},{"type":45,"tag":78,"props":564,"children":565},{"style":325},[566],{"type":50,"value":160},{"type":45,"tag":78,"props":568,"children":569},{"class":80,"line":172},[570,574,579,583,588,592,597,601,606,611,615,620,625,630],{"type":45,"tag":78,"props":571,"children":572},{"style":331},[573],{"type":50,"value":534},{"type":45,"tag":78,"props":575,"children":576},{"style":337},[577],{"type":50,"value":578},"where",{"type":45,"tag":78,"props":580,"children":581},{"style":325},[582],{"type":50,"value":345},{"type":45,"tag":78,"props":584,"children":585},{"style":331},[586],{"type":50,"value":587},"({",{"type":45,"tag":78,"props":589,"children":590},{"style":352},[591],{"type":50,"value":394},{"type":45,"tag":78,"props":593,"children":594},{"style":331},[595],{"type":50,"value":596}," })",{"type":45,"tag":78,"props":598,"children":599},{"style":319},[600],{"type":50,"value":365},{"type":45,"tag":78,"props":602,"children":603},{"style":337},[604],{"type":50,"value":605}," gt",{"type":45,"tag":78,"props":607,"children":608},{"style":325},[609],{"type":50,"value":610},"(todo",{"type":45,"tag":78,"props":612,"children":613},{"style":331},[614],{"type":50,"value":277},{"type":45,"tag":78,"props":616,"children":617},{"style":325},[618],{"type":50,"value":619},"priority",{"type":45,"tag":78,"props":621,"children":622},{"style":331},[623],{"type":50,"value":624},",",{"type":45,"tag":78,"props":626,"children":627},{"style":325},[628],{"type":50,"value":629}," minPriority))",{"type":45,"tag":78,"props":631,"children":632},{"style":331},[633],{"type":50,"value":634},",\n",{"type":45,"tag":78,"props":636,"children":637},{"class":80,"line":180},[638,643,648,652,657],{"type":45,"tag":78,"props":639,"children":640},{"style":325},[641],{"type":50,"value":642},"  [",{"type":45,"tag":78,"props":644,"children":645},{"style":331},[646],{"type":50,"value":647},"()",{"type":45,"tag":78,"props":649,"children":650},{"style":319},[651],{"type":50,"value":365},{"type":45,"tag":78,"props":653,"children":654},{"style":325},[655],{"type":50,"value":656}," minPriority]",{"type":45,"tag":78,"props":658,"children":659},{"style":331},[660],{"type":50,"value":634},{"type":45,"tag":78,"props":662,"children":663},{"class":80,"line":189},[664],{"type":45,"tag":78,"props":665,"children":666},{"style":325},[667],{"type":50,"value":160},{"type":45,"tag":78,"props":669,"children":670},{"class":80,"line":198},[671],{"type":45,"tag":78,"props":672,"children":673},{"emptyLinePlaceholder":103},[674],{"type":50,"value":106},{"type":45,"tag":78,"props":676,"children":677},{"class":80,"line":207},[678],{"type":45,"tag":78,"props":679,"children":680},{"style":310},[681],{"type":50,"value":682},"\u002F\u002F Config object\n",{"type":45,"tag":78,"props":684,"children":685},{"class":80,"line":216},[686,690,694,698,702,706],{"type":45,"tag":78,"props":687,"children":688},{"style":319},[689],{"type":50,"value":322},{"type":45,"tag":78,"props":691,"children":692},{"style":325},[693],{"type":50,"value":328},{"type":45,"tag":78,"props":695,"children":696},{"style":331},[697],{"type":50,"value":334},{"type":45,"tag":78,"props":699,"children":700},{"style":337},[701],{"type":50,"value":340},{"type":45,"tag":78,"props":703,"children":704},{"style":325},[705],{"type":50,"value":345},{"type":45,"tag":78,"props":707,"children":708},{"style":331},[709],{"type":50,"value":710},"{\n",{"type":45,"tag":78,"props":712,"children":713},{"class":80,"line":225},[714,719,723,728,732,736,740,744,748,752,756,760,764,768,772,776,780],{"type":45,"tag":78,"props":715,"children":716},{"style":337},[717],{"type":50,"value":718},"  query",{"type":45,"tag":78,"props":720,"children":721},{"style":331},[722],{"type":50,"value":399},{"type":45,"tag":78,"props":724,"children":725},{"style":331},[726],{"type":50,"value":727}," (",{"type":45,"tag":78,"props":729,"children":730},{"style":352},[731],{"type":50,"value":355},{"type":45,"tag":78,"props":733,"children":734},{"style":331},[735],{"type":50,"value":360},{"type":45,"tag":78,"props":737,"children":738},{"style":319},[739],{"type":50,"value":365},{"type":45,"tag":78,"props":741,"children":742},{"style":325},[743],{"type":50,"value":370},{"type":45,"tag":78,"props":745,"children":746},{"style":331},[747],{"type":50,"value":277},{"type":45,"tag":78,"props":749,"children":750},{"style":337},[751],{"type":50,"value":379},{"type":45,"tag":78,"props":753,"children":754},{"style":325},[755],{"type":50,"value":345},{"type":45,"tag":78,"props":757,"children":758},{"style":331},[759],{"type":50,"value":388},{"type":45,"tag":78,"props":761,"children":762},{"style":391},[763],{"type":50,"value":394},{"type":45,"tag":78,"props":765,"children":766},{"style":331},[767],{"type":50,"value":399},{"type":45,"tag":78,"props":769,"children":770},{"style":325},[771],{"type":50,"value":404},{"type":45,"tag":78,"props":773,"children":774},{"style":331},[775],{"type":50,"value":409},{"type":45,"tag":78,"props":777,"children":778},{"style":325},[779],{"type":50,"value":360},{"type":45,"tag":78,"props":781,"children":782},{"style":331},[783],{"type":50,"value":634},{"type":45,"tag":78,"props":785,"children":786},{"class":80,"line":234},[787,792,796,801],{"type":45,"tag":78,"props":788,"children":789},{"style":391},[790],{"type":50,"value":791},"  gcTime",{"type":45,"tag":78,"props":793,"children":794},{"style":331},[795],{"type":50,"value":399},{"type":45,"tag":78,"props":797,"children":798},{"style":466},[799],{"type":50,"value":800}," 60000",{"type":45,"tag":78,"props":802,"children":803},{"style":331},[804],{"type":50,"value":634},{"type":45,"tag":78,"props":806,"children":807},{"class":80,"line":243},[808,812],{"type":45,"tag":78,"props":809,"children":810},{"style":331},[811],{"type":50,"value":409},{"type":45,"tag":78,"props":813,"children":814},{"style":325},[815],{"type":50,"value":160},{"type":45,"tag":78,"props":817,"children":818},{"class":80,"line":252},[819],{"type":45,"tag":78,"props":820,"children":821},{"emptyLinePlaceholder":103},[822],{"type":50,"value":106},{"type":45,"tag":78,"props":824,"children":826},{"class":80,"line":825},21,[827],{"type":45,"tag":78,"props":828,"children":829},{"style":310},[830],{"type":50,"value":831},"\u002F\u002F Pre-created collection\n",{"type":45,"tag":78,"props":833,"children":835},{"class":80,"line":834},22,[836,840,844,848,852],{"type":45,"tag":78,"props":837,"children":838},{"style":319},[839],{"type":50,"value":322},{"type":45,"tag":78,"props":841,"children":842},{"style":325},[843],{"type":50,"value":328},{"type":45,"tag":78,"props":845,"children":846},{"style":331},[847],{"type":50,"value":334},{"type":45,"tag":78,"props":849,"children":850},{"style":337},[851],{"type":50,"value":340},{"type":45,"tag":78,"props":853,"children":854},{"style":325},[855],{"type":50,"value":856},"(preloadedCollection)\n",{"type":45,"tag":60,"props":858,"children":860},{"id":859},"svelte-specific-patterns",[861],{"type":50,"value":862},"Svelte-Specific Patterns",{"type":45,"tag":285,"props":864,"children":866},{"id":865},"destructuring-with-derived",[867],{"type":50,"value":868},"Destructuring with $derived",{"type":45,"tag":67,"props":870,"children":872},{"className":298,"code":871,"language":300,"meta":71,"style":71},"\u002F\u002F WRONG — breaks reactivity\nconst { data, isLoading } = useLiveQuery(...)\n\n\u002F\u002F CORRECT — use dot notation\nconst query = useLiveQuery(...)\n\u002F\u002F Access: query.data, query.isLoading\n\n\u002F\u002F CORRECT — wrap with $derived if you need destructuring\nconst query = useLiveQuery(...)\nconst { data, isLoading } = $derived(query)\n",[873],{"type":45,"tag":74,"props":874,"children":875},{"__ignoreMap":71},[876,884,936,943,951,982,990,997,1005,1036],{"type":45,"tag":78,"props":877,"children":878},{"class":80,"line":81},[879],{"type":45,"tag":78,"props":880,"children":881},{"style":310},[882],{"type":50,"value":883},"\u002F\u002F WRONG — breaks reactivity\n",{"type":45,"tag":78,"props":885,"children":886},{"class":80,"line":90},[887,891,896,901,905,910,914,919,923,927,932],{"type":45,"tag":78,"props":888,"children":889},{"style":319},[890],{"type":50,"value":322},{"type":45,"tag":78,"props":892,"children":893},{"style":331},[894],{"type":50,"value":895}," {",{"type":45,"tag":78,"props":897,"children":898},{"style":325},[899],{"type":50,"value":900}," data",{"type":45,"tag":78,"props":902,"children":903},{"style":331},[904],{"type":50,"value":624},{"type":45,"tag":78,"props":906,"children":907},{"style":325},[908],{"type":50,"value":909}," isLoading ",{"type":45,"tag":78,"props":911,"children":912},{"style":331},[913],{"type":50,"value":409},{"type":45,"tag":78,"props":915,"children":916},{"style":331},[917],{"type":50,"value":918}," =",{"type":45,"tag":78,"props":920,"children":921},{"style":337},[922],{"type":50,"value":340},{"type":45,"tag":78,"props":924,"children":925},{"style":325},[926],{"type":50,"value":345},{"type":45,"tag":78,"props":928,"children":929},{"style":331},[930],{"type":50,"value":931},"...",{"type":45,"tag":78,"props":933,"children":934},{"style":325},[935],{"type":50,"value":160},{"type":45,"tag":78,"props":937,"children":938},{"class":80,"line":99},[939],{"type":45,"tag":78,"props":940,"children":941},{"emptyLinePlaceholder":103},[942],{"type":50,"value":106},{"type":45,"tag":78,"props":944,"children":945},{"class":80,"line":109},[946],{"type":45,"tag":78,"props":947,"children":948},{"style":310},[949],{"type":50,"value":950},"\u002F\u002F CORRECT — use dot notation\n",{"type":45,"tag":78,"props":952,"children":953},{"class":80,"line":118},[954,958,962,966,970,974,978],{"type":45,"tag":78,"props":955,"children":956},{"style":319},[957],{"type":50,"value":322},{"type":45,"tag":78,"props":959,"children":960},{"style":325},[961],{"type":50,"value":328},{"type":45,"tag":78,"props":963,"children":964},{"style":331},[965],{"type":50,"value":334},{"type":45,"tag":78,"props":967,"children":968},{"style":337},[969],{"type":50,"value":340},{"type":45,"tag":78,"props":971,"children":972},{"style":325},[973],{"type":50,"value":345},{"type":45,"tag":78,"props":975,"children":976},{"style":331},[977],{"type":50,"value":931},{"type":45,"tag":78,"props":979,"children":980},{"style":325},[981],{"type":50,"value":160},{"type":45,"tag":78,"props":983,"children":984},{"class":80,"line":127},[985],{"type":45,"tag":78,"props":986,"children":987},{"style":310},[988],{"type":50,"value":989},"\u002F\u002F Access: query.data, query.isLoading\n",{"type":45,"tag":78,"props":991,"children":992},{"class":80,"line":136},[993],{"type":45,"tag":78,"props":994,"children":995},{"emptyLinePlaceholder":103},[996],{"type":50,"value":106},{"type":45,"tag":78,"props":998,"children":999},{"class":80,"line":145},[1000],{"type":45,"tag":78,"props":1001,"children":1002},{"style":310},[1003],{"type":50,"value":1004},"\u002F\u002F CORRECT — wrap with $derived if you need destructuring\n",{"type":45,"tag":78,"props":1006,"children":1007},{"class":80,"line":154},[1008,1012,1016,1020,1024,1028,1032],{"type":45,"tag":78,"props":1009,"children":1010},{"style":319},[1011],{"type":50,"value":322},{"type":45,"tag":78,"props":1013,"children":1014},{"style":325},[1015],{"type":50,"value":328},{"type":45,"tag":78,"props":1017,"children":1018},{"style":331},[1019],{"type":50,"value":334},{"type":45,"tag":78,"props":1021,"children":1022},{"style":337},[1023],{"type":50,"value":340},{"type":45,"tag":78,"props":1025,"children":1026},{"style":325},[1027],{"type":50,"value":345},{"type":45,"tag":78,"props":1029,"children":1030},{"style":331},[1031],{"type":50,"value":931},{"type":45,"tag":78,"props":1033,"children":1034},{"style":325},[1035],{"type":50,"value":160},{"type":45,"tag":78,"props":1037,"children":1038},{"class":80,"line":163},[1039,1043,1047,1051,1055,1059,1063,1067,1072],{"type":45,"tag":78,"props":1040,"children":1041},{"style":319},[1042],{"type":50,"value":322},{"type":45,"tag":78,"props":1044,"children":1045},{"style":331},[1046],{"type":50,"value":895},{"type":45,"tag":78,"props":1048,"children":1049},{"style":325},[1050],{"type":50,"value":900},{"type":45,"tag":78,"props":1052,"children":1053},{"style":331},[1054],{"type":50,"value":624},{"type":45,"tag":78,"props":1056,"children":1057},{"style":325},[1058],{"type":50,"value":909},{"type":45,"tag":78,"props":1060,"children":1061},{"style":331},[1062],{"type":50,"value":409},{"type":45,"tag":78,"props":1064,"children":1065},{"style":331},[1066],{"type":50,"value":918},{"type":45,"tag":78,"props":1068,"children":1069},{"style":337},[1070],{"type":50,"value":1071}," $derived",{"type":45,"tag":78,"props":1073,"children":1074},{"style":325},[1075],{"type":50,"value":1076},"(query)\n",{"type":45,"tag":285,"props":1078,"children":1080},{"id":1079},"props-in-dependency-arrays",[1081],{"type":50,"value":1082},"Props in dependency arrays",{"type":45,"tag":67,"props":1084,"children":1086},{"className":69,"code":1085,"language":14,"meta":71,"style":71},"\u003Cscript lang=\"ts\">\n  let { userId }: { userId: number } = $props()\n\n  const todosQuery = useLiveQuery(\n    (q) => q.from({ todo: todoCollection })\n             .where(({ todo }) => eq(todo.userId, userId)),\n    [() => userId]\n  )\n\u003C\u002Fscript>\n",[1087],{"type":45,"tag":74,"props":1088,"children":1089},{"__ignoreMap":71},[1090,1097,1105,1112,1120,1128,1136,1144,1152],{"type":45,"tag":78,"props":1091,"children":1092},{"class":80,"line":81},[1093],{"type":45,"tag":78,"props":1094,"children":1095},{},[1096],{"type":50,"value":87},{"type":45,"tag":78,"props":1098,"children":1099},{"class":80,"line":90},[1100],{"type":45,"tag":78,"props":1101,"children":1102},{},[1103],{"type":50,"value":1104},"  let { userId }: { userId: number } = $props()\n",{"type":45,"tag":78,"props":1106,"children":1107},{"class":80,"line":99},[1108],{"type":45,"tag":78,"props":1109,"children":1110},{"emptyLinePlaceholder":103},[1111],{"type":50,"value":106},{"type":45,"tag":78,"props":1113,"children":1114},{"class":80,"line":109},[1115],{"type":45,"tag":78,"props":1116,"children":1117},{},[1118],{"type":50,"value":1119},"  const todosQuery = useLiveQuery(\n",{"type":45,"tag":78,"props":1121,"children":1122},{"class":80,"line":118},[1123],{"type":45,"tag":78,"props":1124,"children":1125},{},[1126],{"type":50,"value":1127},"    (q) => q.from({ todo: todoCollection })\n",{"type":45,"tag":78,"props":1129,"children":1130},{"class":80,"line":127},[1131],{"type":45,"tag":78,"props":1132,"children":1133},{},[1134],{"type":50,"value":1135},"             .where(({ todo }) => eq(todo.userId, userId)),\n",{"type":45,"tag":78,"props":1137,"children":1138},{"class":80,"line":136},[1139],{"type":45,"tag":78,"props":1140,"children":1141},{},[1142],{"type":50,"value":1143},"    [() => userId]\n",{"type":45,"tag":78,"props":1145,"children":1146},{"class":80,"line":145},[1147],{"type":45,"tag":78,"props":1148,"children":1149},{},[1150],{"type":50,"value":1151},"  )\n",{"type":45,"tag":78,"props":1153,"children":1154},{"class":80,"line":154},[1155],{"type":45,"tag":78,"props":1156,"children":1157},{},[1158],{"type":50,"value":169},{"type":45,"tag":60,"props":1160,"children":1162},{"id":1161},"includes-hierarchical-data",[1163],{"type":50,"value":1164},"Includes (Hierarchical Data)",{"type":45,"tag":46,"props":1166,"children":1167},{},[1168,1170,1176,1178,1184,1186,1191],{"type":50,"value":1169},"When a query uses includes (subqueries in ",{"type":45,"tag":74,"props":1171,"children":1173},{"className":1172},[],[1174],{"type":50,"value":1175},"select",{"type":50,"value":1177},"), each child field is a live ",{"type":45,"tag":74,"props":1179,"children":1181},{"className":1180},[],[1182],{"type":50,"value":1183},"Collection",{"type":50,"value":1185}," by default. Subscribe to it with ",{"type":45,"tag":74,"props":1187,"children":1189},{"className":1188},[],[1190],{"type":50,"value":290},{"type":50,"value":1192}," in a subcomponent:",{"type":45,"tag":67,"props":1194,"children":1196},{"className":69,"code":1195,"language":14,"meta":71,"style":71},"\u003C!-- ProjectList.svelte -->\n\u003Cscript lang=\"ts\">\nimport { useLiveQuery, eq } from \"@tanstack\u002Fsvelte-db\"\nimport IssueList from \".\u002FIssueList.svelte\"\n\nconst projectsQuery = useLiveQuery((q) =>\n  q.from({ p: projectsCollection }).select(({ p }) => ({\n    id: p.id,\n    name: p.name,\n    issues: q\n      .from({ i: issuesCollection })\n      .where(({ i }) => eq(i.projectId, p.id))\n      .select(({ i }) => ({ id: i.id, title: i.title })),\n  }))\n)\n\u003C\u002Fscript>\n\n{#each projectsQuery.data as project (project.id)}\n  \u003Cdiv>\n    {project.name}\n    \u003CIssueList issuesCollection={project.issues} \u002F>\n  \u003C\u002Fdiv>\n{\u002Feach}\n",[1197],{"type":45,"tag":74,"props":1198,"children":1199},{"__ignoreMap":71},[1200,1208,1215,1223,1231,1238,1246,1254,1262,1270,1278,1286,1294,1302,1310,1317,1324,1331,1339,1347,1355,1363,1371],{"type":45,"tag":78,"props":1201,"children":1202},{"class":80,"line":81},[1203],{"type":45,"tag":78,"props":1204,"children":1205},{},[1206],{"type":50,"value":1207},"\u003C!-- ProjectList.svelte -->\n",{"type":45,"tag":78,"props":1209,"children":1210},{"class":80,"line":90},[1211],{"type":45,"tag":78,"props":1212,"children":1213},{},[1214],{"type":50,"value":87},{"type":45,"tag":78,"props":1216,"children":1217},{"class":80,"line":99},[1218],{"type":45,"tag":78,"props":1219,"children":1220},{},[1221],{"type":50,"value":1222},"import { useLiveQuery, eq } from \"@tanstack\u002Fsvelte-db\"\n",{"type":45,"tag":78,"props":1224,"children":1225},{"class":80,"line":109},[1226],{"type":45,"tag":78,"props":1227,"children":1228},{},[1229],{"type":50,"value":1230},"import IssueList from \".\u002FIssueList.svelte\"\n",{"type":45,"tag":78,"props":1232,"children":1233},{"class":80,"line":118},[1234],{"type":45,"tag":78,"props":1235,"children":1236},{"emptyLinePlaceholder":103},[1237],{"type":50,"value":106},{"type":45,"tag":78,"props":1239,"children":1240},{"class":80,"line":127},[1241],{"type":45,"tag":78,"props":1242,"children":1243},{},[1244],{"type":50,"value":1245},"const projectsQuery = useLiveQuery((q) =>\n",{"type":45,"tag":78,"props":1247,"children":1248},{"class":80,"line":136},[1249],{"type":45,"tag":78,"props":1250,"children":1251},{},[1252],{"type":50,"value":1253},"  q.from({ p: projectsCollection }).select(({ p }) => ({\n",{"type":45,"tag":78,"props":1255,"children":1256},{"class":80,"line":145},[1257],{"type":45,"tag":78,"props":1258,"children":1259},{},[1260],{"type":50,"value":1261},"    id: p.id,\n",{"type":45,"tag":78,"props":1263,"children":1264},{"class":80,"line":154},[1265],{"type":45,"tag":78,"props":1266,"children":1267},{},[1268],{"type":50,"value":1269},"    name: p.name,\n",{"type":45,"tag":78,"props":1271,"children":1272},{"class":80,"line":163},[1273],{"type":45,"tag":78,"props":1274,"children":1275},{},[1276],{"type":50,"value":1277},"    issues: q\n",{"type":45,"tag":78,"props":1279,"children":1280},{"class":80,"line":172},[1281],{"type":45,"tag":78,"props":1282,"children":1283},{},[1284],{"type":50,"value":1285},"      .from({ i: issuesCollection })\n",{"type":45,"tag":78,"props":1287,"children":1288},{"class":80,"line":180},[1289],{"type":45,"tag":78,"props":1290,"children":1291},{},[1292],{"type":50,"value":1293},"      .where(({ i }) => eq(i.projectId, p.id))\n",{"type":45,"tag":78,"props":1295,"children":1296},{"class":80,"line":189},[1297],{"type":45,"tag":78,"props":1298,"children":1299},{},[1300],{"type":50,"value":1301},"      .select(({ i }) => ({ id: i.id, title: i.title })),\n",{"type":45,"tag":78,"props":1303,"children":1304},{"class":80,"line":198},[1305],{"type":45,"tag":78,"props":1306,"children":1307},{},[1308],{"type":50,"value":1309},"  }))\n",{"type":45,"tag":78,"props":1311,"children":1312},{"class":80,"line":207},[1313],{"type":45,"tag":78,"props":1314,"children":1315},{},[1316],{"type":50,"value":160},{"type":45,"tag":78,"props":1318,"children":1319},{"class":80,"line":216},[1320],{"type":45,"tag":78,"props":1321,"children":1322},{},[1323],{"type":50,"value":169},{"type":45,"tag":78,"props":1325,"children":1326},{"class":80,"line":225},[1327],{"type":45,"tag":78,"props":1328,"children":1329},{"emptyLinePlaceholder":103},[1330],{"type":50,"value":106},{"type":45,"tag":78,"props":1332,"children":1333},{"class":80,"line":234},[1334],{"type":45,"tag":78,"props":1335,"children":1336},{},[1337],{"type":50,"value":1338},"{#each projectsQuery.data as project (project.id)}\n",{"type":45,"tag":78,"props":1340,"children":1341},{"class":80,"line":243},[1342],{"type":45,"tag":78,"props":1343,"children":1344},{},[1345],{"type":50,"value":1346},"  \u003Cdiv>\n",{"type":45,"tag":78,"props":1348,"children":1349},{"class":80,"line":252},[1350],{"type":45,"tag":78,"props":1351,"children":1352},{},[1353],{"type":50,"value":1354},"    {project.name}\n",{"type":45,"tag":78,"props":1356,"children":1357},{"class":80,"line":825},[1358],{"type":45,"tag":78,"props":1359,"children":1360},{},[1361],{"type":50,"value":1362},"    \u003CIssueList issuesCollection={project.issues} \u002F>\n",{"type":45,"tag":78,"props":1364,"children":1365},{"class":80,"line":834},[1366],{"type":45,"tag":78,"props":1367,"children":1368},{},[1369],{"type":50,"value":1370},"  \u003C\u002Fdiv>\n",{"type":45,"tag":78,"props":1372,"children":1374},{"class":80,"line":1373},23,[1375],{"type":45,"tag":78,"props":1376,"children":1377},{},[1378],{"type":50,"value":1379},"{\u002Feach}\n",{"type":45,"tag":67,"props":1381,"children":1383},{"className":69,"code":1382,"language":14,"meta":71,"style":71},"\u003C!-- IssueList.svelte — subscribes to the child Collection -->\n\u003Cscript lang=\"ts\">\nimport { useLiveQuery } from \"@tanstack\u002Fsvelte-db\"\n\nlet { issuesCollection } = $props()\nconst issuesQuery = useLiveQuery(issuesCollection)\n\u003C\u002Fscript>\n\n{#each issuesQuery.data as issue (issue.id)}\n  \u003Cli>{issue.title}\u003C\u002Fli>\n{\u002Feach}\n",[1384],{"type":45,"tag":74,"props":1385,"children":1386},{"__ignoreMap":71},[1387,1395,1402,1410,1417,1425,1433,1440,1447,1455,1463],{"type":45,"tag":78,"props":1388,"children":1389},{"class":80,"line":81},[1390],{"type":45,"tag":78,"props":1391,"children":1392},{},[1393],{"type":50,"value":1394},"\u003C!-- IssueList.svelte — subscribes to the child Collection -->\n",{"type":45,"tag":78,"props":1396,"children":1397},{"class":80,"line":90},[1398],{"type":45,"tag":78,"props":1399,"children":1400},{},[1401],{"type":50,"value":87},{"type":45,"tag":78,"props":1403,"children":1404},{"class":80,"line":99},[1405],{"type":45,"tag":78,"props":1406,"children":1407},{},[1408],{"type":50,"value":1409},"import { useLiveQuery } from \"@tanstack\u002Fsvelte-db\"\n",{"type":45,"tag":78,"props":1411,"children":1412},{"class":80,"line":109},[1413],{"type":45,"tag":78,"props":1414,"children":1415},{"emptyLinePlaceholder":103},[1416],{"type":50,"value":106},{"type":45,"tag":78,"props":1418,"children":1419},{"class":80,"line":118},[1420],{"type":45,"tag":78,"props":1421,"children":1422},{},[1423],{"type":50,"value":1424},"let { issuesCollection } = $props()\n",{"type":45,"tag":78,"props":1426,"children":1427},{"class":80,"line":127},[1428],{"type":45,"tag":78,"props":1429,"children":1430},{},[1431],{"type":50,"value":1432},"const issuesQuery = useLiveQuery(issuesCollection)\n",{"type":45,"tag":78,"props":1434,"children":1435},{"class":80,"line":136},[1436],{"type":45,"tag":78,"props":1437,"children":1438},{},[1439],{"type":50,"value":169},{"type":45,"tag":78,"props":1441,"children":1442},{"class":80,"line":145},[1443],{"type":45,"tag":78,"props":1444,"children":1445},{"emptyLinePlaceholder":103},[1446],{"type":50,"value":106},{"type":45,"tag":78,"props":1448,"children":1449},{"class":80,"line":154},[1450],{"type":45,"tag":78,"props":1451,"children":1452},{},[1453],{"type":50,"value":1454},"{#each issuesQuery.data as issue (issue.id)}\n",{"type":45,"tag":78,"props":1456,"children":1457},{"class":80,"line":163},[1458],{"type":45,"tag":78,"props":1459,"children":1460},{},[1461],{"type":50,"value":1462},"  \u003Cli>{issue.title}\u003C\u002Fli>\n",{"type":45,"tag":78,"props":1464,"children":1465},{"class":80,"line":172},[1466],{"type":45,"tag":78,"props":1467,"children":1468},{},[1469],{"type":50,"value":1379},{"type":45,"tag":46,"props":1471,"children":1472},{},[1473,1475,1481],{"type":50,"value":1474},"With ",{"type":45,"tag":74,"props":1476,"children":1478},{"className":1477},[],[1479],{"type":50,"value":1480},"toArray()",{"type":50,"value":1482},", child results are plain arrays and the parent re-emits on child changes:",{"type":45,"tag":67,"props":1484,"children":1486},{"className":298,"code":1485,"language":300,"meta":71,"style":71},"import { toArray, eq } from '@tanstack\u002Fsvelte-db'\n\nconst projectsQuery = useLiveQuery((q) =>\n  q.from({ p: projectsCollection }).select(({ p }) => ({\n    id: p.id,\n    name: p.name,\n    issues: toArray(\n      q\n        .from({ i: issuesCollection })\n        .where(({ i }) => eq(i.projectId, p.id))\n        .select(({ i }) => ({ id: i.id, title: i.title })),\n    ),\n  })),\n)\n\u002F\u002F project.issues is a plain array — no subcomponent needed\n",[1487],{"type":45,"tag":74,"props":1488,"children":1489},{"__ignoreMap":71},[1490,1542,1549,1589,1671,1700,1729,1749,1757,1799,1865,1964,1976,1992,1999],{"type":45,"tag":78,"props":1491,"children":1492},{"class":80,"line":81},[1493,1499,1503,1508,1512,1517,1522,1527,1532,1537],{"type":45,"tag":78,"props":1494,"children":1496},{"style":1495},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[1497],{"type":50,"value":1498},"import",{"type":45,"tag":78,"props":1500,"children":1501},{"style":331},[1502],{"type":50,"value":895},{"type":45,"tag":78,"props":1504,"children":1505},{"style":325},[1506],{"type":50,"value":1507}," toArray",{"type":45,"tag":78,"props":1509,"children":1510},{"style":331},[1511],{"type":50,"value":624},{"type":45,"tag":78,"props":1513,"children":1514},{"style":325},[1515],{"type":50,"value":1516}," eq",{"type":45,"tag":78,"props":1518,"children":1519},{"style":331},[1520],{"type":50,"value":1521}," }",{"type":45,"tag":78,"props":1523,"children":1524},{"style":1495},[1525],{"type":50,"value":1526}," from",{"type":45,"tag":78,"props":1528,"children":1529},{"style":331},[1530],{"type":50,"value":1531}," '",{"type":45,"tag":78,"props":1533,"children":1535},{"style":1534},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[1536],{"type":50,"value":267},{"type":45,"tag":78,"props":1538,"children":1539},{"style":331},[1540],{"type":50,"value":1541},"'\n",{"type":45,"tag":78,"props":1543,"children":1544},{"class":80,"line":90},[1545],{"type":45,"tag":78,"props":1546,"children":1547},{"emptyLinePlaceholder":103},[1548],{"type":50,"value":106},{"type":45,"tag":78,"props":1550,"children":1551},{"class":80,"line":99},[1552,1556,1561,1565,1569,1573,1577,1581,1585],{"type":45,"tag":78,"props":1553,"children":1554},{"style":319},[1555],{"type":50,"value":322},{"type":45,"tag":78,"props":1557,"children":1558},{"style":325},[1559],{"type":50,"value":1560}," projectsQuery ",{"type":45,"tag":78,"props":1562,"children":1563},{"style":331},[1564],{"type":50,"value":334},{"type":45,"tag":78,"props":1566,"children":1567},{"style":337},[1568],{"type":50,"value":340},{"type":45,"tag":78,"props":1570,"children":1571},{"style":325},[1572],{"type":50,"value":345},{"type":45,"tag":78,"props":1574,"children":1575},{"style":331},[1576],{"type":50,"value":345},{"type":45,"tag":78,"props":1578,"children":1579},{"style":352},[1580],{"type":50,"value":355},{"type":45,"tag":78,"props":1582,"children":1583},{"style":331},[1584],{"type":50,"value":360},{"type":45,"tag":78,"props":1586,"children":1587},{"style":319},[1588],{"type":50,"value":518},{"type":45,"tag":78,"props":1590,"children":1591},{"class":80,"line":109},[1592,1597,1601,1605,1609,1613,1618,1622,1627,1631,1635,1639,1643,1647,1651,1655,1659,1663,1667],{"type":45,"tag":78,"props":1593,"children":1594},{"style":325},[1595],{"type":50,"value":1596},"  q",{"type":45,"tag":78,"props":1598,"children":1599},{"style":331},[1600],{"type":50,"value":277},{"type":45,"tag":78,"props":1602,"children":1603},{"style":337},[1604],{"type":50,"value":379},{"type":45,"tag":78,"props":1606,"children":1607},{"style":325},[1608],{"type":50,"value":345},{"type":45,"tag":78,"props":1610,"children":1611},{"style":331},[1612],{"type":50,"value":388},{"type":45,"tag":78,"props":1614,"children":1615},{"style":391},[1616],{"type":50,"value":1617}," p",{"type":45,"tag":78,"props":1619,"children":1620},{"style":331},[1621],{"type":50,"value":399},{"type":45,"tag":78,"props":1623,"children":1624},{"style":325},[1625],{"type":50,"value":1626}," projectsCollection ",{"type":45,"tag":78,"props":1628,"children":1629},{"style":331},[1630],{"type":50,"value":409},{"type":45,"tag":78,"props":1632,"children":1633},{"style":325},[1634],{"type":50,"value":360},{"type":45,"tag":78,"props":1636,"children":1637},{"style":331},[1638],{"type":50,"value":277},{"type":45,"tag":78,"props":1640,"children":1641},{"style":337},[1642],{"type":50,"value":1175},{"type":45,"tag":78,"props":1644,"children":1645},{"style":325},[1646],{"type":50,"value":345},{"type":45,"tag":78,"props":1648,"children":1649},{"style":331},[1650],{"type":50,"value":587},{"type":45,"tag":78,"props":1652,"children":1653},{"style":352},[1654],{"type":50,"value":1617},{"type":45,"tag":78,"props":1656,"children":1657},{"style":331},[1658],{"type":50,"value":596},{"type":45,"tag":78,"props":1660,"children":1661},{"style":319},[1662],{"type":50,"value":365},{"type":45,"tag":78,"props":1664,"children":1665},{"style":325},[1666],{"type":50,"value":727},{"type":45,"tag":78,"props":1668,"children":1669},{"style":331},[1670],{"type":50,"value":710},{"type":45,"tag":78,"props":1672,"children":1673},{"class":80,"line":118},[1674,1679,1683,1687,1691,1696],{"type":45,"tag":78,"props":1675,"children":1676},{"style":391},[1677],{"type":50,"value":1678},"    id",{"type":45,"tag":78,"props":1680,"children":1681},{"style":331},[1682],{"type":50,"value":399},{"type":45,"tag":78,"props":1684,"children":1685},{"style":325},[1686],{"type":50,"value":1617},{"type":45,"tag":78,"props":1688,"children":1689},{"style":331},[1690],{"type":50,"value":277},{"type":45,"tag":78,"props":1692,"children":1693},{"style":325},[1694],{"type":50,"value":1695},"id",{"type":45,"tag":78,"props":1697,"children":1698},{"style":331},[1699],{"type":50,"value":634},{"type":45,"tag":78,"props":1701,"children":1702},{"class":80,"line":127},[1703,1708,1712,1716,1720,1725],{"type":45,"tag":78,"props":1704,"children":1705},{"style":391},[1706],{"type":50,"value":1707},"    name",{"type":45,"tag":78,"props":1709,"children":1710},{"style":331},[1711],{"type":50,"value":399},{"type":45,"tag":78,"props":1713,"children":1714},{"style":325},[1715],{"type":50,"value":1617},{"type":45,"tag":78,"props":1717,"children":1718},{"style":331},[1719],{"type":50,"value":277},{"type":45,"tag":78,"props":1721,"children":1722},{"style":325},[1723],{"type":50,"value":1724},"name",{"type":45,"tag":78,"props":1726,"children":1727},{"style":331},[1728],{"type":50,"value":634},{"type":45,"tag":78,"props":1730,"children":1731},{"class":80,"line":136},[1732,1737,1741,1745],{"type":45,"tag":78,"props":1733,"children":1734},{"style":391},[1735],{"type":50,"value":1736},"    issues",{"type":45,"tag":78,"props":1738,"children":1739},{"style":331},[1740],{"type":50,"value":399},{"type":45,"tag":78,"props":1742,"children":1743},{"style":337},[1744],{"type":50,"value":1507},{"type":45,"tag":78,"props":1746,"children":1747},{"style":325},[1748],{"type":50,"value":497},{"type":45,"tag":78,"props":1750,"children":1751},{"class":80,"line":145},[1752],{"type":45,"tag":78,"props":1753,"children":1754},{"style":325},[1755],{"type":50,"value":1756},"      q\n",{"type":45,"tag":78,"props":1758,"children":1759},{"class":80,"line":154},[1760,1765,1769,1773,1777,1782,1786,1791,1795],{"type":45,"tag":78,"props":1761,"children":1762},{"style":331},[1763],{"type":50,"value":1764},"        .",{"type":45,"tag":78,"props":1766,"children":1767},{"style":337},[1768],{"type":50,"value":379},{"type":45,"tag":78,"props":1770,"children":1771},{"style":325},[1772],{"type":50,"value":345},{"type":45,"tag":78,"props":1774,"children":1775},{"style":331},[1776],{"type":50,"value":388},{"type":45,"tag":78,"props":1778,"children":1779},{"style":391},[1780],{"type":50,"value":1781}," i",{"type":45,"tag":78,"props":1783,"children":1784},{"style":331},[1785],{"type":50,"value":399},{"type":45,"tag":78,"props":1787,"children":1788},{"style":325},[1789],{"type":50,"value":1790}," issuesCollection ",{"type":45,"tag":78,"props":1792,"children":1793},{"style":331},[1794],{"type":50,"value":409},{"type":45,"tag":78,"props":1796,"children":1797},{"style":325},[1798],{"type":50,"value":160},{"type":45,"tag":78,"props":1800,"children":1801},{"class":80,"line":163},[1802,1806,1810,1814,1818,1822,1826,1830,1834,1839,1843,1848,1852,1856,1860],{"type":45,"tag":78,"props":1803,"children":1804},{"style":331},[1805],{"type":50,"value":1764},{"type":45,"tag":78,"props":1807,"children":1808},{"style":337},[1809],{"type":50,"value":578},{"type":45,"tag":78,"props":1811,"children":1812},{"style":325},[1813],{"type":50,"value":345},{"type":45,"tag":78,"props":1815,"children":1816},{"style":331},[1817],{"type":50,"value":587},{"type":45,"tag":78,"props":1819,"children":1820},{"style":352},[1821],{"type":50,"value":1781},{"type":45,"tag":78,"props":1823,"children":1824},{"style":331},[1825],{"type":50,"value":596},{"type":45,"tag":78,"props":1827,"children":1828},{"style":319},[1829],{"type":50,"value":365},{"type":45,"tag":78,"props":1831,"children":1832},{"style":337},[1833],{"type":50,"value":1516},{"type":45,"tag":78,"props":1835,"children":1836},{"style":325},[1837],{"type":50,"value":1838},"(i",{"type":45,"tag":78,"props":1840,"children":1841},{"style":331},[1842],{"type":50,"value":277},{"type":45,"tag":78,"props":1844,"children":1845},{"style":325},[1846],{"type":50,"value":1847},"projectId",{"type":45,"tag":78,"props":1849,"children":1850},{"style":331},[1851],{"type":50,"value":624},{"type":45,"tag":78,"props":1853,"children":1854},{"style":325},[1855],{"type":50,"value":1617},{"type":45,"tag":78,"props":1857,"children":1858},{"style":331},[1859],{"type":50,"value":277},{"type":45,"tag":78,"props":1861,"children":1862},{"style":325},[1863],{"type":50,"value":1864},"id))\n",{"type":45,"tag":78,"props":1866,"children":1867},{"class":80,"line":172},[1868,1872,1876,1880,1884,1888,1892,1896,1900,1904,1909,1913,1917,1921,1925,1929,1934,1938,1942,1946,1951,1955,1960],{"type":45,"tag":78,"props":1869,"children":1870},{"style":331},[1871],{"type":50,"value":1764},{"type":45,"tag":78,"props":1873,"children":1874},{"style":337},[1875],{"type":50,"value":1175},{"type":45,"tag":78,"props":1877,"children":1878},{"style":325},[1879],{"type":50,"value":345},{"type":45,"tag":78,"props":1881,"children":1882},{"style":331},[1883],{"type":50,"value":587},{"type":45,"tag":78,"props":1885,"children":1886},{"style":352},[1887],{"type":50,"value":1781},{"type":45,"tag":78,"props":1889,"children":1890},{"style":331},[1891],{"type":50,"value":596},{"type":45,"tag":78,"props":1893,"children":1894},{"style":319},[1895],{"type":50,"value":365},{"type":45,"tag":78,"props":1897,"children":1898},{"style":325},[1899],{"type":50,"value":727},{"type":45,"tag":78,"props":1901,"children":1902},{"style":331},[1903],{"type":50,"value":388},{"type":45,"tag":78,"props":1905,"children":1906},{"style":391},[1907],{"type":50,"value":1908}," id",{"type":45,"tag":78,"props":1910,"children":1911},{"style":331},[1912],{"type":50,"value":399},{"type":45,"tag":78,"props":1914,"children":1915},{"style":325},[1916],{"type":50,"value":1781},{"type":45,"tag":78,"props":1918,"children":1919},{"style":331},[1920],{"type":50,"value":277},{"type":45,"tag":78,"props":1922,"children":1923},{"style":325},[1924],{"type":50,"value":1695},{"type":45,"tag":78,"props":1926,"children":1927},{"style":331},[1928],{"type":50,"value":624},{"type":45,"tag":78,"props":1930,"children":1931},{"style":391},[1932],{"type":50,"value":1933}," title",{"type":45,"tag":78,"props":1935,"children":1936},{"style":331},[1937],{"type":50,"value":399},{"type":45,"tag":78,"props":1939,"children":1940},{"style":325},[1941],{"type":50,"value":1781},{"type":45,"tag":78,"props":1943,"children":1944},{"style":331},[1945],{"type":50,"value":277},{"type":45,"tag":78,"props":1947,"children":1948},{"style":325},[1949],{"type":50,"value":1950},"title ",{"type":45,"tag":78,"props":1952,"children":1953},{"style":331},[1954],{"type":50,"value":409},{"type":45,"tag":78,"props":1956,"children":1957},{"style":325},[1958],{"type":50,"value":1959},"))",{"type":45,"tag":78,"props":1961,"children":1962},{"style":331},[1963],{"type":50,"value":634},{"type":45,"tag":78,"props":1965,"children":1966},{"class":80,"line":180},[1967,1972],{"type":45,"tag":78,"props":1968,"children":1969},{"style":325},[1970],{"type":50,"value":1971},"    )",{"type":45,"tag":78,"props":1973,"children":1974},{"style":331},[1975],{"type":50,"value":634},{"type":45,"tag":78,"props":1977,"children":1978},{"class":80,"line":189},[1979,1984,1988],{"type":45,"tag":78,"props":1980,"children":1981},{"style":331},[1982],{"type":50,"value":1983},"  }",{"type":45,"tag":78,"props":1985,"children":1986},{"style":325},[1987],{"type":50,"value":1959},{"type":45,"tag":78,"props":1989,"children":1990},{"style":331},[1991],{"type":50,"value":634},{"type":45,"tag":78,"props":1993,"children":1994},{"class":80,"line":198},[1995],{"type":45,"tag":78,"props":1996,"children":1997},{"style":325},[1998],{"type":50,"value":160},{"type":45,"tag":78,"props":2000,"children":2001},{"class":80,"line":207},[2002],{"type":45,"tag":78,"props":2003,"children":2004},{"style":310},[2005],{"type":50,"value":2006},"\u002F\u002F project.issues is a plain array — no subcomponent needed\n",{"type":45,"tag":46,"props":2008,"children":2009},{},[2010],{"type":50,"value":2011},"See db-core\u002Flive-queries\u002FSKILL.md for full includes rules (correlation conditions, nested includes, aggregates).",{"type":45,"tag":60,"props":2013,"children":2015},{"id":2014},"common-mistakes",[2016],{"type":50,"value":2017},"Common Mistakes",{"type":45,"tag":285,"props":2019,"children":2021},{"id":2020},"critical-passing-values-instead-of-getter-functions-in-deps",[2022],{"type":50,"value":2023},"CRITICAL Passing values instead of getter functions in deps",{"type":45,"tag":46,"props":2025,"children":2026},{},[2027],{"type":50,"value":2028},"Wrong:",{"type":45,"tag":67,"props":2030,"children":2032},{"className":298,"code":2031,"language":300,"meta":71,"style":71},"let filter = $state('active')\nconst query = useLiveQuery(\n  (q) =>\n    q\n      .from({ todo: todoCollection })\n      .where(({ todo }) => eq(todo.status, filter)),\n  [filter],\n)\n",[2033],{"type":45,"tag":74,"props":2034,"children":2035},{"__ignoreMap":71},[2036,2078,2101,2120,2127,2166,2227,2239],{"type":45,"tag":78,"props":2037,"children":2038},{"class":80,"line":81},[2039,2043,2048,2052,2056,2060,2065,2070,2074],{"type":45,"tag":78,"props":2040,"children":2041},{"style":319},[2042],{"type":50,"value":445},{"type":45,"tag":78,"props":2044,"children":2045},{"style":325},[2046],{"type":50,"value":2047}," filter ",{"type":45,"tag":78,"props":2049,"children":2050},{"style":331},[2051],{"type":50,"value":334},{"type":45,"tag":78,"props":2053,"children":2054},{"style":337},[2055],{"type":50,"value":459},{"type":45,"tag":78,"props":2057,"children":2058},{"style":325},[2059],{"type":50,"value":345},{"type":45,"tag":78,"props":2061,"children":2062},{"style":331},[2063],{"type":50,"value":2064},"'",{"type":45,"tag":78,"props":2066,"children":2067},{"style":1534},[2068],{"type":50,"value":2069},"active",{"type":45,"tag":78,"props":2071,"children":2072},{"style":331},[2073],{"type":50,"value":2064},{"type":45,"tag":78,"props":2075,"children":2076},{"style":325},[2077],{"type":50,"value":160},{"type":45,"tag":78,"props":2079,"children":2080},{"class":80,"line":90},[2081,2085,2089,2093,2097],{"type":45,"tag":78,"props":2082,"children":2083},{"style":319},[2084],{"type":50,"value":322},{"type":45,"tag":78,"props":2086,"children":2087},{"style":325},[2088],{"type":50,"value":328},{"type":45,"tag":78,"props":2090,"children":2091},{"style":331},[2092],{"type":50,"value":334},{"type":45,"tag":78,"props":2094,"children":2095},{"style":337},[2096],{"type":50,"value":340},{"type":45,"tag":78,"props":2098,"children":2099},{"style":325},[2100],{"type":50,"value":497},{"type":45,"tag":78,"props":2102,"children":2103},{"class":80,"line":99},[2104,2108,2112,2116],{"type":45,"tag":78,"props":2105,"children":2106},{"style":331},[2107],{"type":50,"value":505},{"type":45,"tag":78,"props":2109,"children":2110},{"style":352},[2111],{"type":50,"value":355},{"type":45,"tag":78,"props":2113,"children":2114},{"style":331},[2115],{"type":50,"value":360},{"type":45,"tag":78,"props":2117,"children":2118},{"style":319},[2119],{"type":50,"value":518},{"type":45,"tag":78,"props":2121,"children":2122},{"class":80,"line":109},[2123],{"type":45,"tag":78,"props":2124,"children":2125},{"style":325},[2126],{"type":50,"value":526},{"type":45,"tag":78,"props":2128,"children":2129},{"class":80,"line":118},[2130,2134,2138,2142,2146,2150,2154,2158,2162],{"type":45,"tag":78,"props":2131,"children":2132},{"style":331},[2133],{"type":50,"value":534},{"type":45,"tag":78,"props":2135,"children":2136},{"style":337},[2137],{"type":50,"value":379},{"type":45,"tag":78,"props":2139,"children":2140},{"style":325},[2141],{"type":50,"value":345},{"type":45,"tag":78,"props":2143,"children":2144},{"style":331},[2145],{"type":50,"value":388},{"type":45,"tag":78,"props":2147,"children":2148},{"style":391},[2149],{"type":50,"value":394},{"type":45,"tag":78,"props":2151,"children":2152},{"style":331},[2153],{"type":50,"value":399},{"type":45,"tag":78,"props":2155,"children":2156},{"style":325},[2157],{"type":50,"value":404},{"type":45,"tag":78,"props":2159,"children":2160},{"style":331},[2161],{"type":50,"value":409},{"type":45,"tag":78,"props":2163,"children":2164},{"style":325},[2165],{"type":50,"value":160},{"type":45,"tag":78,"props":2167,"children":2168},{"class":80,"line":127},[2169,2173,2177,2181,2185,2189,2193,2197,2201,2205,2209,2214,2218,2223],{"type":45,"tag":78,"props":2170,"children":2171},{"style":331},[2172],{"type":50,"value":534},{"type":45,"tag":78,"props":2174,"children":2175},{"style":337},[2176],{"type":50,"value":578},{"type":45,"tag":78,"props":2178,"children":2179},{"style":325},[2180],{"type":50,"value":345},{"type":45,"tag":78,"props":2182,"children":2183},{"style":331},[2184],{"type":50,"value":587},{"type":45,"tag":78,"props":2186,"children":2187},{"style":352},[2188],{"type":50,"value":394},{"type":45,"tag":78,"props":2190,"children":2191},{"style":331},[2192],{"type":50,"value":596},{"type":45,"tag":78,"props":2194,"children":2195},{"style":319},[2196],{"type":50,"value":365},{"type":45,"tag":78,"props":2198,"children":2199},{"style":337},[2200],{"type":50,"value":1516},{"type":45,"tag":78,"props":2202,"children":2203},{"style":325},[2204],{"type":50,"value":610},{"type":45,"tag":78,"props":2206,"children":2207},{"style":331},[2208],{"type":50,"value":277},{"type":45,"tag":78,"props":2210,"children":2211},{"style":325},[2212],{"type":50,"value":2213},"status",{"type":45,"tag":78,"props":2215,"children":2216},{"style":331},[2217],{"type":50,"value":624},{"type":45,"tag":78,"props":2219,"children":2220},{"style":325},[2221],{"type":50,"value":2222}," filter))",{"type":45,"tag":78,"props":2224,"children":2225},{"style":331},[2226],{"type":50,"value":634},{"type":45,"tag":78,"props":2228,"children":2229},{"class":80,"line":136},[2230,2235],{"type":45,"tag":78,"props":2231,"children":2232},{"style":325},[2233],{"type":50,"value":2234},"  [filter]",{"type":45,"tag":78,"props":2236,"children":2237},{"style":331},[2238],{"type":50,"value":634},{"type":45,"tag":78,"props":2240,"children":2241},{"class":80,"line":145},[2242],{"type":45,"tag":78,"props":2243,"children":2244},{"style":325},[2245],{"type":50,"value":160},{"type":45,"tag":46,"props":2247,"children":2248},{},[2249],{"type":50,"value":2250},"Correct:",{"type":45,"tag":67,"props":2252,"children":2254},{"className":298,"code":2253,"language":300,"meta":71,"style":71},"let filter = $state('active')\nconst query = useLiveQuery(\n  (q) =>\n    q\n      .from({ todo: todoCollection })\n      .where(({ todo }) => eq(todo.status, filter)),\n  [() => filter],\n)\n",[2255],{"type":45,"tag":74,"props":2256,"children":2257},{"__ignoreMap":71},[2258,2297,2320,2339,2346,2385,2444,2468],{"type":45,"tag":78,"props":2259,"children":2260},{"class":80,"line":81},[2261,2265,2269,2273,2277,2281,2285,2289,2293],{"type":45,"tag":78,"props":2262,"children":2263},{"style":319},[2264],{"type":50,"value":445},{"type":45,"tag":78,"props":2266,"children":2267},{"style":325},[2268],{"type":50,"value":2047},{"type":45,"tag":78,"props":2270,"children":2271},{"style":331},[2272],{"type":50,"value":334},{"type":45,"tag":78,"props":2274,"children":2275},{"style":337},[2276],{"type":50,"value":459},{"type":45,"tag":78,"props":2278,"children":2279},{"style":325},[2280],{"type":50,"value":345},{"type":45,"tag":78,"props":2282,"children":2283},{"style":331},[2284],{"type":50,"value":2064},{"type":45,"tag":78,"props":2286,"children":2287},{"style":1534},[2288],{"type":50,"value":2069},{"type":45,"tag":78,"props":2290,"children":2291},{"style":331},[2292],{"type":50,"value":2064},{"type":45,"tag":78,"props":2294,"children":2295},{"style":325},[2296],{"type":50,"value":160},{"type":45,"tag":78,"props":2298,"children":2299},{"class":80,"line":90},[2300,2304,2308,2312,2316],{"type":45,"tag":78,"props":2301,"children":2302},{"style":319},[2303],{"type":50,"value":322},{"type":45,"tag":78,"props":2305,"children":2306},{"style":325},[2307],{"type":50,"value":328},{"type":45,"tag":78,"props":2309,"children":2310},{"style":331},[2311],{"type":50,"value":334},{"type":45,"tag":78,"props":2313,"children":2314},{"style":337},[2315],{"type":50,"value":340},{"type":45,"tag":78,"props":2317,"children":2318},{"style":325},[2319],{"type":50,"value":497},{"type":45,"tag":78,"props":2321,"children":2322},{"class":80,"line":99},[2323,2327,2331,2335],{"type":45,"tag":78,"props":2324,"children":2325},{"style":331},[2326],{"type":50,"value":505},{"type":45,"tag":78,"props":2328,"children":2329},{"style":352},[2330],{"type":50,"value":355},{"type":45,"tag":78,"props":2332,"children":2333},{"style":331},[2334],{"type":50,"value":360},{"type":45,"tag":78,"props":2336,"children":2337},{"style":319},[2338],{"type":50,"value":518},{"type":45,"tag":78,"props":2340,"children":2341},{"class":80,"line":109},[2342],{"type":45,"tag":78,"props":2343,"children":2344},{"style":325},[2345],{"type":50,"value":526},{"type":45,"tag":78,"props":2347,"children":2348},{"class":80,"line":118},[2349,2353,2357,2361,2365,2369,2373,2377,2381],{"type":45,"tag":78,"props":2350,"children":2351},{"style":331},[2352],{"type":50,"value":534},{"type":45,"tag":78,"props":2354,"children":2355},{"style":337},[2356],{"type":50,"value":379},{"type":45,"tag":78,"props":2358,"children":2359},{"style":325},[2360],{"type":50,"value":345},{"type":45,"tag":78,"props":2362,"children":2363},{"style":331},[2364],{"type":50,"value":388},{"type":45,"tag":78,"props":2366,"children":2367},{"style":391},[2368],{"type":50,"value":394},{"type":45,"tag":78,"props":2370,"children":2371},{"style":331},[2372],{"type":50,"value":399},{"type":45,"tag":78,"props":2374,"children":2375},{"style":325},[2376],{"type":50,"value":404},{"type":45,"tag":78,"props":2378,"children":2379},{"style":331},[2380],{"type":50,"value":409},{"type":45,"tag":78,"props":2382,"children":2383},{"style":325},[2384],{"type":50,"value":160},{"type":45,"tag":78,"props":2386,"children":2387},{"class":80,"line":127},[2388,2392,2396,2400,2404,2408,2412,2416,2420,2424,2428,2432,2436,2440],{"type":45,"tag":78,"props":2389,"children":2390},{"style":331},[2391],{"type":50,"value":534},{"type":45,"tag":78,"props":2393,"children":2394},{"style":337},[2395],{"type":50,"value":578},{"type":45,"tag":78,"props":2397,"children":2398},{"style":325},[2399],{"type":50,"value":345},{"type":45,"tag":78,"props":2401,"children":2402},{"style":331},[2403],{"type":50,"value":587},{"type":45,"tag":78,"props":2405,"children":2406},{"style":352},[2407],{"type":50,"value":394},{"type":45,"tag":78,"props":2409,"children":2410},{"style":331},[2411],{"type":50,"value":596},{"type":45,"tag":78,"props":2413,"children":2414},{"style":319},[2415],{"type":50,"value":365},{"type":45,"tag":78,"props":2417,"children":2418},{"style":337},[2419],{"type":50,"value":1516},{"type":45,"tag":78,"props":2421,"children":2422},{"style":325},[2423],{"type":50,"value":610},{"type":45,"tag":78,"props":2425,"children":2426},{"style":331},[2427],{"type":50,"value":277},{"type":45,"tag":78,"props":2429,"children":2430},{"style":325},[2431],{"type":50,"value":2213},{"type":45,"tag":78,"props":2433,"children":2434},{"style":331},[2435],{"type":50,"value":624},{"type":45,"tag":78,"props":2437,"children":2438},{"style":325},[2439],{"type":50,"value":2222},{"type":45,"tag":78,"props":2441,"children":2442},{"style":331},[2443],{"type":50,"value":634},{"type":45,"tag":78,"props":2445,"children":2446},{"class":80,"line":136},[2447,2451,2455,2459,2464],{"type":45,"tag":78,"props":2448,"children":2449},{"style":325},[2450],{"type":50,"value":642},{"type":45,"tag":78,"props":2452,"children":2453},{"style":331},[2454],{"type":50,"value":647},{"type":45,"tag":78,"props":2456,"children":2457},{"style":319},[2458],{"type":50,"value":365},{"type":45,"tag":78,"props":2460,"children":2461},{"style":325},[2462],{"type":50,"value":2463}," filter]",{"type":45,"tag":78,"props":2465,"children":2466},{"style":331},[2467],{"type":50,"value":634},{"type":45,"tag":78,"props":2469,"children":2470},{"class":80,"line":145},[2471],{"type":45,"tag":78,"props":2472,"children":2473},{"style":325},[2474],{"type":50,"value":160},{"type":45,"tag":46,"props":2476,"children":2477},{},[2478],{"type":50,"value":2479},"In Svelte 5, deps must be getter functions. Passing values directly captures them at creation time — changes won't trigger re-execution.",{"type":45,"tag":46,"props":2481,"children":2482},{},[2483],{"type":50,"value":2484},"Source: docs\u002Fframework\u002Fsvelte\u002Foverview.md",{"type":45,"tag":285,"props":2486,"children":2488},{"id":2487},"high-direct-destructuring-breaks-reactivity",[2489],{"type":50,"value":2490},"HIGH Direct destructuring breaks reactivity",{"type":45,"tag":46,"props":2492,"children":2493},{},[2494],{"type":50,"value":2028},{"type":45,"tag":67,"props":2496,"children":2498},{"className":298,"code":2497,"language":300,"meta":71,"style":71},"const { data, isLoading } = useLiveQuery((q) =>\n  q.from({ todo: todoCollection }),\n)\n",[2499],{"type":45,"tag":74,"props":2500,"children":2501},{"__ignoreMap":71},[2502,2557,2604],{"type":45,"tag":78,"props":2503,"children":2504},{"class":80,"line":81},[2505,2509,2513,2517,2521,2525,2529,2533,2537,2541,2545,2549,2553],{"type":45,"tag":78,"props":2506,"children":2507},{"style":319},[2508],{"type":50,"value":322},{"type":45,"tag":78,"props":2510,"children":2511},{"style":331},[2512],{"type":50,"value":895},{"type":45,"tag":78,"props":2514,"children":2515},{"style":325},[2516],{"type":50,"value":900},{"type":45,"tag":78,"props":2518,"children":2519},{"style":331},[2520],{"type":50,"value":624},{"type":45,"tag":78,"props":2522,"children":2523},{"style":325},[2524],{"type":50,"value":909},{"type":45,"tag":78,"props":2526,"children":2527},{"style":331},[2528],{"type":50,"value":409},{"type":45,"tag":78,"props":2530,"children":2531},{"style":331},[2532],{"type":50,"value":918},{"type":45,"tag":78,"props":2534,"children":2535},{"style":337},[2536],{"type":50,"value":340},{"type":45,"tag":78,"props":2538,"children":2539},{"style":325},[2540],{"type":50,"value":345},{"type":45,"tag":78,"props":2542,"children":2543},{"style":331},[2544],{"type":50,"value":345},{"type":45,"tag":78,"props":2546,"children":2547},{"style":352},[2548],{"type":50,"value":355},{"type":45,"tag":78,"props":2550,"children":2551},{"style":331},[2552],{"type":50,"value":360},{"type":45,"tag":78,"props":2554,"children":2555},{"style":319},[2556],{"type":50,"value":518},{"type":45,"tag":78,"props":2558,"children":2559},{"class":80,"line":90},[2560,2564,2568,2572,2576,2580,2584,2588,2592,2596,2600],{"type":45,"tag":78,"props":2561,"children":2562},{"style":325},[2563],{"type":50,"value":1596},{"type":45,"tag":78,"props":2565,"children":2566},{"style":331},[2567],{"type":50,"value":277},{"type":45,"tag":78,"props":2569,"children":2570},{"style":337},[2571],{"type":50,"value":379},{"type":45,"tag":78,"props":2573,"children":2574},{"style":325},[2575],{"type":50,"value":345},{"type":45,"tag":78,"props":2577,"children":2578},{"style":331},[2579],{"type":50,"value":388},{"type":45,"tag":78,"props":2581,"children":2582},{"style":391},[2583],{"type":50,"value":394},{"type":45,"tag":78,"props":2585,"children":2586},{"style":331},[2587],{"type":50,"value":399},{"type":45,"tag":78,"props":2589,"children":2590},{"style":325},[2591],{"type":50,"value":404},{"type":45,"tag":78,"props":2593,"children":2594},{"style":331},[2595],{"type":50,"value":409},{"type":45,"tag":78,"props":2597,"children":2598},{"style":325},[2599],{"type":50,"value":360},{"type":45,"tag":78,"props":2601,"children":2602},{"style":331},[2603],{"type":50,"value":634},{"type":45,"tag":78,"props":2605,"children":2606},{"class":80,"line":99},[2607],{"type":45,"tag":78,"props":2608,"children":2609},{"style":325},[2610],{"type":50,"value":160},{"type":45,"tag":46,"props":2612,"children":2613},{},[2614],{"type":50,"value":2250},{"type":45,"tag":67,"props":2616,"children":2618},{"className":298,"code":2617,"language":300,"meta":71,"style":71},"const query = useLiveQuery((q) => q.from({ todo: todoCollection }))\n\u002F\u002F Use query.data, query.isLoading\n",[2619],{"type":45,"tag":74,"props":2620,"children":2621},{"__ignoreMap":71},[2622,2701],{"type":45,"tag":78,"props":2623,"children":2624},{"class":80,"line":81},[2625,2629,2633,2637,2641,2645,2649,2653,2657,2661,2665,2669,2673,2677,2681,2685,2689,2693,2697],{"type":45,"tag":78,"props":2626,"children":2627},{"style":319},[2628],{"type":50,"value":322},{"type":45,"tag":78,"props":2630,"children":2631},{"style":325},[2632],{"type":50,"value":328},{"type":45,"tag":78,"props":2634,"children":2635},{"style":331},[2636],{"type":50,"value":334},{"type":45,"tag":78,"props":2638,"children":2639},{"style":337},[2640],{"type":50,"value":340},{"type":45,"tag":78,"props":2642,"children":2643},{"style":325},[2644],{"type":50,"value":345},{"type":45,"tag":78,"props":2646,"children":2647},{"style":331},[2648],{"type":50,"value":345},{"type":45,"tag":78,"props":2650,"children":2651},{"style":352},[2652],{"type":50,"value":355},{"type":45,"tag":78,"props":2654,"children":2655},{"style":331},[2656],{"type":50,"value":360},{"type":45,"tag":78,"props":2658,"children":2659},{"style":319},[2660],{"type":50,"value":365},{"type":45,"tag":78,"props":2662,"children":2663},{"style":325},[2664],{"type":50,"value":370},{"type":45,"tag":78,"props":2666,"children":2667},{"style":331},[2668],{"type":50,"value":277},{"type":45,"tag":78,"props":2670,"children":2671},{"style":337},[2672],{"type":50,"value":379},{"type":45,"tag":78,"props":2674,"children":2675},{"style":325},[2676],{"type":50,"value":345},{"type":45,"tag":78,"props":2678,"children":2679},{"style":331},[2680],{"type":50,"value":388},{"type":45,"tag":78,"props":2682,"children":2683},{"style":391},[2684],{"type":50,"value":394},{"type":45,"tag":78,"props":2686,"children":2687},{"style":331},[2688],{"type":50,"value":399},{"type":45,"tag":78,"props":2690,"children":2691},{"style":325},[2692],{"type":50,"value":404},{"type":45,"tag":78,"props":2694,"children":2695},{"style":331},[2696],{"type":50,"value":409},{"type":45,"tag":78,"props":2698,"children":2699},{"style":325},[2700],{"type":50,"value":414},{"type":45,"tag":78,"props":2702,"children":2703},{"class":80,"line":90},[2704],{"type":45,"tag":78,"props":2705,"children":2706},{"style":310},[2707],{"type":50,"value":2708},"\u002F\u002F Use query.data, query.isLoading\n",{"type":45,"tag":46,"props":2710,"children":2711},{},[2712,2714,2720],{"type":50,"value":2713},"Direct destructuring captures values at creation time. Use dot notation or wrap with ",{"type":45,"tag":74,"props":2715,"children":2717},{"className":2716},[],[2718],{"type":50,"value":2719},"$derived",{"type":50,"value":277},{"type":45,"tag":46,"props":2722,"children":2723},{},[2724],{"type":50,"value":2725},"Source: packages\u002Fsvelte-db\u002Fsrc\u002FuseLiveQuery.svelte.ts",{"type":45,"tag":46,"props":2727,"children":2728},{},[2729],{"type":50,"value":2730},"See also: db-core\u002Flive-queries\u002FSKILL.md — for query builder API.",{"type":45,"tag":46,"props":2732,"children":2733},{},[2734],{"type":50,"value":2735},"See also: db-core\u002Fmutations-optimistic\u002FSKILL.md — for mutation patterns.",{"type":45,"tag":2737,"props":2738,"children":2739},"style",{},[2740],{"type":50,"value":2741},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":2743,"total":189},[2744,2758,2769,2780,2793,2806,2819],{"slug":2745,"name":2745,"fn":2746,"description":2747,"org":2748,"tags":2749,"stars":20,"repoUrl":21,"updatedAt":2757},"angular-db","integrate TanStack DB with Angular","Angular bindings for TanStack DB. injectLiveQuery inject function with Angular signals (Signal\u003CT>) for all return values. Reactive params pattern ({ params: () => T, query: ({ params, q }) => QueryBuilder }) for dynamic queries. Must be called in injection context. Angular 17+ control flow (@if, @for) and signal inputs supported. Import from @tanstack\u002Fangular-db (re-exports all of @tanstack\u002Fdb).\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2750,2753,2754],{"name":2751,"slug":2752,"type":15},"Angular","angular",{"name":17,"slug":18,"type":15},{"name":2755,"slug":2756,"type":15},"TypeScript","typescript","2026-07-16T06:01:16.345046",{"slug":37,"name":37,"fn":2759,"description":2760,"org":2761,"tags":2762,"stars":20,"repoUrl":21,"updatedAt":2768},"manage database collections with TanStack DB","TanStack DB core concepts: createCollection with queryCollectionOptions, electricCollectionOptions, powerSyncCollectionOptions, rxdbCollectionOptions, trailbaseCollectionOptions, localOnlyCollectionOptions. Live queries via query builder (from, where, join, select, groupBy, orderBy, limit). Optimistic mutations with draft proxy (collection.insert, collection.update, collection.delete). createOptimisticAction, createTransaction, createPacedMutations. Entry point for all TanStack DB skills.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2763,2766,2767],{"name":2764,"slug":2765,"type":15},"Data Modeling","data-modeling",{"name":17,"slug":18,"type":15},{"name":9,"slug":8,"type":15},"2026-07-17T06:06:40.214285",{"slug":2770,"name":2771,"fn":2772,"description":2773,"org":2774,"tags":2775,"stars":20,"repoUrl":21,"updatedAt":2779},"db-corecollection-setup","db-core\u002Fcollection-setup","set up typed collections in TanStack DB","Creating typed collections with createCollection. Adapter selection: queryCollectionOptions (REST\u002FTanStack Query), electricCollectionOptions (ElectricSQL real-time sync), powerSyncCollectionOptions (PowerSync SQLite), rxdbCollectionOptions (RxDB), trailbaseCollectionOptions (TrailBase), localOnlyCollectionOptions, localStorageCollectionOptions. CollectionConfig options: getKey, schema, sync, gcTime, autoIndex (default off), defaultIndexType, syncMode (eager\u002Fon-demand, plus progressive for Electric). StandardSchema validation with Zod\u002FValibot\u002FArkType. Collection lifecycle (idle\u002Floading\u002Fready\u002Ferror). Adapter-specific sync patterns including Electric txid tracking, Query direct writes, and PowerSync query-driven sync with onLoad\u002FonLoadSubset hooks.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2776,2777,2778],{"name":2764,"slug":2765,"type":15},{"name":17,"slug":18,"type":15},{"name":9,"slug":8,"type":15},"2026-07-26T05:48:58.321777",{"slug":2781,"name":2782,"fn":2783,"description":2784,"org":2785,"tags":2786,"stars":20,"repoUrl":21,"updatedAt":2792},"db-corecustom-adapter","db-core\u002Fcustom-adapter","build custom TanStack collection adapters","Building custom collection adapters for new backends. SyncConfig interface: sync function receiving begin, write, commit, markReady, truncate, metadata primitives. ChangeMessage format (insert, update, delete). loadSubset for on-demand sync. LoadSubsetOptions (where, orderBy, limit, cursor). Expression parsing: parseWhereExpression, parseOrderByExpression, extractSimpleComparisons, parseLoadSubsetOptions. Collection options creator pattern. rowUpdateMode (partial vs full). Subscription lifecycle and cleanup functions. Persisted sync metadata API (metadata.row and metadata.collection) for storing per-row and per-collection adapter state.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2787,2788,2791],{"name":17,"slug":18,"type":15},{"name":2789,"slug":2790,"type":15},"Engineering","engineering",{"name":9,"slug":8,"type":15},"2026-07-16T06:04:06.862485",{"slug":2794,"name":2795,"fn":2796,"description":2797,"org":2798,"tags":2799,"stars":20,"repoUrl":21,"updatedAt":2805},"db-corelive-queries","db-core\u002Flive-queries","build live queries with TanStack DB","Query builder fluent API: from, where, join, leftJoin, rightJoin, innerJoin, fullJoin, select, fn.select, groupBy, having, orderBy, limit, offset, distinct, findOne. Operators: eq, gt, gte, lt, lte, like, ilike, inArray, isNull, isUndefined, and, or, not. Aggregates: count, sum, avg, min, max. String functions: upper, lower, length, concat. Utility: coalesce, caseWhen. Math: add. $selected namespace. createLiveQueryCollection. Derived collections. Predicate push-down. Incremental view maintenance via differential dataflow (d2ts). Virtual properties ($synced, $origin, $key, $collectionId). Includes subqueries for hierarchical data. toArray and concat(toArray(...)) scalar includes. queryOnce for one-shot queries. createEffect for reactive side effects (onEnter, onUpdate, onExit, onBatch).\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2800,2801,2804],{"name":17,"slug":18,"type":15},{"name":2802,"slug":2803,"type":15},"SQL","sql",{"name":9,"slug":8,"type":15},"2026-07-16T06:04:08.757365",{"slug":2807,"name":2808,"fn":2809,"description":2810,"org":2811,"tags":2812,"stars":20,"repoUrl":21,"updatedAt":2818},"db-coremutations-optimistic","db-core\u002Fmutations-optimistic","manage optimistic mutations in TanStack DB","collection.insert, collection.update (Immer-style draft proxy), collection.delete. createOptimisticAction (onMutate + mutationFn). createPacedMutations with debounceStrategy, throttleStrategy, queueStrategy. createTransaction, getActiveTransaction, ambient transaction context. Transaction lifecycle (pending\u002Fpersisting\u002Fcompleted\u002Ffailed). Mutation merging. onInsert\u002FonUpdate\u002FonDelete handlers. PendingMutation type. Transaction.isPersisted.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2813,2814,2817],{"name":17,"slug":18,"type":15},{"name":2815,"slug":2816,"type":15},"Frontend","frontend",{"name":9,"slug":8,"type":15},"2026-07-26T05:48:57.301803",{"slug":2820,"name":2821,"fn":2822,"description":2823,"org":2824,"tags":2825,"stars":20,"repoUrl":21,"updatedAt":2834},"db-corepersistence","db-core\u002Fpersistence","implement SQLite-backed persistence for TanStack DB","SQLite-backed persistence for TanStack DB collections. persistedCollectionOptions wraps any adapter (Electric, Query, PowerSync, or local-only) with durable local storage. Platform adapters: browser (WA-SQLite OPFS), React Native (op-sqlite), Expo (expo-sqlite), Electron (IPC), Node (better-sqlite3), Capacitor, Tauri, Cloudflare Durable Objects. Multi-tab\u002Fmulti-process coordination via BrowserCollectionCoordinator \u002F ElectronCollectionCoordinator \u002F SingleProcessCoordinator. schemaVersion for migration resets. Local-only mode for offline-first without a server.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2826,2827,2830,2833],{"name":17,"slug":18,"type":15},{"name":2828,"slug":2829,"type":15},"Persistence","persistence",{"name":2831,"slug":2832,"type":15},"SQLite","sqlite",{"name":9,"slug":8,"type":15},"2026-07-17T06:06:39.182084",{"items":2836,"total":2976},[2837,2851,2863,2875,2890,2902,2912,2922,2935,2945,2956,2966],{"slug":2838,"name":2838,"fn":2839,"description":2840,"org":2841,"tags":2842,"stars":2848,"repoUrl":2849,"updatedAt":2850},"aggregation","perform data aggregation in TanStack Table","Aggregate TanStack Table columns independently of grouping, including grand totals, caller-selected row totals, multiple keyed aggregations, custom context-based definitions, grouped merges, manual values, and worker constraints.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2843,2846,2847],{"name":2844,"slug":2845,"type":15},"Data Analysis","data-analysis",{"name":2815,"slug":2816,"type":15},{"name":9,"slug":8,"type":15},28175,"https:\u002F\u002Fgithub.com\u002FTanStack\u002Ftable","2026-07-30T05:25:59.429787",{"slug":2852,"name":2852,"fn":2853,"description":2854,"org":2855,"tags":2856,"stars":2848,"repoUrl":2849,"updatedAt":2862},"api-not-found","diagnose TanStack Table API errors","Diagnose missing TanStack Table v9 exports, options, state slices, and instance methods. Load before inventing an API when code sees a type error, undefined feature method, absent object key, adapter mismatch, or v8-shaped example.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2857,2860,2861],{"name":2858,"slug":2859,"type":15},"Debugging","debugging",{"name":2815,"slug":2816,"type":15},{"name":9,"slug":8,"type":15},"2026-07-30T05:26:05.418735",{"slug":2864,"name":2864,"fn":2865,"description":2866,"org":2867,"tags":2868,"stars":2848,"repoUrl":2849,"updatedAt":2874},"cell-selection","select rectangular cell ranges in tables","Select rectangular cell ranges with cellSelectionFeature: two-corner range state keyed by row and column id, mousedown\u002Fmouseenter handlers, selection edges, render-order resolution under pinning, and autoResetCellSelection. Load when ranges widen unexpectedly after sorting or column reordering, when a drag re-renders the whole table, or when building copy-to-clipboard from a selection.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2869,2870,2871],{"name":2844,"slug":2845,"type":15},{"name":9,"slug":8,"type":15},{"name":2872,"slug":2873,"type":15},"UI Components","ui-components","2026-07-30T05:25:38.403427",{"slug":2876,"name":2876,"fn":2877,"description":2878,"org":2879,"tags":2880,"stars":2848,"repoUrl":2849,"updatedAt":2889},"client-vs-server","manage TanStack Table data pipelines","Choose client or server ownership for filtering, grouping, sorting, expanding, and pagination in TanStack Table v9. Load for manual* flags, mixed pipelines, server counts, or deciding which dataset each row-model stage receives.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2881,2884,2885,2888],{"name":2882,"slug":2883,"type":15},"Data Pipeline","data-pipeline",{"name":2815,"slug":2816,"type":15},{"name":2886,"slug":2887,"type":15},"Performance","performance",{"name":9,"slug":8,"type":15},"2026-07-30T05:25:45.400104",{"slug":2891,"name":2891,"fn":2892,"description":2893,"org":2894,"tags":2895,"stars":2848,"repoUrl":2849,"updatedAt":2901},"column-faceting","build faceted filter UIs","Build faceted filter UIs with columnFacetingFeature, facetedRowModel, facetedUniqueValues, and facetedMinMaxValues. Load for facet counts, numeric ranges, own-filter exclusion, or server-page facet completeness.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2896,2899,2900],{"name":2897,"slug":2898,"type":15},"Data Visualization","data-visualization",{"name":2815,"slug":2816,"type":15},{"name":9,"slug":8,"type":15},"2026-07-30T05:25:41.397257",{"slug":2903,"name":2903,"fn":2904,"description":2905,"org":2906,"tags":2907,"stars":2848,"repoUrl":2849,"updatedAt":2911},"column-filtering","implement column filtering in TanStack Table","Filter columns with columnFilteringFeature, filteredRowModel, filterFns, filterMeta, nested-row direction, and manualFiltering. Load for accessor compatibility, controlled filter updaters, fuzzy metadata, or client\u002Fserver ownership.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2908,2909,2910],{"name":2844,"slug":2845,"type":15},{"name":2815,"slug":2816,"type":15},{"name":9,"slug":8,"type":15},"2026-07-30T05:25:53.391632",{"slug":2913,"name":2913,"fn":2914,"description":2915,"org":2916,"tags":2917,"stars":2848,"repoUrl":2849,"updatedAt":2921},"column-ordering","manage TanStack Table column ordering","Control TanStack Table v9 leaf columnOrder with stable IDs while accounting for pinning regions, visibility, and groupedColumnMode precedence. Load for drag-and-drop columns or rendered order that differs from state.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2918,2919,2920],{"name":2815,"slug":2816,"type":15},{"name":9,"slug":8,"type":15},{"name":2872,"slug":2873,"type":15},"2026-07-30T05:26:03.37801",{"slug":2923,"name":2923,"fn":2924,"description":2925,"org":2926,"tags":2927,"stars":2848,"repoUrl":2849,"updatedAt":2934},"column-pinning","configure column pinning in TanStack Table","Pin columns into logical start, center, and end regions with columnPinningFeature and renderer-owned sticky CSS. Load for RTL offsets, z-index, backgrounds, overflow, widths, gaps, or overlaps.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2928,2931,2932,2933],{"name":2929,"slug":2930,"type":15},"CSS","css",{"name":2815,"slug":2816,"type":15},{"name":9,"slug":8,"type":15},{"name":2872,"slug":2873,"type":15},"2026-07-30T05:25:55.377366",{"slug":2936,"name":2936,"fn":2937,"description":2938,"org":2939,"tags":2940,"stars":2848,"repoUrl":2849,"updatedAt":2944},"column-resizing","implement column resizing in TanStack Table","Wire columnResizingFeature, header.getResizeHandler, resize mode and direction, pointer or touch events, and performant CSS-variable updates. Load when resize state changes but widths do not, or large tables resize slowly.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2941,2942,2943],{"name":2815,"slug":2816,"type":15},{"name":9,"slug":8,"type":15},{"name":2872,"slug":2873,"type":15},"2026-07-30T05:25:51.400011",{"slug":2946,"name":2946,"fn":2947,"description":2948,"org":2949,"tags":2950,"stars":2848,"repoUrl":2849,"updatedAt":2955},"column-sizing","configure column sizing in TanStack Table","Use columnSizingFeature numeric size, minSize, maxSize, getSize, getStart, getAfter, and total-size APIs in table, grid, or flex CSS. Load for auto or percentage misconceptions and sizing\u002Fpinning layout mismatch.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2951,2952,2953,2954],{"name":2929,"slug":2930,"type":15},{"name":2815,"slug":2816,"type":15},{"name":9,"slug":8,"type":15},{"name":2872,"slug":2873,"type":15},"2026-07-30T05:25:48.703799",{"slug":2957,"name":2957,"fn":2958,"description":2959,"org":2960,"tags":2961,"stars":2848,"repoUrl":2849,"updatedAt":2965},"column-visibility","manage column visibility in TanStack Table","Hide columns with columnVisibilityFeature while rendering visibility-aware header, column, and cell collections. Load when hidden columns remain in the DOM, false-versus-absent state is confused, or enableHiding is misunderstood.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2962,2963,2964],{"name":2815,"slug":2816,"type":15},{"name":9,"slug":8,"type":15},{"name":2872,"slug":2873,"type":15},"2026-07-30T05:25:47.367943",{"slug":2967,"name":2967,"fn":2968,"description":2969,"org":2970,"tags":2971,"stars":2848,"repoUrl":2849,"updatedAt":2975},"core","build data grids with TanStack Table","Use TanStack Table v9 as a headless data-grid state and row-processing engine. Load for first-table architecture, stable data and columns, row numbering with getDisplayIndex, semantic rendering, framework adapter choice, or deciding what Table owns versus the renderer.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2972,2973,2974],{"name":2844,"slug":2845,"type":15},{"name":2815,"slug":2816,"type":15},{"name":2872,"slug":2873,"type":15},"2026-07-30T05:25:52.366295",125]