End-User Documentation

Enable Dialect Validation

Enable Dialect Validation

Setting QueryLens.Dialect switches validation from generic syntax mode to a specific dialect and version profile.

Steps

  1. Choose the profile that matches the engine and version you actually target.
  2. Set QueryLens.Dialect before any validation runs.
  3. Validate the statement again and inspect any new dialect-aware diagnostics.
  4. Keep profile selection in shared test setup so the whole suite uses the same assumptions.

Example

QueryLens.Dialect = DialectProfile.SqlServer2019;

var sqlServerQuery = new SqlQuery("SELECT STRING_AGG(name, ',') FROM departments");
Assert.True(sqlServerQuery.IsValid);

QueryLens.Reset();
QueryLens.Dialect = DialectProfile.Sqlite3;
var sqliteQuery = new SqlQuery("SELECT TOP 10 name FROM departments");
Assert.False(sqliteQuery.IsValid);

Related