-
Notifications
You must be signed in to change notification settings - Fork 19
Home
Welcome to the SqlParser-cs wiki!
This is not the greatest SQL parser in the world; this is just a tribute...
The original project was started in 2018 by Andy Grove. The Rust version has made its way into numerous projects.
There are few, if any, generic and complete SQL parsers available for the .NET ecosystem. The sqlparser-rs project is one of the most comprehensive and unopinionated parsers available. As such, an effort was made to port the functionality to .NET.
Every effort has been made to preserve the original project's style, flow, and hierarchy. Heavy use of nested C# records was adopted to mimic the Rust object mode. C# does not (yet) support discriminated unions. Nonetheless, the C# equivalent stays as true as possible to the Rust project. The only significant deviations are the use of LINQ and nullable types. The Rust project uses zero null values. The Rust project uses Result and Option almost exclusively. The C# project replaces those with null values and "None" enum values where applicable.
This project incorporates 100% of the Rust parser's control flow, unit tests, and abstract tree structure. In other words, it's a .NET equivalent of a top shelf SQL parser.