ยฉ 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabaseโ€ข4y agoโ€ข
2 replies
gtims123

Paginating two joined tables with range()

I've been stuck on figuring out how to paginate two tables that were joined. Code:

let result = await supabase
.from('Events')
.select(
*, Market!Market_event_fkey!inner (*))
*, Market!Market_event_fkey!inner (*))
)
.eq(
'Market.event',
'FC Barcelona vs Madrid 10/2/22',
).range(0, 9, {foreignTable: 'Market'})

The {foreignTable: 'Market'} makes the above query not run. I'm trying to get 10 entries from the Market table for which 'event' equals 'FC Barcelona vs Madrid 10/2/22'. I would appreciate any help here.
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

difference between rangeGt(), rangeGte(), rangeLt(), rangeLte(), rangeAdjacent()
SupabaseSSupabase / help-and-questions
4y ago
Duplicates when Paginating
SupabaseSSupabase / help-and-questions
4y ago
how to flatten returned data from joined tables?
SupabaseSSupabase / help-and-questions
4y ago
How to select from two tables?
SupabaseSSupabase / help-and-questions
4y ago