Comments (5)
Currently I'm looking to support built in F# functions by replacing them with the BCL equivalents
Math operations are supported normally but not the F# versions
Math functions: Supports translation from .NET Abs, Acos, Asin, Atan, Ceiling, Cos, Exp, Floor, Log, Log10, Pow, Round, Sign, Sin, Sqrt, Tan, and Truncate to the equivalent built-in mathematical functions.
https://docs.microsoft.com/en-us/azure/cosmos-db/sql/sql-query-linq-to-sql
For example, trying to use the "abs" function in a query ce with Cosmos fails, but the equivalent "System.Math.Abs" method works.
This query builder is just to show extending the operations available by mapping F# functions to BCL methods.
from fsharp.cosmosdb.
I know it's only an example, but can you clarify what sort of stuff you're intending to handle in your query support ?
I've not read or stretched it but I believe Microsoft.Azure.Cosmos
has prerry complete LINQ support - are you intending to do some fixups in front of that, or replace the the whole engine?
If you're leaning towards the replacing the whole thing, it may also be worthwhile to peruse https://github.com/fsprojects/FSharp.AWS.DynamoDB (obviously it has a different query syntax, but there are lots of aspects of it which have been implemented very cleanly)
from fsharp.cosmosdb.
I'll admit that I'm somewhat torn here - I like the idea of having a strongly-typed query engine, such as you get with LINQ, so that you can have more confidence in the queries that you write, but at the same time I ponder it relative to the analyzer part of this project (and which was one of the key motivations in building it). I want to explore a bit more how they play together, can we get better analysis of the query-to-generate by using LINQ, to maybe suggest where your projections are not valid for the database you're working with? I'm not sure, but it's something to explore.
from fsharp.cosmosdb.
I believe Linq could be leveraged to provide greater insight with the analyzer. For instance, the Cosmos Linq provider allows for translation of strongly typed queries directly into sql which could be a basis for providing autocomplete suggestions or additional code linting.
from fsharp.cosmosdb.
Yes, it does allow for strongly typed query creation because you're working off the in/out types, but I have to look at the analyzer and see if the type information is available - Last time I looked you were really only working with strings (as you're working on the tokens in the AST), but that might be outdated.
from fsharp.cosmosdb.
Related Issues (20)
- Performance benefits in sharing the connection? HOT 2
- Release 0.2.0 ready for review HOT 3
- Release 0.2.0 ready for review HOT 3
- Release 0.2.0 ready for review HOT 2
- Release 0.2.0 ready for review HOT 2
- Release 0.2.0 ready for review HOT 2
- Release 0.2.0 ready for review HOT 2
- Analyzer not loading HOT 1
- Use a singleton Azure Cosmos DB client for the lifetime of your application HOT 3
- Any chance of UPSERT support? HOT 2
- 📣 Announcement - Road to v1 HOT 3
- Is Paket required for FSharp.CosmosDb.Analyzer? HOT 8
- Getting a warning about package downgrade HOT 4
- Issue deleting an item from a container HOT 2
- Does it support Stored Procedure? HOT 3
- [Request] Make compatable with newer Azure Functions versions HOT 1
- Cannot open in dev container when on Windows HOT 2
- Replace doesn't resolve correct id value HOT 3
- Feature req: identity-based connection HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fsharp.cosmosdb.