Comments (6)
That shouldn't be a problem, as it looks pretty simple. However I have no idea what that's for, as I've never needed that myself. Any chance you could write some unit tests for inserting and querying them, and I'll make them pass? (Look at the two unit test classes that are already there for inspiration).
You could just write the tests against the "real" types assembly. I can then pull them in and make things compile and pass.
from microsoft.sqlserver.types.
Having support for SqlHierarchyId would be extremly useful when working with such data with clients where the underlying native dll can't run. Yes, I'll try to provide something, but that can't happen before around May, 10th. Ok for you?
Thanks!
from microsoft.sqlserver.types.
@KarloX2 Sounds good. Before you do, double check this issue to ensure I haven't already somehow done it by then :-)
from microsoft.sqlserver.types.
Greetings @dotMorten !
I took some time to browse thru the original code of the SqlHierarchyId struct using Visual Studio's built-in decompiler. Two surprises:
- Unlike the spatial types, this part of the Microsoft.SqlServer.Types assembly doesn't seem to do any calls into the native binary SqlServerSpatial140.dll. I think it is all written in managed code, either C# or managed C++.
- The underlying (managed) code is more complex than I expected. A few thousand lines of code.
Do you really think it is worth the effort to write this new from scratch? If Microsoft would permit it, this part could be ported rather easily into a .NET Standard conform new assembly.
from microsoft.sqlserver.types.
@KarloX2 Thanks I came to the same realization. It looked simple at first but it is far from it. Since I don't even understand how to use these correctly, I'm not sure how to even begin to do this (and decompiling isn't really a legal option). So the best approach here is to lobby the SQLServer team to opensource the managed bits for .NET Standard.
from microsoft.sqlserver.types.
Completed. Thanks @olmobrutall
from microsoft.sqlserver.types.
Related Issues (20)
- ToString() of SqlHierarchyId does not return "NULL" when IsNull == true HOT 1
- GetDescendant for a simple range fails with a HierarchyIdException HOT 2
- Throw HierarchyIdException instead of ArgumentException in GetDescendant method
- HierarchyId serialized in an invalid format which can't be deserialized HOT 11
- Some Geography cannot be deserialized. HOT 4
- When using Microsoft.Data.SqlClient an InvalidCastException will be thrown HOT 3
- Could not load file or assembly Microsoft.SqlServer.Types HOT 13
- SqlHierarchyId Write/Read roundtrip causes data corruption HOT 9
- System.Data.SqlClient needs a version bumb from 4.5.1 to 4.8.3 HOT 4
- assembly load error HOT 4
- DataReader.GetFieldType returned null HOT 10
- MultiPoint issue? HOT 2
- Specified type is not registered on the target. HOT 1
- Referenced assembly 'Microsoft.SqlServer.Types, Version=2.5.0.0, Culture=neutral, PublicKeyToken=null' does not have a strong name
- Fill DataTable throws DataReader.GetFieldType null
- Insert to SQL Server throws exception - `Specified type is not registered on the target server`. HOT 1
- Using Microsoft.Data.SqlClient 5.0.1 causes System.TypeLoadException: Could not load type 'Microsoft.Data.SqlClient.Server.IBinarySerialize' HOT 10
- Security Vulnerability: https://github.com/advisories/GHSA-8g2p-5pqh-5jmc HOT 7
- Upgrade from Framework to Standard HOT 2
- STIsValid returning incorrect result for parameterized query 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 microsoft.sqlserver.types.