java - Rounding a value in JDOQL -
i've got data in gae data store. want write jdoql against data takes 1 of columns , rounds value of it. can this?
do mean, can update data in datastore have rounded value? if so, sure. query them, update property, , store them in datastore.
if mean, can write query filters based on rounded value instead of real value, yes. you'd adjust queries , filter values. example, if want entities rounded value >= 5, you'd use 4.5 filter value:
query query = pm.newquery(foo.class, "property >= 4.5");
if want entities rounded value of 5 exactly, you'd query between 4.5 , 5.5:
query query = pm.newquery(foo.class, "property >= 4.5 && property < 5.5");
Comments
Post a Comment