is it possible query data that are not equal to th

2019-01-05 05:27发布

Am fetching list of users for my listview (android) i used firebaselistadapter to backing up my listview , I wanna show users data except mine . Like an sql query Select something from usertable where id!=userid;

i wanna fetch all other users data,

2条回答
劫难
2楼-- · 2019-01-05 06:19

Firebase currently only offers a way to include nodes based on the presence of a certain value. You cannot exclude nodes based on the presence of a value.

Update (20160828): I wrote a related answer today that shows how to detect the absence of a property.

查看更多
Root(大扎)
3楼-- · 2019-01-05 06:26

I have the same issue, using angularfire and geofire I am searching for business prospects within a radius and trying to create a lead only for new prospects, that means to exclude any existing account already with an existing relation. To do so I need to open a firebaseObject for each key returned by geofire and after $loaded() , check for _.isNull(loadedFirebaseObject.$value). The lodash function _.isNull() returns null if the firebaseObject path does not exists (a prospect) or undefined if it exists (not a prospect but an existing account).

Is there a better way of doing this?

查看更多
登录 后发表回答