Reintroduce Uint64 literal constructor for postgres dialect.
This commit is contained in:
parent
7047de44a9
commit
33c1d9e663
4 changed files with 24 additions and 1 deletions
|
|
@ -49,6 +49,11 @@ func Uint32(value uint32) IntegerExpression {
|
|||
return CAST(jet.Uint32(value)).AS_BIGINT()
|
||||
}
|
||||
|
||||
// Uint64 is constructor for 64 bit unsigned integer expressions literals.
|
||||
func Uint64(value uint64) IntegerExpression {
|
||||
return CAST(jet.Uint64(value)).AS_BIGINT()
|
||||
}
|
||||
|
||||
// Float creates new float literal expression
|
||||
var Float = jet.Float
|
||||
|
||||
|
|
|
|||
|
|
@ -49,6 +49,11 @@ func TestUint32(t *testing.T) {
|
|||
assertSerialize(t, Uint32(val), `$1::bigint`, val)
|
||||
}
|
||||
|
||||
func TestUint64(t *testing.T) {
|
||||
val := uint32(math.MaxUint32)
|
||||
assertSerialize(t, Uint32(val), `$1::bigint`, val)
|
||||
}
|
||||
|
||||
func TestFloat(t *testing.T) {
|
||||
assertSerialize(t, Float(12.34), `$1`, float64(12.34))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue