SqlValidationResult and AssemblyValidationResult
These result objects are designed for assertions, readable failures, and reporting.
SqlValidationResult
IsValidErrorsWarningsErrorSummarySourceStatementType
ErrorSummary returns "No issues found." when validation produced neither errors nor warnings.
AssemblyValidationResult
ResultsAllValidTotalErrorsTotalWarningsQueriesValidatedInsertsValidatedUpdatesValidatedDeletesValidatedSummary
Summary groups issues by source member so CI logs are easy to scan.
Example
var query = new SqlQuery("SELECT FROM customers");
SqlValidationResult singleResult = new(query.Errors, query.Warnings, "Orders.GetAll", query.StatementType);
var assemblyResult = QueryLens.ValidateAssembly(typeof(OrderQueries).Assembly);
Assert.NotNull(assemblyResult.Summary);