pub fn validate_query_as(
struct_name: &str,
sql: &str,
) -> Result<(), ValidationError>Expand description
Validate that sql is structurally compatible with struct_name.
§Parameters
struct_name: the Rust struct ident as a string (e.g."User"). Used for registry lookup via the struct→table index and for diagnostics.sql: the raw SQL string literal fromquery_as!(T, "...").
§Errors
Returns a ValidationError if validation fails — e.g. the struct is not
registered, SQL has a syntax error, referenced tables are not registered, or
the result schema is missing columns the struct requires.