Skip to content

Join query select only fields of one table #933

Closed Answered by binajmen
Tirke asked this question in Q&A
Discussion options

You must be logged in to vote

Someone on Discord suggested this:
https://orm.drizzle.team/docs/goodies#get-typed-table-columns

It works pretty well:

db.select({ ...getTableColumns(accounts) }).from(accounts)

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Tirke
Comment options

@binajmen
Comment options

Answer selected by Tirke
@Tirke
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants