You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Limit accept a function and work like reduce #3724
Ran across a problem that would be cool if it can be directly solved in rethinkdb.
Example: If i was building an app that booking air planes. The plane as so many seats and can handle so much weight. I need to make sure the passanger manifest does not go over eater limit.
This would first look in the manifest table and get everyone on the flight abc. and it would filter out anyone that was over 1000kg, then we would have a limit operation. this has 2 parts the check function which is to check to see if the result of the function that falls before is less then or eque to 100000 if its gets over then we will stop accepting docs at the limit and move on to the last limit to sure no more then 525 people get onto the flight. now the second arg takes a function that has 2 args the result from the previus run of the function and the document we are passing on. its simply going to keep adding docs until we get to the limit check we put before.
@wojons I sketched out a proposal for a new command called scan in #3736. @danielmewes pointed out that it is similar to what you propsed here. I'm not sure I fully understand what you are trying to do or what the semantics of r.agg would be, but I think your query could be expressed like this using scan:
Activity
AtnNn commentedon Feb 5, 2015
@wojons I sketched out a proposal for a new command called
scanin #3736. @danielmewes pointed out that it is similar to what you propsed here. I'm not sure I fully understand what you are trying to do or what the semantics ofr.aggwould be, but I think your query could be expressed like this usingscan: