FSharp.CosmosDb
FSharp.CosmosDb copied to clipboard
Linq Query Operation
#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