Validation Results and Diagnostics
Validation output is organized around SqlValidationResult, grouped Errors and Warnings, and individual SqlIssue records that include diagnostic metadata.
Key Ideas
IsValidis true only when there are no errors.ErrorsandWarningsare separate so tests can enforce strictness explicitly.ErrorSummarybuilds a readable multi-line summary suitable for assertion failure messages.SqlIssuecan 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);