| 35 | VAR_LEN_TYPES(UNARY_SAFE_NULL_NEVER_BOOL, name, ALIASES) |
| 36 | |
| 37 | std::vector<NativeFunction> GetStringFunctionRegistry() { |
| 38 | static std::vector<NativeFunction> string_fn_registry_ = { |
| 39 | BINARY_RELATIONAL_SAFE_NULL_IF_NULL_FN(equal, {}), |
| 40 | BINARY_RELATIONAL_SAFE_NULL_IF_NULL_FN(not_equal, {}), |
| 41 | BINARY_RELATIONAL_SAFE_NULL_IF_NULL_FN(less_than, {}), |
| 42 | BINARY_RELATIONAL_SAFE_NULL_IF_NULL_FN(less_than_or_equal_to, {}), |
| 43 | BINARY_RELATIONAL_SAFE_NULL_IF_NULL_FN(greater_than, {}), |
| 44 | BINARY_RELATIONAL_SAFE_NULL_IF_NULL_FN(greater_than_or_equal_to, {}), |
| 45 | |
| 46 | BINARY_RELATIONAL_SAFE_NULL_IF_NULL_UTF8_FN(starts_with, {}), |
| 47 | BINARY_RELATIONAL_SAFE_NULL_IF_NULL_UTF8_FN(ends_with, {}), |
| 48 | BINARY_RELATIONAL_SAFE_NULL_IF_NULL_UTF8_FN(is_substr, {}), |
| 49 | |
| 50 | BINARY_UNSAFE_NULL_IF_NULL(locate, {"position"}, utf8, int32), |
| 51 | BINARY_UNSAFE_NULL_IF_NULL(strpos, {}, utf8, int32), |
| 52 | |
| 53 | UNARY_OCTET_LEN_FN(octet_length, {}), UNARY_OCTET_LEN_FN(bit_length, {}), |
| 54 | |
| 55 | UNARY_UNSAFE_NULL_IF_NULL(char_length, {"character_length"}, utf8, int32), |
| 56 | UNARY_UNSAFE_NULL_IF_NULL(length, {}, utf8, int32), |
| 57 | UNARY_UNSAFE_NULL_IF_NULL(lengthUtf8, {}, binary, int32), |
| 58 | UNARY_UNSAFE_NULL_IF_NULL(reverse, {}, utf8, utf8), |
| 59 | UNARY_UNSAFE_NULL_IF_NULL(ltrim, {}, utf8, utf8), |
| 60 | UNARY_UNSAFE_NULL_IF_NULL(rtrim, {}, utf8, utf8), |
| 61 | UNARY_UNSAFE_NULL_IF_NULL(btrim, {}, utf8, utf8), |
| 62 | UNARY_UNSAFE_NULL_IF_NULL(space, {}, int32, utf8), |
| 63 | UNARY_UNSAFE_NULL_IF_NULL(space, {}, int64, utf8), |
| 64 | |
| 65 | UNARY_SAFE_NULL_NEVER_BOOL_FN(isnull, {}), |
| 66 | UNARY_SAFE_NULL_NEVER_BOOL_FN(isnotnull, {}), |
| 67 | |
| 68 | NativeFunction("chr", {}, DataTypeVector{int32()}, utf8(), kResultNullIfNull, |
| 69 | "chr_int32", NativeFunction::kNeedsContext), |
| 70 | |
| 71 | NativeFunction("chr", {}, DataTypeVector{int64()}, utf8(), kResultNullIfNull, |
| 72 | "chr_int64", NativeFunction::kNeedsContext), |
| 73 | |
| 74 | NativeFunction("ascii", {}, DataTypeVector{utf8()}, int32(), kResultNullIfNull, |
| 75 | "ascii_utf8"), |
| 76 | |
| 77 | NativeFunction("base64", {}, DataTypeVector{binary()}, utf8(), kResultNullIfNull, |
| 78 | "gdv_fn_base64_encode_binary", NativeFunction::kNeedsContext), |
| 79 | |
| 80 | NativeFunction("unbase64", {}, DataTypeVector{utf8()}, binary(), kResultNullIfNull, |
| 81 | "gdv_fn_base64_decode_utf8", NativeFunction::kNeedsContext), |
| 82 | |
| 83 | NativeFunction("repeat", {}, DataTypeVector{utf8(), int32()}, utf8(), |
| 84 | kResultNullIfNull, "repeat_utf8_int32", |
| 85 | NativeFunction::kNeedsContext), |
| 86 | |
| 87 | NativeFunction("soundex", {}, DataTypeVector{utf8()}, utf8(), kResultNullInternal, |
| 88 | "soundex_utf8", NativeFunction::kNeedsContext), |
| 89 | |
| 90 | NativeFunction("upper", {"ucase"}, DataTypeVector{utf8()}, utf8(), |
| 91 | kResultNullIfNull, "gdv_fn_upper_utf8", |
| 92 | NativeFunction::kNeedsContext), |
| 93 | |
| 94 | NativeFunction("lower", {"lcase"}, DataTypeVector{utf8()}, utf8(), |
no test coverage detected