We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b9b017b commit b0783acCopy full SHA for b0783ac
orm/query_select.go
@@ -74,6 +74,13 @@ func (q *Query[T]) Select(columns ...any) *Query[T] {
74
return q
75
}
76
77
+func (q *Query[T]) SelectAs(column any, as string) *Query[T] {
78
+ colStr, err := q.generateSelectColumns(column)
79
+ q.setErr(err)
80
+ q.columns = append(q.columns, colStr+" as "+as)
81
+ return q
82
+}
83
+
84
func (q *Query[T]) SelectExclude(exceptColumns ...any) *Query[T] {
85
q.columns = nil
86
0 commit comments