Supabase
Open source Firebase giving client side ORM that directly accesses DB, can listen for changes
Can generate types with
supabase gen types typescript --project-id abcdefghijklmnopqrst > database.types.ts
Railway
Setup
Querying
Can add filters to match a pattern, greater less then, in an array etc.
Can add modifiers like .order(), .upsert()
Insert
Postgres Functions
Extra
If you want to do an upsert based on multiple column uniqueness, need to create multicolumn unique index in SQL Editor with
CREATE UNIQUE INDEX user_date ON voter_guide(user_id, election_date);
Last updated