© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
4 replies
cbert

How to set asterix in eq()

Hi everyone,
I want to do something like:
const category: string = '*'???

client.from('table').select('*').eq('category', category)
const category: string = '*'???

client.from('table').select('*').eq('category', category)


So If I set a value for 'category' it will filter accordingly, if not it will give back all (or basically ignore the filter).

Thanks!
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

Postgres' built-in `lower` in `eq` query ?
SupabaseSSupabase / help-and-questions
4y ago
How can I create conditional .eq filters?
SupabaseSSupabase / help-and-questions
4y ago
is .eq() chainable for database queries? How to send multiple conditions?
SupabaseSSupabase / help-and-questions
4y ago
How to eq() a table that is not a direct join?
SupabaseSSupabase / help-and-questions
4y ago