Supported Validation Rules
QueryLens validation is organized around rule areas that become active at different levels.
| Rule Area | Typical Codes | Active At |
|---|---|---|
| Structural syntax | QL0001 |
Level 1+ |
| Table existence | QL0010 |
Level 3 |
| Column existence | QL0011 |
Level 3 |
| Stored procedure existence | QL0012 |
Level 3 |
| Column mapping | QL0020 |
Mapping-aware flows |
| Parameter consistency | QL0030, QL0031 |
Level 1+ |
| Missing WHERE warnings | QL0040 |
Statement-type aware validation |
| INSERT column/value mismatch | QL0050 |
Statement-type aware validation |
| Identity/computed protection | QL0060, QL0061 |
Level 3 |
| Built-in function checks | QL0070 to QL0073 |
Level 2+ |
| Required INSERT columns | QL0080 |
Level 3 |
| Reserved-word checks | QL0090, QL0091 |
Level 2+ |
Example
QueryLens.Dialect = DialectProfile.SqlServer2019;
var query = new SqlQuery("SELECT STRNG_AGG(name, ',') FROM dbo.departments");
Assert.Contains(query.Errors, issue => issue.Code == "QL0070");