replaced the UUIDToBin functions with a singular UUID_TO_BIN
This commit is contained in:
parent
09fe45b09c
commit
33ec120437
4 changed files with 17 additions and 22 deletions
|
|
@ -1,7 +1,6 @@
|
|||
package mysql
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/go-jet/jet/v2/internal/jet"
|
||||
|
|
@ -57,17 +56,6 @@ var String = jet.String
|
|||
// value can be any uuid type with a String method
|
||||
var UUID = jet.UUID
|
||||
|
||||
// UUIDToBin takes ay object with a String method and calls StringUUIDToBin.
|
||||
func UUIDToBin(str fmt.Stringer) StringExpression {
|
||||
return StringUUIDToBin(str.String())
|
||||
}
|
||||
|
||||
// StringUUIDToBin is a helper function that calls "uuid_to_bin" function on the passed value.
|
||||
func StringUUIDToBin(str string) StringExpression {
|
||||
fn := Func("uuid_to_bin", String(str))
|
||||
return StringExp(fn)
|
||||
}
|
||||
|
||||
// Date creates new date literal
|
||||
func Date(year int, month time.Month, day int) DateExpression {
|
||||
return CAST(jet.Date(year, month, day)).AS_DATE()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue