marioreggiori / objectdb

Persistent embedded document-oriented NoSQL database for Dart and Flutter.
https://pub.dev/packages/objectdb
MIT License
190 stars 21 forks source link

Find by property not null #31

Closed lequanghiep74 closed 4 years ago

lequanghiep74 commented 5 years ago

I find first element with property not null but it not working. Please help me to query it. a.first( { Op.not: {'units': null} });

marioreggiori commented 5 years ago

Is the value really null or "not set"?

ali-1989 commented 3 years ago

use this:

a.first( {'units': RegExp(r'.*'), Op.not: {'units': null} }); means: where 'units' exist and is not null.

a.first( {Op.not: {'units': null} }); means: where 'units' exist and is not null OR 'units' is not defined.