Add UUID helper function

UUID creates string literal expression from uuid object.
uuid can be any uuid type with a String method.
This commit is contained in:
go-jet 2021-05-11 13:20:07 +02:00
parent 256be8a406
commit f30cbb9e89
5 changed files with 19 additions and 2 deletions

View file

@ -51,6 +51,10 @@ var Decimal = jet.Decimal
// String creates new string literal expression
var String = jet.String
// UUID is a helper function to create string literal expression from uuid object
// value can be any uuid type with a String method
var UUID = jet.UUID
// Date creates new date literal
var Date = func(year int, month time.Month, day int) DateExpression {
return CAST(jet.Date(year, month, day)).AS_DATE()