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

Function extractFromQuery

packages/db/src/query/live/utils.ts:43–62  ·  view source on GitHub ↗
(q: any)

Source from the content-addressed store, hash-verified

41
42 // Helper function to recursively extract collections from a query
43 function extractFromQuery(q: any) {
44 // Extract from FROM clause
45 if (q.from) {
46 extractFromSource(q.from)
47 }
48
49 // Extract from JOIN clauses
50 if (q.join && Array.isArray(q.join)) {
51 for (const joinClause of q.join) {
52 if (joinClause.from) {
53 extractFromSource(joinClause.from)
54 }
55 }
56 }
57
58 // Extract from SELECT (for IncludesSubquery)
59 if (q.select) {
60 extractFromSelect(q.select)
61 }
62 }
63
64 function extractFromSelect(select: any) {
65 for (const [key, value] of Object.entries(select)) {

Callers 4

extractFromSourceFunction · 0.85
extractFromSelectFunction · 0.85
extractFromSelectValueFunction · 0.85

Calls 2

extractFromSourceFunction · 0.85
extractFromSelectFunction · 0.85

Tested by

no test coverage detected