Simplify api query building for datastore by moving burden to datastore.