You are not logged in.
Original TSynTableStatement has a property: OrderByDesc:Boolean, it will remember whether last word=desc.
But think if a SQL like this: select name,price,year from cata where 1=1 order by price desc, year, name . Then TSynTableStatement will work incorrectly, it will ignore , year,name . So I have made some changes , add a property: OrderByDescField:TSQLFieldIndexDynArray, it will remember every SQL-Field marked with "DESC" .
Test passed with TestSQL3 on FPC&Delphi7 on windows.
I have created a P/R on github, https://github.com/synopse/mORMot/pull/123, Please review it, thanks ab.
Offline