mirrored from https://chromium.googlesource.com/infra/luci/gae
-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
Description
We could add a tool to generate a per-model typed Query object. So instead of:
q := datastore.NewQuery("Kind").Eq("Property", 1).Lt("OtherThing", "value")You would have:
/// PropertyEq has type func(...int) *KindQuery
// OtherLt has type func(...string) *KindQuery
q := KindQuery().PropertyEq(1).OtherThingLt("value")This would avoid pitfalls around runtime type mismatches and typos.
And then you win the world :)
Reactions are currently unavailable