@@ -42,11 +42,17 @@ public class SqliteMathTranslator : IMethodCallTranslator
42
42
{ typeof ( Math ) . GetMethod ( nameof ( Math . Min ) , new [ ] { typeof ( ushort ) , typeof ( ushort ) } ) ! , "min" } ,
43
43
{ typeof ( Math ) . GetMethod ( nameof ( Math . Round ) , new [ ] { typeof ( double ) } ) ! , "round" } ,
44
44
{ typeof ( Math ) . GetMethod ( nameof ( Math . Round ) , new [ ] { typeof ( double ) , typeof ( int ) } ) ! , "round" } ,
45
+ { typeof ( Math ) . GetMethod ( nameof ( Math . Sign ) , new [ ] { typeof ( double ) } ) ! , "sign" } ,
46
+ { typeof ( Math ) . GetMethod ( nameof ( Math . Sign ) , new [ ] { typeof ( float ) } ) ! , "sign" } ,
47
+ { typeof ( Math ) . GetMethod ( nameof ( Math . Sign ) , new [ ] { typeof ( long ) } ) ! , "sign" } ,
48
+ { typeof ( Math ) . GetMethod ( nameof ( Math . Sign ) , new [ ] { typeof ( sbyte ) } ) ! , "sign" } ,
49
+ { typeof ( Math ) . GetMethod ( nameof ( Math . Sign ) , new [ ] { typeof ( short ) } ) ! , "sign" } ,
45
50
{ typeof ( MathF ) . GetMethod ( nameof ( MathF . Abs ) , new [ ] { typeof ( float ) } ) ! , "abs" } ,
46
51
{ typeof ( MathF ) . GetMethod ( nameof ( MathF . Max ) , new [ ] { typeof ( float ) , typeof ( float ) } ) ! , "max" } ,
47
52
{ typeof ( MathF ) . GetMethod ( nameof ( MathF . Min ) , new [ ] { typeof ( float ) , typeof ( float ) } ) ! , "min" } ,
48
53
{ typeof ( MathF ) . GetMethod ( nameof ( MathF . Round ) , new [ ] { typeof ( float ) } ) ! , "round" } ,
49
- { typeof ( MathF ) . GetMethod ( nameof ( MathF . Round ) , new [ ] { typeof ( float ) , typeof ( int ) } ) ! , "round" }
54
+ { typeof ( MathF ) . GetMethod ( nameof ( MathF . Round ) , new [ ] { typeof ( float ) , typeof ( int ) } ) ! , "round" } ,
55
+ { typeof ( MathF ) . GetMethod ( nameof ( MathF . Sign ) , new [ ] { typeof ( float ) } ) ! , "sign" }
50
56
} ;
51
57
52
58
private readonly ISqlExpressionFactory _sqlExpressionFactory ;
@@ -78,7 +84,7 @@ public SqliteMathTranslator(ISqlExpressionFactory sqlExpressionFactory)
78
84
{
79
85
RelationalTypeMapping ? typeMapping ;
80
86
List < SqlExpression > ? newArguments = null ;
81
- if ( sqlFunctionName == "max" || sqlFunctionName == "max " )
87
+ if ( sqlFunctionName == "max" || sqlFunctionName == "min " )
82
88
{
83
89
typeMapping = ExpressionExtensions . InferTypeMapping ( arguments [ 0 ] , arguments [ 1 ] ) ;
84
90
newArguments = new List < SqlExpression >
0 commit comments