End-User Documentation

Validation Results and Diagnostics

Validation Results and Diagnostics

Validation output is organized around SqlValidationResult, grouped Errors and Warnings, and individual SqlIssue records that include diagnostic metadata.

Key Ideas

  • IsValid is true only when there are no errors.
  • Errors and Warnings are separate so tests can enforce strictness explicitly.
  • ErrorSummary builds a readable multi-line summary suitable for assertion failure messages.
  • SqlIssue can include severity, code, message, category, table, column, line, suggestion, and fuzzy-match candidates.

Why Suggestions Matter

Fuzzy suggestions help when a table, column, stored procedure, or function name is close to a known name but misspelled.

Example

var query = new SqlQuery("SELECT FROM customers");

Assert.False(query.IsValid);
Assert.Equal("QL0001", query.Errors[0].Code);
Assert.NotEmpty(query.ErrorSummary);

Related