objectbox / objectbox-go

Embedded Go Database, the fast alternative to SQLite, gorm, etc.
https://objectbox.io
Apache License 2.0
1.07k stars 46 forks source link

Is there any reason why does not exist functions LessThan, GreaterThan for type PropertyUint64 #9

Closed arumata closed 5 years ago

arumata commented 5 years ago

I'd like to remove records by Id less than some value.

greenrobot commented 5 years ago

You need a Query for that: 1: https://golang.objectbox.io/queries 2: https://godoc.org/github.com/objectbox/objectbox-go/objectbox#Query.Remove

arumata commented 5 years ago

My Id field have type uint64, but PropertyUint64 does not have function LessThan, so I can't use Query.Remove

greenrobot commented 5 years ago

Thanks for clarifying. We'll ensure to put that into the upcoming release (~next week).

greenrobot commented 5 years ago

We just pushed v0.9.0-rc which should fix this. Note that you also need to update libobjectbox to 0.5.0.

Please let us know if that fixes your usage, too. If not, please feel free to reopen. Thank you!