4

I have the following query:

db.asset.where("type").equals(type).each(e => { ... });

now e holds files (e.binary) as binary strings. in the each I only want to work on a specific set of properties but on not e.binary, since it slows down the app. Is there a way to select a set of properties which is returned? Or is it only possible to return complete rows?

Thanks in advance :)

Nilanka Manoj
  • 3,527
  • 4
  • 17
  • 48
Fabian
  • 748
  • 2
  • 11
  • 20

1 Answers1

-1

Try this...

db.asset.where("type").equals(type).each(e => {
     return { FirstProperty: e.MyProperty1, SecondProperty: e.MyProperty2 };
}).then(function(myProperties){
   ...
});
spadelives
  • 1,588
  • 13
  • 23