Skip to content

Commit

Permalink
Add getViewSelectedFields util function
Browse files Browse the repository at this point in the history
  • Loading branch information
L-Mario564 committed Nov 13, 2024
1 parent b2f9606 commit eb84274
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drizzle-orm/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ export function getTableColumns<T extends Table>(table: T): T['_']['columns'] {
return table[Table.Symbol.Columns];
}

export function getViewSelectedFields<T extends View>(view: T): T['_']['selectedFields'] {
return view[ViewBaseConfig].selectedFields;
}

/** @internal */
export function getTableLikeName(table: TableLike): string | undefined {
return is(table, Subquery)
Expand Down

0 comments on commit eb84274

Please sign in to comment.