MySQL float expressions.

This commit is contained in:
go-jet 2019-07-30 15:04:36 +02:00
parent 6bf9c32c07
commit 163ecf4c42
13 changed files with 401 additions and 85 deletions

View file

@ -0,0 +1,40 @@
package common
type FloatExpressionTestResult struct {
Eq1 *bool
Eq2 *bool
Eq3 *bool
Distinct1 *bool
Distinct2 *bool
Distinct3 *bool
NotDistinct1 *bool
NotDistinct2 *bool
NotDistinct3 *bool
Lt1 *bool
Lt2 *bool
Gt1 *bool
Gt2 *bool
Add1 *float64
Add2 *float64
Sub1 *float64
Sub2 *float64
Mul1 *float64
Mul2 *float64
Div1 *float64
Div2 *float64
Mod1 *float64
Mod2 *float64
Pow1 *float64
Pow2 *float64
Abs *float64
Power *float64
Sqrt *float64
Cbrt *float64
Ceil *float64
Floor *float64
Round1 *float64
Round2 *float64
Sign *float64
Trunc *float64
}

View file

@ -0,0 +1,76 @@
[
{
"Eq1": true,
"Eq2": false,
"Eq3": false,
"Distinct1": false,
"Distinct2": true,
"Distinct3": true,
"NotDistinct1": true,
"NotDistinct2": false,
"NotDistinct3": false,
"Lt1": true,
"Lt2": true,
"Gt1": false,
"Gt2": false,
"Add1": 2.22,
"Add2": 12.33,
"Sub1": 0,
"Sub2": -10.11,
"Mul1": 1.23,
"Mul2": 12.45,
"Div1": 1,
"Div2": 0.09,
"Mod1": 0,
"Mod2": 1.11,
"Pow1": 1.12,
"Pow2": 1.24,
"Abs": 1.11,
"Power": 1.24,
"Sqrt": 1.05,
"Cbrt": 1.03,
"Ceil": 6,
"Floor": 5,
"Round1": 1,
"Round2": 1.11,
"Sign": 1,
"Trunc": 1.1
},
{
"Eq1": true,
"Eq2": false,
"Eq3": false,
"Distinct1": false,
"Distinct2": true,
"Distinct3": true,
"NotDistinct1": true,
"NotDistinct2": false,
"NotDistinct3": false,
"Lt1": true,
"Lt2": true,
"Gt1": false,
"Gt2": false,
"Add1": 2.22,
"Add2": 12.33,
"Sub1": null,
"Sub2": -10.11,
"Mul1": null,
"Mul2": 12.45,
"Div1": null,
"Div2": 0.09,
"Mod1": null,
"Mod2": 1.11,
"Pow1": null,
"Pow2": 1.24,
"Abs": 1.11,
"Power": 1.24,
"Sqrt": 1.05,
"Cbrt": 1.03,
"Ceil": 6,
"Floor": 5,
"Round1": 1,
"Round2": 1.11,
"Sign": 1,
"Trunc": 1.1
}
]