Numeric expression type.

This commit is contained in:
go-jet 2019-06-21 12:30:32 +02:00
parent 1ac324e198
commit 829736279b
8 changed files with 41 additions and 52 deletions

View file

@ -230,8 +230,8 @@ func TestFloatOperators(t *testing.T) {
AllTypes.Real.POW(Float(11.22)),
ABSf(AllTypes.Real),
SQRTf(AllTypes.Real),
CBRTf(AllTypes.Real),
SQRT(AllTypes.Real),
CBRT(AllTypes.Real),
CEIL(AllTypes.Real),
FLOOR(AllTypes.Real),
ROUND(AllTypes.Decimal),
@ -284,8 +284,8 @@ func TestIntegerOperators(t *testing.T) {
AllTypes.Integer.BIT_SHIFT_RIGHT(Int(11)),
ABSi(AllTypes.Integer),
SQRTi(AllTypes.Integer),
CBRTi(AllTypes.Integer),
SQRT(AllTypes.Integer),
CBRT(AllTypes.Integer),
)
fmt.Println(query.DebugSql())

View file

@ -854,7 +854,7 @@ ORDER BY SUM(payment.amount) ASC;
SELECT(
Payment.CustomerID.AS("customer_payment_sum.customer_id"),
SUMf(Payment.Amount).AS("customer_payment_sum.amount_sum"),
AVGf(Payment.Amount).AS("customer_payment_sum.amount_avg"),
AVG(Payment.Amount).AS("customer_payment_sum.amount_avg"),
MAXf(Payment.Amount).AS("customer_payment_sum.amount_max"),
MINf(Payment.Amount).AS("customer_payment_sum.amount_min"),
COUNT(Payment.Amount).AS("customer_payment_sum.amount_count"),