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

Investigate helper functions #12

Open
AngelMunoz opened this issue Nov 23, 2020 · 1 comment
Open

Investigate helper functions #12

AngelMunoz opened this issue Nov 23, 2020 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@AngelMunoz
Copy link
Owner

taken from #1
add method helpers to create things like filters, fields, matching criteria

examples of this can be

find "users" {
  filter (fun m -> m.prop = value)
}

or

find "users" {
  filter "prop" gt 10
}

the main blocker right now for this is that in any case, we must emit 100% compatible JSON to https://docs.mongodb.com/manual/reference/command/
so there needs to be some investigation around this if this is something people want to add into the mix

@AngelMunoz AngelMunoz added enhancement New feature or request help wanted Extra attention is needed labels Nov 23, 2020
@AngelMunoz AngelMunoz mentioned this issue Nov 23, 2020
6 tasks
@AngelMunoz
Copy link
Owner Author

@Alkasai: I like the new typed results!
What do you think about wrapping this into some sort of function that just returns seq of type User, instead of cursor?

let result = db.RunCommand<FindResult<User>>(JsonCommand over20)
printfn $"FindResult Ok: %f{result.ok}"
result.cursor.firstBatch |> Seq.iter (fun value -> printfn $"%A{value}")
This seems like a useful addition, we should make a list of functions that can help

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

No branches or pull requests

1 participant