Lexing partial SQL in C#

后端 未结 2 1276
无人共我
无人共我 2021-02-14 02:44

I\'d need to parse partial SQL queries (it\'s for a SQL injection auditing tool). For example

\'1\' AND 1=1--

Should break down into tokens lik

2条回答
  •  没有蜡笔的小新
    2021-02-14 03:15

    Also there may be some way to utilized fully parsed (by Microsoft) T-SQL via database editions of Visual studio -

    The crown jewels of the Database Edition product are the SQL parsers and script generator, these two pieces form the foundation of what the database project system does internally.

    http://blogs.msdn.com/b/gertd/archive/2008/08/21/getting-to-the-crown-jewels.aspx

提交回复
热议问题