Skip to content

Feature Idea: Query generator #50

@riannucci

Description

@riannucci

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 :)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions