friendship query that returns the other user object
I have two tables:
and
I want to query the friendships table for the local user id from the supabase client (supabase auth table syncs rows to the profiles table), and return an object like {id:friendship.id, status:friendship.status, user:profile} where the user is the other user, unfortunately most ai coding assistants dont have full or up to date knowledge of drizzle orms (including the one on the drizzle docs site) so is this possible with just drizzle syntax's and how can i do this ?
5 Replies
Not particularly what I was looking for, but thank you for your Insightful response
for anyone coming across this in the future, this is the query that i ended up using
@! AlexNotTheLion yes using standard select and innerJoin is another option.
in your innerJoin and where clauses I'd suggest using the drizzle filter functions instead of raw sql
Drizzle ORM - Filters
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
updated! thank you kindly 🙂