Introducing collection constraints and social queries

Until now the in operator in BQL let you make queries over relationships. For example:'cities').query('where this in ?.favoriteCities', someUser)

This example lets you query the favoriteCities of a user. You could add more constraints if you need to.

Today we introduce a new functionality to the in operator. You can now use this operator to query over a set of objects if you know their identifiers. So, in JavaScript you can do:

var collection = backbeam.collection(id1, id2, id3)'cities').query('where this in ?', collection)

Well... that's nice, but that's not amazing! You know what is amazing? That you can use this with the user entity and use either emails or Twitter ids or Facebook ids or a combination of any of them!

var collection = backbeam.collection().addTwitter(someTwitterId).addEmail('')'user').query('where this in ?', collection)

You can also use the not in variant of the operator. So now it's super easy to make sophisticated queries over your users or implement functionality to import contacts from the social networks or the user's agenda.

Learn how to make collection constraints in Android, in iOS or in JavaScript