3 ms·
If you are using SQL Server, you may be interested to hear this already exists for .NET: https://msdn.microsoft.com/en-us/library/microsoft.sqlserver.transacts
by i_s 9y ago
If you are using SQL Server, you may be interested to hear this already exists for .NET:
https://msdn.microsoft.com/en-us/library/microsoft.sqlserver.transactsql.scriptdom.aspx https://msdn.microsoft.com/en-us/library/microsoft.sqlserver...
It can both parse and generate SQL scripts. I've been leaning on it heavily for some of our non-trival query APIs.
- dllthomas 9y agoScanning the docs, it's unclear whether that's just the parsing or also analysis.
- i_s 9y agoIt is 'just' the parsing, but the analysis is fairly easy. Here is an example of: 1. Taking a database 2. Parsing every view and stored procedure 3. Tracking how tables are joined 4. Creating a graph visualization of the tables and their relationships: https://github.com/isaksky/FsSqlDom/blob/master/examples/FsSqlDomGallery/FsSqlDomGallery/GraphTableRelationships.fs https://github.com/isaksky/FsSqlDom/blob/master/examples/FsS... (Not perfect, but does a pretty good job on databases I have tested.)
- intrasight 9y agoI've long thought that a graph visual based query client would be really neat
- weavie 9y agoDidn't ms access have something like this?
- intrasight 9y agoYes - "something like". I'm envisioning more interact with the graph rather than the graph only showing relationships.