Binary operators
The||
operator performs concatenation.
Binary functions
concat
binary1
, binary2
, ...
, binaryN
.
This function provides the same functionality as the
SQL-standard concatenation operator (||
).
length
binary
in bytes.
lpad
binary
to size
bytes with padbinary
.
If size
is less than the length of binary
, the result is
truncated to size
characters. size
must not be negative
and padbinary
must be non-empty.
rpad
binary
to size
bytes with padbinary
.
If size
is less than the length of binary
, the result is
truncated to size
characters. size
must not be negative
and padbinary
must be non-empty.
substr
binary
from the starting position start
,
measured in bytes. Positions start with 1
. A negative starting position
is interpreted as being relative to the end of the string.
binary
of length length
from the starting
position start
, measured in bytes. Positions start with 1
. A
negative starting position is interpreted as being relative to the end of
the string.
reverse
binary
with the bytes in reverse order.
Base64 encoding functions
The Base64 functions implement the encoding specified in RFC 4648.from_base64
string
.
to_base64
binary
into a base64 string representation.
from_base64url
string
using the URL safe alphabet.
to_base64url
binary
into a base64 string representation using the URL safe alphabet.
from_base32
string
.
to_base32
binary
into a base32 string representation.
Hex encoding functions
from_hex
string
.
to_hex
binary
into a hex string representation.
Integer encoding functions
from_big_endian_32
binary
.
The input must be exactly 4 bytes.
to_big_endian_32
integer
into a 32-bit two’s complement big-endian format.
from_big_endian_64
binary
.
The input must be exactly 8 bytes.
to_big_endian_64
bigint
into a 64-bit two’s complement big-endian format.
Floating-point encoding functions
from_ieee754_32
binary
in IEEE 754 single-precision floating-point format.
The input must be exactly 4 bytes.
to_ieee754_32
real
into a 32-bit big-endian binary according to IEEE 754 single-precision floating-point format.
from_ieee754_64
binary
in IEEE 754 double-precision floating-point format.
The input must be exactly 8 bytes.
to_ieee754_64
double
into a 64-bit big-endian binary according to IEEE 754 double-precision floating-point format.
Hashing functions
crc32
binary
. For general purpose hashing, use
xxhash64
, as it is much faster and produces a better quality hash.
md5
binary
.
sha1
binary
.
sha256
binary
.
sha512
binary
.
spooky_hash_v2_32
binary
.
spooky_hash_v2_64
binary
.
xxhash64
binary
.
murmur3
binary
.
HMAC functions
hmac_md5
binary
with the given key
.
hmac_sha1
binary
with the given key
.
hmac_sha256
binary
with the given key
.
hmac_sha512
binary
with the given key
.