Comments (6)
I only presently support select, for, join, distinct, where, take, exactlyOne, sortBy, sortByDescending, thenBy, thenByDescending. There are a boat load more keywords not currently supported. (see http://msdn.microsoft.com/en-us/library/hh225374.aspx)
Count is not the same as Seq.length. It has to be formed as part of the various abstract query representations and built intelligently into the SQL query, eg SELECT COUNT(*) FROM Student. This would probably be done if and when I am brave enough to tackle GroupJoin (unless someone feels the urge to do it for me :) )
from sqlprovider.
Yes I know this and tried to implement it. I failed.
I think count is one of the most important operators at this stage since it's good for sanity checks.
It would be awesome if you could add it.
Maybe I can add similar operators by analyzing your commit.
from sqlprovider.
I'll take a look. I naively assumed it was a matter of renaming Length to Count.
from sqlprovider.
Count is an odd one because it fires after the query has been generated but before it has been executed, so looking at how this is implemented once it is done might not be that helpful in working out the others.
In fact, it might require some interesting changes to get this to work. I see your point about it being used as a sanity checking tool. I could try to implement this with a priority if it looks like it's going to take you too long to figure out Jack, please do feel free to have a go though but you are going down the rabbit hole with this one ! :)
from sqlprovider.
ok this is done now - you were close. Except the count happens after the query has been built (it fires the execute method). The transformed projection tree then needs throwing away to be replaced by an execute scalar call, so the way the query is executed has to change.
Note: for some really crazy reason, if you have a select many followed by just a count like this
for x in y
for z in x
count
the count part simply does not fire. Execute does not get triggered, neither is there any indication count has been used in the expression tree. Perhaps one for fsbugs. Putting a select in there will fix it.
from sqlprovider.
works like a charme. http://forki.github.io/DynamicsNAVProvider/queries.html
Thanks
from sqlprovider.
Related Issues (20)
- Missing ``Create(...)`` function HOT 3
- Queries failing for schemas / tables that contain special characters - MySQL
- Oracle provider does not work correctly when quoted identifiers are used
- Unable to compile using Visual Studio but works with dotnet HOT 4
- [Microsoft,System].Data.SqlClient is not supported on this platform HOT 17
- Issue with connecting to PostgreSQL database HOT 1
- MSSQL stored procedures does not correctly works with schemas
- SQLProvider + PostgreSql works with Rider and VSCode but not visual studio 2022
- Incorrect FROM statement is produced when a table name contains periods HOT 2
- [Question] How to use Pragma with SQLITE? HOT 6
- Simple group by query with postgresql causes doubling up of double quotes when using double quoted declared fields HOT 3
- OnConflict implementation for SQLite provider uses wrong feature of SQLite HOT 3
- `SqlRuntime.DataContext.addCache` timeout on first query when application starts HOT 8
- Auto-generate types by `dotnet publish` time HOT 3
- dotnet 8.0.100-preview.6.23330.14 error. HOT 12
- Performance in SQL Server when comparing `varchar` column against `string` parameter HOT 23
- Is it possible to pull down a partial row and then update it? HOT 1
- Migration guide to 1.3.x HOT 3
- Typeprovider not working when compiled with dotnet build HOT 11
- Could not load file or assembly 'Microsoft.Extensions.Logging.Abstractions, Version=8.0.0.0 HOT 24
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 sqlprovider.