Ejemplo n.º 1
0
 private ValidationResult ToValidationResult(FieldPairReference pair)
 {
     return(new ValidationResult()
     {
         Fragment = pair.Fragment,
         Message = GetValidationMessage(pair)
     });
 }
Ejemplo n.º 2
0
 private static bool InvokesImplicitConversion(FieldPairReference x)
 {
     // TODO : flag conversion between varchars and decimals with different params?
     // TODO : separate conditions for better context
     return(x.Left.Type != FieldType.NotSpecified &&
            x.Right.Type != FieldType.NotSpecified &&
            x.Left.Type != FieldType.WildCard &&
            x.Right.Type != FieldType.WildCard &&
            x.Right.Type != FieldType.Null &&
            x.Left.Origin != OriginType.Literal &&
            x.Right.Origin != OriginType.Literal &&
            x.Left.Origin != OriginType.SystemType &&
            x.Right.Origin != OriginType.SystemType &&
            x.Left.Type != x.Right.Type);
 }
Ejemplo n.º 3
0
 protected override string GetValidationMessage(FieldPairReference pair)
 {
     return($"{typeof(SetVariableStatement).Name}: Variable \"{pair.Left.Name}\" is of \"{pair.Left.Type}\" type and expression is of \"{pair.Right.Type}\" type.");
 }
Ejemplo n.º 4
0
 protected virtual string GetValidationMessage(FieldPairReference pair)
 {
     return($"{typeof(TFragment).Name}: First column is of \"{pair.Left.Type}\" type and second column is of \"{pair.Right.Type}\" type.");
 }
Ejemplo n.º 5
0
 protected override string GetValidationMessage(FieldPairReference pair)
 {
     return($"{typeof(ExecuteSpecification).Name}: Parameter \"{pair.Left.Name}\" is of \"{pair.Left.Type}\" type and value is of \"{pair.Right.Type}\" type.");
 }