/// <summary>
 /// Initializes a new instance of the <see cref="TableSchemaValidationError"/> class.
 /// </summary>
 /// <param name="objectType">The invalid object type.</param>
 /// <param name="relationType">The invalid relation type.</param>
 /// <param name="role">The invalid role.</param>
 /// <param name="tableName">Name of the table.</param>
 /// <param name="columnName">Name of the column.</param>
 /// <param name="errorKind">The kind of validation error.</param>
 /// <param name="message">The validation error message.</param>
 public TableSchemaValidationError(IObjectType objectType, IRelationType relationType, IRoleType role, string tableName, string columnName, SchemaValidationErrorKind errorKind, string message)
 {
     this.objectType   = objectType;
     this.relationType = relationType;
     this.role         = role;
     this.tableName    = tableName;
     this.columnName   = columnName;
     this.kind         = errorKind;
     this.message      = message;
 }
Beispiel #2
0
 public static void AddError(SchemaValidationErrors schemaValidationErrors, SchemaProcedure schemaProcedure, SchemaValidationErrorKind kind, string message)
 {
     schemaValidationErrors.AddProcedureError(schemaProcedure, kind, message);
 }
Beispiel #3
0
        public static void AddError(SchemaValidationErrors schemaValidationErrors, SchemaTable table, SchemaColumn column, SchemaValidationErrorKind kind)
        {
            var roleType = column.RelationType == null ? null : column.RelationType.RoleType;

            schemaValidationErrors.AddTableError(null, null, roleType, table.ToString(), column.ToString(), kind, kind + ": " + table + "." + column);
        }
Beispiel #4
0
 public static void AddError(SchemaValidationErrors schemaValidationErrors, SchemaTable table, SchemaValidationErrorKind kind)
 {
     schemaValidationErrors.AddTableError(table.ObjectType, table.RelationType, null, table.ToString(), null, kind, kind + ": " + table);
 }
 public void AddProcedureError(SchemaProcedure schemaProcedure, SchemaValidationErrorKind kind, string message)
 {
     this.errors.Add(new ProcedureSchemaValidationError(schemaProcedure, kind, message));
 }
 /// <summary>
 /// Adds a new schema validation error.
 /// </summary>
 /// <param name="objectType">The object type.</param>
 /// <param name="relationType">The relation type.</param>
 /// <param name="roleType">The role .</param>
 /// <param name="tableName">Name of the table.</param>
 /// <param name="columnName">Name of the column.</param>
 /// <param name="kind">The kind of validation error.</param>
 /// <param name="message">The validation error message.</param>
 public void AddTableError(IObjectType objectType, IRelationType relationType, IRoleType roleType, string tableName, string columnName, SchemaValidationErrorKind kind, string message)
 {
     this.errors.Add(new TableSchemaValidationError(objectType, relationType, roleType, tableName, columnName, kind, message));
 }
 public ProcedureSchemaValidationError(SchemaProcedure schemaProcedure, SchemaValidationErrorKind kind, string message)
 {
     this.schemaProcedure = schemaProcedure;
     this.kind            = kind;
     this.message         = message;
 }