Add support for blob expressions.

This commit is contained in:
go-jet 2025-02-28 18:23:15 +01:00
parent 26e478dc7e
commit c94216ab0e
37 changed files with 1296 additions and 81 deletions

View file

@ -196,11 +196,22 @@ var RTRIM = jet.RTRIM
// return jet.NewStringFunc("RIGHTSTR", str, n)
//}
// HEX function takes an input and returns its equivalent hexadecimal representation
var HEX = jet.HEX
// UNHEX for a string argument str, UNHEX(str) interprets each pair of characters in the argument
// as a hexadecimal number and converts it to the byte represented by the number.
// The return value is a binary string.
var UNHEX = jet.UNHEX
// LENGTH returns number of characters in string with a given encoding
func LENGTH(str jet.StringExpression) jet.StringExpression {
func LENGTH(str jet.StringOrBlobExpression) jet.IntegerExpression {
return jet.LENGTH(str)
}
// OCTET_LENGTH returns number of bytes in string expression
var OCTET_LENGTH = jet.OCTET_LENGTH
// LPAD fills up the string to length length by prepending the characters
// fill (a space by default). If the string is already longer than length
// then it is truncated (on the right).