Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query builder #24

Open
nchanged opened this issue Nov 26, 2020 · 2 comments
Open

Query builder #24

nchanged opened this issue Nov 26, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@nchanged
Copy link

Hey, first of all, great project!

Is your feature request related to a problem? Please describe.
One of the most annoying things about MongoDB and GOlang is querying.

Describe the solution you'd like
I would like to see a query build that is simple enough and doesn't involve bson. For example

q := Query("field1", "value1") // optional "and"
q.And("field2", "value2").And("field3", "value3")
  .And(Query("foo1", "v1").Or("foo2", "v2"))

This would greatly simplify most generic queries.

@mehran-prs
Copy link
Member

mehran-prs commented Nov 27, 2020

Thanks, @nchanged.

Yeah, a query builder can be a good idea and we'll try to implement it.

@mehran-prs mehran-prs added the enhancement New feature or request label Nov 27, 2020
@WenyXu
Copy link

WenyXu commented May 31, 2021

Hi, I Wrote a sample demo here https://github.com/go-odm/odm/blob/master/query.go, which inspired https://github.com/aheckmann/mquery

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants