add postgres json literal

This commit is contained in:
Vladimír Zahradník 2022-06-04 14:12:08 +02:00
parent 38b6caf41e
commit 0425e8895c

View file

@ -65,6 +65,11 @@ func String(value string) StringExpression {
return CAST(jet.String(value)).AS_TEXT() return CAST(jet.String(value)).AS_TEXT()
} }
// Json creates new json literal expression
func Json(value string) StringExpression {
return StringExp(CAST(jet.String(value)).AS("json"))
}
// UUID is a helper function to create string literal expression from uuid object // UUID is a helper function to create string literal expression from uuid object
// value can be any uuid type with a String method // value can be any uuid type with a String method
var UUID = jet.UUID var UUID = jet.UUID