SQL脚本格式化程序 [英] SQL script formatter

查看:84
本文介绍了SQL脚本格式化程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,莎拉·莎莎娜(莎拉布·萨克塞纳)的祝福.
我想使用C#,ASP DOT NET制作SQL脚本格式化程序.谁能给我简短的想法.公平地说,我对此并不了解,甚至不知道如何开始.我只是对C#,ASP DOT NET和SQL 2008有很好的了解.

Hi All, Warm wishes from shalabh saxena.

I want to make a SQL script formatter using C#,ASP DOT NET. Can any one give me brief idea about this. Fairly say i do not know much about this even how to start on this. i just have good knowledge of C#, ASP DOT NET and SQL 2008.

推荐答案



基本上,您需要识别SQL的单一语言部分(令牌).因此,我的建议是使用SQL语法生成这些令牌的扫描仪.您可以使用来自SQL帮助文件中的SQL语句的语法图,并使用C#对自己的扫描器进行编程,也可以使用具有SQL语法的C#解析器生成器,而仅使用它生成的令牌生成的东西.

我希望这可以帮助您入门.

干杯!
Hi,

basically, you need to recognize the single language parts (tokens) of SQL. So, a scanner that generates these tokens using an SQL grammar would be my suggestion. You could use the syntax diagrams for SQL statements from the SQL help files and program your own scanner using C# or you use a parser generator for C# with an SQL grammar and just use the token generating stuff it produces.

I hope this helps to get you started.

Cheers!


这篇关于SQL脚本格式化程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆