开发者

Retrieve last row from the Google DataStore Java

I want to retrieve the last row from the data store so how can i do that?? I know the long method i.e

 for(Table_name e: resultset)
     {
            cnt++;
     }
  results.get(cnt).getvalue();

I have String with (number) as primary key.can i use it to get descending order???

Is there any method through开发者_运维技巧 which i can get the last row???


You should probably sort in the opposite order (if possible for your query, the data store has some restrictions here) and get the first result of that.

Also, if you store numbers in String fields the order may not be what you want it to be (you might need padding here).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜