Title here
Summary here
Helper class for parsing sql statements
public static class SqlParserThis method attempts to parse column names from any sql statement. E.g. SELECT 1 AS 'Test', Col2, t2.Col3 FROM table1 t1 INNER JOIN t2 ON t1.Id = t2.Id will return Test, Col2 and Col3 als column names.
public static List<string> ParseColumnNames(string sql, string QB = "", string QE = "")| Type | Name | Description |
|---|---|---|
| string | sql | The sql code from which the column names should be parsed |
| string | QB | Optional: the start character used when quoting names (e.g. [ in SqlServer) |
| string | QE | Optional: the end character used when quoting names (e.g. ] in SqlServer) |
| Type | Description |
|---|---|
| List<string> | The names of the columns in the sql |
public static string ReplaceMatchWith(Match match)| Type | Name | Description |
|---|---|---|
| Match | match |
| Type | Description |
|---|---|
| string |