currently, the Column type has no as method, so I use column.getSQL().mapWith(column.mapFromDriverValue).as('alias') to properly select a column with alias.
const result = await db.select({
sellerId: user.id.getSQL().mapWith(user.id.mapFromDriverValue).as('sellerId')
})
It would be nice to be able to just do it with:
const result = await db.select({
sellerId: user.id.as('sellerId')
})
Describe what you want
currently, the
Column
type has noas
method, so I usecolumn.getSQL().mapWith(column.mapFromDriverValue).as('alias')
to properly select a column with alias.It would be nice to be able to just do it with: