Adopt QueryLens Incrementally
Incremental adoption keeps the initial cost low and helps teams add confidence without blocking unrelated development.
Suggested Stages
- Start with business-critical queries and Level 1 validation so broken SQL surfaces immediately.
- Move to Level 2 once you know the target engine and want reserved-word and built-in function coverage.
- Add Level 3 when schema drift and object-name mistakes become meaningful failure modes for the team.
- Expand coverage gradually instead of attempting a big-bang migration across every legacy query.
Example
var firstQuery = new SqlQuery("SELECT customer_id, status FROM dbo.orders");
Assert.True(firstQuery.IsValid);
QueryLens.Reset();
QueryLens.Dialect = DialectProfile.SqlServer2019;
var stricterQuery = new SqlQuery("SELECT STRING_AGG(name, ',') FROM dbo.departments");
Assert.True(stricterQuery.IsValid);