You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm building an app where there are multiple possible user types, each with a corresponding table in the database. I'd like to do a dynamic query where I can select all columns in a database for any table (as in "*") but exclude a single column (a user_id column in this instance).
Basically:
const{ data, error }=awaitsupabase.from(`profiles_${userType}`)// How do I exclude the user_id column here?.select("*");
Being able to do this would keep me from having to write a huge ternary/switch statement with verbose .select() queries that list every column name exceptuser_id.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm building an app where there are multiple possible user types, each with a corresponding table in the database. I'd like to do a dynamic query where I can select all columns in a database for any table (as in
"*"
) but exclude a single column (auser_id
column in this instance).Basically:
Being able to do this would keep me from having to write a huge ternary/switch statement with verbose
.select()
queries that list every column name exceptuser_id
.Beta Was this translation helpful? Give feedback.
All reactions