Skip to main content

validate_comment_target

Function validate_comment_target 

Source
fn validate_comment_target(
    comment_name: &RawItemName,
    main_ident: &DatabaseIdent,
    main_obj_type: &ObjectType,
    comment_obj_type: ObjectType,
    fqn: &FullyQualifiedName,
    comment_sql: &str,
    offset: usize,
    errors: &mut Vec<ValidationError>,
)
Expand description

Validates that a COMMENT statement targets the correct object with the correct type.

Ensures that:

  1. The comment references the main object defined in the file
  2. The object type specified in the COMMENT matches the actual object type