You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi folks, I have a problem, i need to count amount row in table and also get each row. So, i need a field to how amount rows and the rows as results.
My First question is: Can i use tag struct as expression function to override column at runtime? like that:
Second question: exists a way ColumnExpr doesn't clear the select that is using columns of model?
db.Model(Model).ColumnExpr("count(0) over () as Rows").Select()
generates this:
I know, i can use two queries to do that. But, i think this way it is more performant than two queries, in time question.
Beta Was this translation helpful? Give feedback.
All reactions