normalizeMssqlSyntax rewrites a few SQL Server export patterns into forms the generic parser already understands. Each pass must preserve comments, quoted strings, and bracketed identifiers so only real SQL tokens are rewritten.
(sql string)
| 46 | // generic parser already understands. Each pass must preserve comments, quoted |
| 47 | // strings, and bracketed identifiers so only real SQL tokens are rewritten. |
| 48 | func normalizeMssqlSyntax(sql string) string { |
| 49 | sql = normalizeDefaultExpressions(sql) |
| 50 | sql = normalizeBracketedCastTypes(sql) |
| 51 | sql = normalizeBareReservedIdentifiers(sql) |
| 52 | return normalizeQualifiedReservedIdentifiers(sql) |
| 53 | } |
| 54 | |
| 55 | // SQL Server exports DEFAULT constraints as nested parenthesized expressions |
| 56 | // like DEFAULT ((0)) or DEFAULT (newid()). The generic parser only needs the |
no test coverage detected