[Bugs] #1342 IMME: range queries use lexical comparison, not numerical

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Wed Sep 23 09:01:54 EDT 2009


#1342: range queries use lexical comparison, not numerical
--------------------------------+-------------------------------------------
    Reporter:  sascha_silbe     |          Owner:  sascha_silbe     
        Type:  defect           |         Status:  new              
    Priority:  Immediate        |      Milestone:  0.86             
   Component:  sugar-datastore  |        Version:  Git as of bugdate
    Severity:  Minor            |       Keywords:  r?               
Distribution:  Unspecified      |   Status_field:  Assigned         
--------------------------------+-------------------------------------------

Comment(by tomeu):

 Replying to [comment:9 sascha_silbe]:
 > Replying to [comment:8 tomeu]:
 > > Sorry, I'm still not getting it. Why would we fail silently when
 querying?
 > Because timestamp is stored using sortable_serialise() on
 create()/update(), but if you pass a (decimal) string for timestamp to
 find() it will use it as-is. Comparing a decimal string to one returned by
 sortable_serialise() doesn't give any useful result.

 But if we know that timestamp is a serialized decimal number, why not
 treat it as such in find()?

-- 
Ticket URL: <http://bugs.sugarlabs.org/ticket/1342#comment:10>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list