I am looking into using Google Datastore for a project of mine. I would like to retrieve all the keys of the entities but I would like it sorted by newest -> oldest:
query.select('__key__').order('DateCreated');;
query.run(function(err, entities) {
var keys = entities.map(function(entity) {
return entity[datastore.KEY];
});
});
If inside of my entity I have a "Date Created" field can I use this field to sort the results while the query still being considered a "free" operation meaning it will cost me nothing to get the results? Or if I do sort this using my own attribute inside the entity does this then cost me something?