Forum BigDB Loading a Range, But Excluding Certain Records

Discussion and help relating to the PlayerIO database solution, BigDB.

Loading a Range, But Excluding Certain Records

Postby DogCat » July 9th, 2013, 12:23 am

I'm saving some game session data in BigDB, and am trying to write a simple matchmaking algorithm for pairing a person with a session when they try to start a level.

One of the things I'd like to do as part of this algorithm is to see if there are any session records in the database where "Player2" has not been assigned yet, but I also want to make sure that "Player1" is not the current player (so I don't match people up with themselves accidentally).

I think I can return a range where "Player2" is empty and then filter the results based on the value of "Player1", but I was wondering if there is some method where I can use LoadRange, but say "return records where Player2 is empty, but Player1 != username". I see that I can filter across several record attributed, but I don't see a way that I can exclude certain records based on an attribute value.

Any thoughts? For reference, I am using the Unity3D SDK.
DogCat
 
Posts: 8
Joined: May 10th, 2013, 11:03 pm

Return to BigDB



cron