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

Linq Query Operation #66

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Linq Query Operation #66

wants to merge 3 commits into from

Conversation

albert-du
Copy link

@albert-du albert-du commented Jul 15, 2022

#65

Adds an operation for linq support using an extended version of the FSharp.Linq.QueryBuilder query computational expression called cosmosQuery.

CosmosQueryBuilder extends the standard query syntax by mapping F# functions to BCL equivalents (eg: abs -> System.Math.Abs) to allow for utilization in cosmos queries.
https://docs.microsoft.com/en-us/azure/cosmos-db/sql/sql-query-linq-to-sql

Adds the operation to the sample program:

|> Cosmos.linq<Family, string> (fun families ->
    cosmosQuery {
        for family in families do
        where (family.LastName = "Powell")
        select family.LastName
    })
|> Cosmos.execAsync

Currently only "abs" and "acos" mappings are implemented

@albert-du albert-du marked this pull request as draft July 15, 2022 21:10
@albert-du albert-du marked this pull request as ready for review July 18, 2022 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant