3 Replies
Technically you can't.
Your best option is to have an other table with wallet_address as primary key and userId as foreign key (1 user can have many wallets but a given wallet has only one owner).
Then, query api will help to grab everything together: https://orm.drizzle.team/docs/rqb
Drizzle ORM - Query
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
@Raphaël M (@rphlmr) ⚡ is right, however technically you can build your own sql query that will only allow the insertion of unique wallet objects based on a predefined key.