Masterminds / squirrel

Fluent SQL generation for golang
Other
7.01k stars 465 forks source link

query.OrderBy working fine for DESC but not for ASC #349

Open huzaifamk opened 1 year ago

huzaifamk commented 1 year ago

I have a Quotes table, there is a created_at time, in the format of DATETIME, I am using the line

query = query.OrderBy(Quotes.created_at DESC")

Which totally works fine, but when I use it as

query = query.OrderBy(Quotes.created_at ASC")

It is throwing error, I need it in both order as it is necessary, can anybody recommend a fix or something that will help? Thanks!