tiefpunkt / thingstore

MIT License
6 stars 3 forks source link

Fix for issue #26 #27

Closed tiefpunkt closed 10 years ago

tiefpunkt commented 10 years ago

This should fix #26 by not referencing an ID from the first query in the second one, but instead using the timestamp for both queries. Might not be as efficient, but it works ;)

@ptu please check if this breaks anything else. Seems to work fine, and I also added some performance optimization™.

ptu commented 10 years ago

i think i tried this one but had another error/issue, also you are not doing the limit on app side ;)

the best thing would be to alter the query of r_values to include the "invisible value" but i couldn't figure out how.

tiefpunkt commented 10 years ago

Do you remember what the issue was?

Not doing the limit on application side was what I wanted to achieve.

ptu commented 10 years ago

meant database side, sorry.

your code is more or less the same as mine i think.

query all object (db query with .filter()) and then just take the last one with [:1](application side) i must confess, my code is a bit sloppier with memory ;D

it would be ideal to forge a Query for .filter() to just return the one object.

regarding the issue, i don't know anymore. but nevermind, if it works now leave it as is. did too much code review and brainfucks this week to remember the ones from the weekend. will now check out the branch and take a look at it with my testdata.