MySQL cast expressions. Simplified.
This commit is contained in:
parent
53dbcd9bfc
commit
c342f296ca
10 changed files with 103 additions and 81 deletions
|
|
@ -65,6 +65,7 @@ func TestExpressionOperators(t *testing.T) {
|
|||
AllTypes.SmallIntPtr.NOT_IN(Int(11), Int(22), NULL),
|
||||
AllTypes.SmallIntPtr.NOT_IN(AllTypes.SELECT(AllTypes.IntegerPtr)),
|
||||
|
||||
postgres.CAST(Int(150)).AS_CHAR(12),
|
||||
postgres.CAST(String("TRUE")).AS_BOOL(),
|
||||
postgres.CAST(String("111")).AS_SMALLINT(),
|
||||
postgres.CAST(String("111")).AS_INTEGER(),
|
||||
|
|
@ -320,7 +321,7 @@ SELECT (all_types.numeric = all_types.numeric) AS "eq1",
|
|||
TRUNC(ABS(all_types.decimal), $29) AS "abs",
|
||||
TRUNC(POWER(all_types.decimal, $30), $31) AS "power",
|
||||
TRUNC(SQRT(all_types.decimal), $32) AS "sqrt",
|
||||
TRUNC(CBRT(all_types.decimal)::decimal, $33) AS "cbrt",
|
||||
TRUNC(CBRT(all_types.decimal)::DECIMAL, $33) AS "cbrt",
|
||||
CEIL(all_types.real) AS "ceil",
|
||||
FLOOR(all_types.real) AS "floor",
|
||||
ROUND(all_types.decimal) AS "round1",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue