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 :)
We could add a tool to generate a per-model typed Query object. So instead of:
You would have:
This would avoid pitfalls around runtime type mismatches and typos.
And then you win the world :)