Drizzle has flexible API for including or excluding columns in queries. To include all columns you can use .select()
method like this:
To include specific columns you can use .select()
method like this:
To include all columns with extra columns you can use getTableColumns()
utility function like this:
To exclude columns you can use getTableColumns()
utility function like this:
This is how you can include or exclude columns with joins:
Drizzle has useful relational queries API, that lets you easily include or exclude columns in queries. This is how you can include all columns:
This is how you can include specific columns using relational queries:
This is how you can include all columns with extra columns using relational queries:
This is how you can exclude columns using relational queries:
This is how you can include or exclude columns with relations using relational queries:
This is how you can create custom solution for conditional select: